00001 #ifndef SPARSESYMSOLVER
00002 #define SPARSESYMSOLVER
00003
00013 #include "LinearSymSolver.hh"
00014 #include "SimpleArrayData.hh"
00015 #include "SparseSymMatrix.hh"
00016
00017
00018
00024 class SparseSymSolver : public LinearSymSolver {
00025 protected:
00026 int mFirstCall;
00027 int ictnl[30], info[20];
00028 double ctnl[5];
00030 SimpleArrayDataHandle mFactorization;
00033 SparseSymMatrixHandle mMat;
00035 int mSize;
00037 int mN, mNz;
00039 int *irow, *jcol;
00040 int *iw, liw, *ikeep, *iw1;
00041 int nsteps, iflag, ops;
00042 int nrlnc, la, nirnec, maxfrt;
00043 double *Afact;
00044 int * ipiv;
00045 int mSingular;
00046 public:
00047 SparseSymSolver( SparseSymMatrix * Mat );
00048 virtual void firstCall();
00049 ~SparseSymSolver();
00050
00051 virtual void solve( IotrVector & b );
00052
00053 virtual void matrixChanged();
00054 virtual void getIndices( int irow[], int jcol[] );
00055 virtual void copyMatrixElements( double afact[], int lafact );
00056 virtual void inspect();
00057 virtual void inertia( int & npos, int & nneg, int & nzero ) const;
00058
00059 virtual int isSingular() const;
00060
00066 double thresholdPivoting() { return ctnl[0]; }
00067 void setThresholdPivoting( double piv ) { ctnl[0] = piv; }
00068
00073 double treatAsZero() { return ctnl[2]; }
00074 void setTreatAsZero( double tol ) { ctnl[2] = tol; }
00075
00076 };
00077
00078 typedef Handle<SparseSymSolver> SparseSymSolverHandle;
00079
00080 #endif