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 #ifndef DistributedDiagonalSOE_h
00035 #define DistributedDiagonalSOE_h
00036
00037 #include <LinearSOE.h>
00038 #include <Vector.h>
00039 #include <ID.h>
00040
00041 class DistributedDiagonalSolver;
00042
00043 class DistributedDiagonalSOE : public LinearSOE
00044 {
00045 public:
00046 DistributedDiagonalSOE(DistributedDiagonalSolver &theSolver);
00047 ~DistributedDiagonalSOE();
00048
00049 int getNumEqn(void) const;
00050 int setSize(Graph &theGraph);
00051 int addA(const Matrix &, const ID &, double fact = 1.0);
00052 int addB(const Vector &, const ID &, double fact = 1.0);
00053 int setB(const Vector &, double fact = 1.0);
00054
00055 void zeroA(void);
00056 void zeroB(void);
00057
00058 void setX(int loc, double value);
00059 void setX(const Vector &x);
00060
00061 const Vector &getX(void);
00062 const Vector &getB(void);
00063 double normRHS(void);
00064
00065 int setDiagonalSolver(DistributedDiagonalSolver &newSolver);
00066
00067 int sendSelf(int commitTag, Channel &theChannel);
00068 int recvSelf(int commitTag, Channel &theChannel, FEM_ObjectBroker &theBroker);
00069 int setChannels(int nChannels, Channel **theC);
00070
00071 int setAnalysisModel(AnalysisModel &theModel);
00072
00073 friend class DistributedDiagonalSolver;
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 int processID;
00085 int numProcesses;
00086 int numChannels;
00087 Channel **theChannels;
00088 ID **localCol;
00089
00090 ID myDOFs;
00091 ID myDOFsShared;
00092 int numShared;
00093 double *dataShared;
00094 Vector *vectShared;
00095 AnalysisModel *theModel;
00096 };
00097
00098
00099 #endif
00100
00101
00102