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
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035 #ifndef DiagonalSOE_h
00036 #define DiagonalSOE_h
00037
00038 #include <LinearSOE.h>
00039 #include <Vector.h>
00040 class DiagonalSolver;
00041
00042 class DiagonalSOE : public LinearSOE
00043 {
00044 public:
00045 DiagonalSOE(DiagonalSolver &theSolver);
00046 DiagonalSOE(int N, DiagonalSolver &theSolver);
00047
00048 ~DiagonalSOE();
00049
00050 int getNumEqn(void) const;
00051 int setSize(Graph &theGraph);
00052 int addA(const Matrix &, const ID &, double fact = 1.0);
00053 int addB(const Vector &, const ID &, double fact = 1.0);
00054 int setB(const Vector &, double fact = 1.0);
00055
00056 void zeroA(void);
00057 void zeroB(void);
00058
00059 void setX(int loc, double value);
00060 void setX(const Vector &x);
00061
00062
00063 const Vector &getX(void);
00064 const Vector &getB(void);
00065 double normRHS(void);
00066
00067 int setDiagonalSolver(DiagonalSolver &newSolver);
00068
00069 int sendSelf(int commitTag, Channel &theChannel);
00070 int recvSelf(int commitTag, Channel &theChannel, FEM_ObjectBroker &theBroker);
00071
00072 friend class DiagonalSolver;
00073 friend class DiagonalDirectSolver;
00074
00075 protected:
00076
00077 private:
00078 int size;
00079 double *A, *B, *X;
00080 Vector *vectX;
00081 Vector *vectB;
00082 bool isAfactored;
00083 };
00084
00085
00086 #endif
00087
00088
00089