LAMA
/home/brandes/workspace/LAMA/src/lama/solver/OmegaSolver.hpp
Go to the documentation of this file.
00001 
00034 #ifndef LAMA_OMEGASOLVER_HPP_
00035 #define LAMA_OMEGASOLVER_HPP_
00036 
00037 // for dll_import
00038 #include <lama/config.hpp>
00039 
00040 // base classes
00041 #include <lama/solver/IterativeSolver.hpp>
00042 
00043 // logging
00044 #include <logging/logging.hpp>
00045 
00046 namespace lama
00047 {
00048 
00049 class OmegaSolver;
00050 typedef boost::shared_ptr<OmegaSolver> OldSolutionHandlerPtr;
00051 
00056 class LAMA_DLL_IMPORTEXPORT OmegaSolver : public IterativeSolver
00057 {
00058 public:
00059 
00065     OmegaSolver(const std::string& id);
00066 
00073     OmegaSolver(const std::string& id, const Scalar omega);
00074 
00081     OmegaSolver(const std::string& id, LoggerPtr logger);
00082 
00090     OmegaSolver(const std::string& id, const Scalar omega, LoggerPtr logger);
00091 
00095     OmegaSolver( const OmegaSolver& other );
00096 
00100     virtual ~OmegaSolver();
00101 
00106     virtual void initialize( const Matrix& coefficients );
00107 
00113     void setOmega(const Scalar omega);
00114 
00120     Scalar getOmega() const;
00121 
00122     struct OmegaSolverRuntime : IterativeSolverRuntime
00123     {
00124         OmegaSolverRuntime();
00125         virtual ~OmegaSolverRuntime();
00126     };
00127 
00131     virtual OmegaSolverRuntime& getRuntime() =0;
00132 
00136     virtual const OmegaSolverRuntime& getConstRuntime() const =0;
00137 
00144     virtual SolverPtr copy() =0;
00145 
00146 protected:
00151     virtual void iterate() = 0;
00152 
00153     Scalar mOmega;
00154 
00155     LAMA_LOG_DECL_STATIC_LOGGER(logger);
00156 };
00157 
00158 }// namespace lama
00159 
00160 #endif // LAMA_OMEGASOLVER_HPP_