stdtimesolver.h

Go to the documentation of this file.
00001 #ifndef  __StdTimeSolver_h
00002 #define  __StdTimeSolver_h
00003 
00004 #include  "stdsolver.h"
00005 
00006 /*-------------------------------------------------------------*/
00007 
00008 namespace Gascoigne
00009 {
00010 
00015 
00019 
00020 class StdTimeSolver : public virtual StdSolver
00021 {
00022 private:
00023   
00024   TimePattern       _TP;
00025   MatrixInterface*  _MMP;
00026 
00027 protected:
00028 
00029 
00030   double _dt, _theta, _time;
00031   fixarray<2,double> _rhs;
00032 
00033   MatrixInterface*& GetMassMatrixPointer() {return _MMP;}
00034 
00035   const TimePattern& GetTimePattern() const {return _TP;}
00036   TimePattern& GetTimePattern() {return _TP;}
00037 
00038   virtual MatrixInterface* NewMassMatrix(int ncomp, const std::string& matrixtype);
00039   virtual std::string PrecondCGMass(GlobalVector& u, GlobalVector& f, const TimePattern& TP, double s=1.);
00040 
00041 public:
00042   
00043   StdTimeSolver();
00044   ~StdTimeSolver();
00045 
00046   void BasicInit(int level, const ParamFile* pfparamfile, const int dimension);
00047 
00048   void RegisterMatrix();
00049   void ReInitMatrix();
00050 
00051   void SetTimeData(double dt, double theta, double time, double oldrhs = -1., double newrhs = 1.);
00052   void SetProblem(const ProblemDescriptorInterface& PDX);
00053 
00054   void InitialCondition(VectorInterface& f, double d=1.) const;
00055   void TimeRhsOperator(VectorInterface& f, const VectorInterface& u) const; 
00056   void TimeRhs(int k, VectorInterface& f) const;
00057   void Form (VectorInterface& y, const VectorInterface& x, double d) const;
00058   void AssembleMatrix(const VectorInterface& u, double d);
00059   std::string GetName() const;
00060   void L2Projection(VectorInterface& u, VectorInterface& f);
00061   
00062   void SetMassMatrix(MatrixInterface &MM, bool init=false);
00063   const MatrixInterface* GetMassMatrix() const {return _MMP;}
00064   MatrixInterface* GetMassMatrix() {return _MMP;}
00065 };
00066 }
00067 
00068 #endif

Generated on Thu Sep 14 10:34:38 2006 for Gascoigne by  doxygen 1.4.7