LAMA
/home/brandes/workspace/LAMA/src/lama/solver/SOR.hpp
Go to the documentation of this file.
00001 
00033 #ifndef LAMA_SOR_HPP_
00034 #define LAMA_SOR_HPP_
00035 
00036 // for dll_import
00037 #include <lama/config.hpp>
00038 
00039 // base classes
00040 #include <lama/solver/OmegaSolver.hpp>
00041 
00042 namespace lama
00043 {
00044 
00045 class LAMA_DLL_IMPORTEXPORT SOR : public OmegaSolver
00046 {
00047 public:
00048     SOR(const std::string& id);
00049 
00050     SOR(const std::string& id, const Scalar omega);
00051 
00052     SOR(const std::string& id, LoggerPtr logger);
00053 
00054     SOR(const std::string& id, const Scalar omega, LoggerPtr logger);
00055 
00059     SOR( const SOR& other );
00060 
00061     virtual ~SOR();
00062 
00063     void initialize(const Matrix&  coefficients);
00064 
00065     void iterate();
00066 
00067     struct SORRuntime : OmegaSolverRuntime
00068     {
00069         SORRuntime();
00070         virtual ~SORRuntime();
00071     };
00072 
00076     virtual SORRuntime& getRuntime();
00077 
00081     virtual const SORRuntime& getConstRuntime() const;
00082 
00089     virtual SolverPtr copy();
00090 
00091 protected:
00092 
00093     SORRuntime mSORRuntime;
00094 
00095 private:
00096     template<typename T>
00097     void iterateImpl();
00098 
00099     std::auto_ptr<const Matrix> mIterationMatrix;
00100 
00101     LAMA_LOG_DECL_STATIC_LOGGER(logger);
00102 };
00103 
00104 } // namespace lama
00105 
00106 #endif // LAMA_SOR_HPP_