LAMA
/home/brandes/workspace/LAMA/src/lama/solver/CG.hpp
Go to the documentation of this file.
00001 
00033 #ifndef LAMA_CG_HPP_
00034 #define LAMA_CG_HPP_
00035 
00036 // for dll_import
00037 #include <lama/config.hpp>
00038 
00039 // base classes
00040 #include <lama/solver/IterativeSolver.hpp>
00041 
00042 namespace lama
00043 {
00044 
00049 class LAMA_DLL_IMPORTEXPORT CG : public IterativeSolver
00050 {
00051 public:
00057     CG(const std::string& id);
00058 
00065     CG(const std::string& id, LoggerPtr logger);
00066 
00070     CG( const CG& other );
00071 
00072     virtual ~CG();
00073 
00074     virtual void initialize(const Matrix&  coefficients);
00075 
00082     virtual SolverPtr copy();
00083 
00084     struct CGRuntime : IterativeSolverRuntime
00085     {
00086         CGRuntime();
00087         virtual ~CGRuntime();
00088     
00089         boost::shared_ptr<Vector> mP;
00090         boost::shared_ptr<Vector> mQ;
00091         boost::shared_ptr<Vector> mZ;
00092         Scalar mPScalar;
00093     } ;
00094 
00098     virtual CGRuntime& getRuntime();
00099 
00103     virtual const CGRuntime& getConstRuntime() const;
00104 
00105 protected:
00106 
00107     virtual void iterate();
00108 
00109     LAMA_LOG_DECL_STATIC_LOGGER(logger);
00110 
00111     CGRuntime mCGRuntime;
00112 
00113 private:
00114 };
00115 
00116 }
00117 
00118 #endif // LAMA_CG_HPP_