00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025 #ifndef BFGS_h
00026 #define BFGS_h
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038 #include <EquiSolnAlgo.h>
00039 #include <Vector.h>
00040 #include <IncrementalIntegrator.h>
00041 #include <LinearSOE.h>
00042
00043 class BFGS: public EquiSolnAlgo
00044 {
00045 public:
00046
00047 BFGS(int tangent = CURRENT_TANGENT, int n = 10);
00048 BFGS(ConvergenceTest &theTest, int tangent = CURRENT_TANGENT, int n = 10);
00049 ~BFGS();
00050
00051 int solveCurrentStep(void);
00052
00053 int setConvergenceTest(ConvergenceTest *theNewTest);
00054 ConvergenceTest *getConvergenceTest(void);
00055
00056 virtual int sendSelf(int commitTag, Channel &theChannel);
00057 virtual int recvSelf(int commitTag, Channel &theChannel,
00058 FEM_ObjectBroker &theBroker);
00059
00060 void Print(OPS_Stream &s, int flag =0);
00061
00062 protected:
00063
00064 private:
00065
00066 ConvergenceTest *theTest;
00067
00068 ConvergenceTest *localTest;
00069 int tangent;
00070
00071 int numberLoops;
00072
00073 Vector **s;
00074
00075 Vector **z;
00076
00077 Vector *residOld;
00078 Vector *residNew;
00079
00080 Vector *du;
00081
00082 Vector *b;
00083
00084 Vector *temp;
00085
00086 double *rdotz;
00087
00088 double *sdotr;
00089
00090 void BFGSUpdate(IncrementalIntegrator *theIntegrator,
00091 LinearSOE *theSOE,
00092 Vector &du,
00093 Vector &b,
00094 int count);
00095
00096 };
00097
00098 #endif
00099
00100