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 #ifndef LinearSOE_h
00027 #define LinearSOE_h
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045 #ifndef _bool_h
00046 #include <bool.h>
00047 #endif
00048
00049 #include <SystemOfEqn.h>
00050
00051 #include <LinearSOESolver.h>
00052 #include <Graph.h>
00053 #include <Matrix.h>
00054 #include <Vector.h>
00055 #include <ID.h>
00056
00084 class LinearSOE : public SystemOfEqn
00085 {
00086 public:
00092 LinearSOE(LinearSOESolver &theSolver, int classTag);
00093
00097 virtual ~LinearSOE();
00098
00099
00107 virtual int solve(void);
00108
00109
00111 virtual int setSize(Graph &theGraph) =0;
00116 virtual int getNumEqn(void) const =0;
00117
00118
00128 virtual int addA(const Matrix &, const ID &, double fact = 1.0) =0;
00129
00138 virtual int addB(const Vector &, const ID &, double fact = 1.0) =0;
00139
00145 virtual int setB(const Vector &, double fact = 1.0) =0;
00146
00147
00151 virtual void zeroA(void) =0;
00152
00156 virtual void zeroB(void) =0;
00157
00158
00164 virtual const Vector &getX(void) = 0;
00165
00171 virtual const Vector &getB(void) = 0;
00172
00174 virtual double getDeterminant(void);
00175
00177 virtual double normRHS(void) = 0;
00178
00180 virtual void setX(int loc, double value) =0;
00181
00182 protected:
00184 int setSolver(LinearSOESolver &newSolver);
00186 LinearSOESolver *getSolver(void);
00187
00188 private:
00190 LinearSOESolver *theSolver;
00191 };
00192
00193
00194 #endif
00195