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 Broyden_h
00026 #define Broyden_h
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041 #include <EquiSolnAlgo.h>
00042 #include <Vector.h>
00043 #include <IncrementalIntegrator.h>
00044 #include <LinearSOE.h>
00045
00046 class Broyden: public EquiSolnAlgo
00047 {
00048 public:
00049
00050 Broyden(int tangent = CURRENT_TANGENT, int n = 10 );
00051
00052 Broyden(ConvergenceTest &theTest, int tangent = CURRENT_TANGENT, int n = 10 );
00053
00054 ~Broyden();
00055
00056 int solveCurrentStep(void);
00057
00058
00059 int setConvergenceTest(ConvergenceTest *theNewTest);
00060 ConvergenceTest *getConvergenceTest(void);
00061
00062 virtual int sendSelf(int commitTag, Channel &theChannel);
00063 virtual int recvSelf(int commitTag, Channel &theChannel,
00064 FEM_ObjectBroker &theBroker);
00065
00066 void Print(OPS_Stream &s, int flag =0);
00067
00068 protected:
00069
00070 private:
00071
00072 ConvergenceTest *theTest;
00073
00074 ConvergenceTest *localTest ;
00075
00076 int tangent ;
00077
00078 int numberLoops ;
00079
00080 Vector **s ;
00081
00082 Vector **z ;
00083
00084 Vector *residOld ;
00085 Vector *residNew ;
00086
00087 Vector *du ;
00088
00089 Vector *temp ;
00090
00091 void BroydenUpdate( IncrementalIntegrator *theIntegrator,
00092 LinearSOE *theSOE,
00093 Vector &du,
00094 int count ) ;
00095
00096 };
00097
00098 #endif
00099
00100