multilevelsolverinterface.h

Go to the documentation of this file.
00001 #ifndef  __MultiLevelSolverInterface_h
00002 #define  __MultiLevelSolverInterface_h
00003 
00004 
00005 #include  "meshagentinterface.h"
00006 #include  "solverinterface.h"
00007 #include  "monitor.h"
00008 #include  "paramfile.h"
00009 #include  "nlinfo.h"
00010 #include  "vectorinterface.h"
00011 #include  "problemcontainer.h"
00012 #include  "functionalcontainer.h"
00013 
00014 namespace Gascoigne
00015 {
00016   
00021 
00025 
00026   class MultiLevelSolverInterface
00027   {
00028     private:
00029 
00030     protected:
00031       
00032     public:
00033       MultiLevelSolverInterface() {}
00034       virtual ~MultiLevelSolverInterface() {}
00035 
00036       virtual std::string GetName() const=0;
00037       virtual void BasicInit(const MeshAgentInterface* GMGM, const ParamFile* paramfile,
00038                              const ProblemContainer* PC, const FunctionalContainer* FC=NULL)=0;
00039       virtual void SetProblem(const std::string& problemlabel)=0;
00040       virtual void ReInit(const std::string& problemlabel)=0;
00041       virtual void SetMonitorPtr(Monitor* mon)=0;
00042 
00043       virtual const DoubleVector GetExactValues() const=0;
00044       virtual const DoubleVector ComputeFunctionals(VectorInterface& f, const VectorInterface& u) const=0;
00045       
00046       virtual void ReInitMatrix()=0;
00047 
00048       virtual int nlevels() const=0;
00049 
00050       virtual SolverInterface* GetSolver(int l)=0;
00051       virtual const SolverInterface* GetSolver(int l) const=0;
00052       virtual SolverInterface* GetSolver()=0;
00053       virtual const SolverInterface* GetSolver() const=0;
00054 
00055 //      virtual void SetState(const std::string& s)=0;
00056       virtual void AssembleMatrix(VectorInterface& u, NLInfo& nlinfo)=0;
00057       virtual void AssembleMatrix(VectorInterface& u)=0;
00058       virtual void ComputeIlu(VectorInterface& u)=0;
00059       virtual void ComputeIlu()=0;
00060       
00061       virtual void BoundaryInit(VectorInterface& u) const=0;
00062 
00063       //
00065       //
00066 
00067       virtual void DeleteVector(VectorInterface& g)=0;
00068       virtual void RegisterVectors()=0;
00069       virtual void RegisterMatrix()=0;
00070       virtual void ReInitVector(VectorInterface& v)=0;
00071       virtual void ReInitVector(VectorInterface& v, int comp)=0;
00072 
00073       //
00075       //
00076 
00077       virtual std::string LinearSolve(int level, VectorInterface& u, const VectorInterface& b, CGInfo& info)=0;
00078       virtual std::string LinearSolve(VectorInterface& u, const VectorInterface& b, CGInfo& info) {
00079         return LinearSolve(nlevels()-1,u,b,info);
00080       }
00081       virtual std::string Solve(int level, VectorInterface& x, const VectorInterface& b, NLInfo& nlinfo)=0;
00082       virtual std::string Solve(VectorInterface& x, const VectorInterface& b, NLInfo& nlinfo) {
00083         return Solve(nlevels()-1,x,b,nlinfo);
00084       }
00085       virtual void InterpolateSolution(VectorInterface& u, const GlobalVector& uold) const=0;
00086       virtual void InterpolateCellSolution(VectorInterface& u, const GlobalVector& uold) const=0;
00087       virtual double ComputeFunctional(VectorInterface& f, const VectorInterface& u, const std::string& label) const=0;
00088 
00089       virtual void AssembleDualMatrix(VectorInterface& u)=0;
00090       virtual void vmulteq(VectorInterface& y, const VectorInterface&  x) const=0;
00091 
00092       virtual void Equ(VectorInterface& dst, double s, const VectorInterface& src)const=0;
00093       virtual void Zero(VectorInterface& dst)const=0;
00094       virtual void AddNodeVector(const std::string& name, VectorInterface& q)=0;
00095       virtual void DeleteNodeVector(const std::string& q)=0;
00096 
00097       virtual void SolutionTransfer(VectorInterface& u) const=0;
00098       virtual void Transfer(VectorInterface& u) const=0;
00099 
00100       virtual void newton(VectorInterface& u, const VectorInterface& f, VectorInterface& r, VectorInterface& w, NLInfo& info)=0;
00101   };
00102 }
00103 
00104 #endif

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