00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef SymSparseLinSOE_h
00020 #define SymSparseLinSOE_h
00021
00022 #include <LinearSOE.h>
00023 #include <Vector.h>
00024
00025 extern "C" {
00026 #include <FeStructs.h>
00027 }
00028
00029 class SymSparseLinSolver;
00030
00031 class SymSparseLinSOE : public LinearSOE
00032 {
00033 public:
00034 SymSparseLinSOE(SymSparseLinSolver &theSolver, int lSparse);
00035 SymSparseLinSOE(int N, int NNZ, int *rowStartA, int *colA,
00036 SymSparseLinSolver &theSolver, int lSparse);
00037
00038 ~SymSparseLinSOE();
00039
00040 int getNumEqn(void) const;
00041 int setSize(Graph &theGraph);
00042 int addA(const Matrix &, const ID &, double fact = 1.0);
00043 int addB(const Vector &, const ID &, double fact = 1.0);
00044 int setB(const Vector &, double fact = 1.0);
00045
00046 void zeroA(void);
00047 void zeroB(void);
00048
00049 const Vector &getX(void);
00050 const Vector &getB(void);
00051 double normRHS(void);
00052
00053 void setX(int loc, double value);
00054 void setX(const Vector &x);
00055 int setSymSparseLinSolver(SymSparseLinSolver &newSolver);
00056
00057 int sendSelf(int commitTag, Channel &theChannel);
00058 int recvSelf(int commitTag, Channel &theChannel,
00059 FEM_ObjectBroker &theBroker);
00060
00061 friend class SymSparseLinSolver;
00062
00063 protected:
00064
00065 private:
00066 int size;
00067 int nnz;
00068 double *B, *X;
00069 int *colA, *rowStartA;
00070
00071 Vector *vectX;
00072 Vector *vectB;
00073 int Bsize;
00074 bool factored;
00075
00076 int LSPARSE;
00077 int nblks;
00078 int *xblk, *invp;
00079 double *diag, **penv;
00080 int *rowblks;
00081 OFFDBLK **begblk;
00082 OFFDBLK *first;
00083
00084 };
00085
00086 #endif
00087