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
00044 class BFGS: public EquiSolnAlgo
00045 {
00046 public:
00047
00049 BFGS(int tangent = CURRENT_TANGENT, int n = 10);
00051 BFGS(ConvergenceTest &theTest, int tangent = CURRENT_TANGENT, int n = 10);
00053 ~BFGS();
00054
00056 int solveCurrentStep(void);
00057
00059 void setTest(ConvergenceTest &theNewTest);
00060
00062 ConvergenceTest *getTest(void);
00063
00065 virtual int sendSelf(int commitTag, Channel &theChannel);
00067 virtual int recvSelf(int commitTag, Channel &theChannel,
00068 FEM_ObjectBroker &theBroker);
00069
00071 void Print(ostream &s, int flag =0);
00072
00073 protected:
00074
00075 private:
00076
00078 ConvergenceTest *theTest;
00079
00081 ConvergenceTest *localTest;
00083 int tangent;
00084
00086 int numberLoops;
00087
00089 Vector **s;
00090
00091 Vector **z;
00092
00094 Vector *residOld;
00095 Vector *residNew;
00096
00098 Vector *du;
00099
00100 Vector *b;
00101
00102 Vector *temp;
00103
00104 double *rdotz;
00105
00107 double *sdotr;
00108
00110 void BFGSUpdate(IncrementalIntegrator *theIntegrator,
00111 LinearSOE *theSOE,
00112 Vector &du,
00113 Vector &b,
00114 int count);
00115
00116 };
00117
00118 #endif
00119
00120
00121 ÿ