LAMA
/home/brandes/workspace/LAMA/src/lama/solver/SingleGridSetup.hpp
Go to the documentation of this file.
00001 
00033 #ifndef LAMA_SINGLEGRIDSETUP_HPP_
00034 #define LAMA_SINGLEGRIDSETUP_HPP_
00035 
00036 // for dll_import
00037 #include <lama/config.hpp>
00038 
00039 // base classes
00040 #include <lama/solver/AMGSetup.hpp>
00041 
00042 // others
00043 #include <lama/solver/Solver.hpp>
00044 
00045 namespace lama
00046 {
00047 
00048 class SingleGridSetup: public lama::AMGSetup
00049 {
00050 public:
00051     SingleGridSetup();
00052     virtual ~SingleGridSetup();
00053 
00054     virtual void initialize(const Matrix&  coefficients);
00055 
00056     virtual Solver& getCoarseLevelSolver();
00057 
00058     virtual unsigned int getNumLevels();
00059 
00060     virtual Solver& getSmoother( const unsigned int level );
00061 
00062     virtual const Matrix& getGalerkin( const unsigned int level );
00063 
00064     virtual const Matrix& getRestriction( const unsigned int level );
00065 
00066     virtual const Matrix& getInterpolation( const unsigned int level );
00067 
00068     virtual Vector& getSolutionVector( const unsigned int level );
00069 
00070     virtual Vector& getRhsVector( const unsigned int level );
00071 
00072     virtual Vector& getTmpResVector( const unsigned int level );
00073 
00074     virtual std::string getCouplingPredicateInfo() const;
00075 
00076     virtual std::string getColoringInfo() const;
00077 
00078     virtual std::string getInterpolationInfo() const;
00079 
00080     virtual std::string getSmootherInfo() const;
00081 
00082     virtual std::string getCoarseLevelSolverInfo() const;
00083 
00084     virtual void setCoarseLevelSolver( SolverPtr solver );
00085 
00089     virtual void setSmoother( SolverPtr solver );
00090 
00091     // just a dummy function
00092     virtual void setMaxLevels( const unsigned int ) {};
00093     // just a dummy function
00094     virtual void setMinVarsCoarseLevel( const unsigned int ) {};
00095 
00096 private:
00097 
00098     LAMA_LOG_DECL_STATIC_LOGGER( logger );
00099 
00100     SolverPtr mSolver;
00101     std::auto_ptr<Matrix> mIdentity;
00102 
00103     std::auto_ptr<Vector>   mSolutionVector;
00104     std::auto_ptr<Vector>   mRhsVector;
00105     std::auto_ptr<Vector>   mTmpResVector;
00106 
00107 };
00108 
00109 }
00110 
00111 #endif /* LAMA_SINGLEGRIDSETUP_HPP_ */