Home | Doxygen Documentation | Tutorials | Developer Tools (restricted)

operator/solverFabric.hh
Go to the documentation of this file.
00001 // abstract class for solver of linear systems
00002 
00003 #ifndef systemSolverFabric_hh
00004 #define systemSolverFabric_hh
00005 
00006 #include "sparseMatrix.hh"
00007 
00008 namespace concepts {
00009 
00010   // ********************************************************** SolverFabric **
00011 
00018   template<typename F>
00019   class SolverFabric : public OutputOperator {
00020   public:
00025     virtual Operator<F>* operator()(Operator<F>& matrix) = 0;
00026     virtual Operator<F>* operator()(SparseMatrix<F>& matrix) {
00027       Operator<F>* m = dynamic_cast<Operator<F>* >(&matrix);
00028       return operator()(*m);
00029     }
00030   };
00031 
00032   // *************************************************** PrecondSolverFabric **
00033 
00041   template<typename F, class G = F>
00042   class PrecondSolverFabric : public SolverFabric<F> {
00043   public:
00049     virtual Operator<F>* operator()(Operator<F>& matrix,
00050                                     Operator<G>& precond) = 0;
00051   };
00052 
00053 } // concepts
00054 
00055 #endif // systemSolverFabric_hh

Home | Doxygen Documentation | Tutorials | Developer Tools (restricted)