00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030 #ifndef BELOS_ITERATIVE_SOLVER_HPP
00031 #define BELOS_ITERATIVE_SOLVER_HPP
00032
00037 #include "Teuchos_ParameterList.hpp"
00038 #include "Teuchos_ScalarTraits.hpp"
00039 #include "Teuchos_Describable.hpp"
00040
00041 using Teuchos::RefCountPtr;
00042 using Teuchos::ParameterList;
00043
00044
00053 namespace Belos {
00054
00055 template <class ScalarType, class MV, class OP>
00056 class StatusTest;
00057
00058 template <class ScalarType, class MV, class OP>
00059 class LinearProblem;
00060
00061 template <class ScalarType, class MV, class OP>
00062 class IterativeSolver : virtual public Teuchos::Describable {
00063
00064 typedef Teuchos::ScalarTraits<ScalarType> SCT;
00065 typedef typename SCT::magnitudeType MagnitudeType;
00066
00067 public:
00068
00071
00073 IterativeSolver(void) {};
00074
00076 virtual ~IterativeSolver(void) {};
00077
00079
00082
00084 virtual int GetNumIters() const = 0;
00085
00087
00091 virtual int GetNumRestarts() const = 0;
00092
00094
00106 virtual RefCountPtr<const MV> GetNativeResiduals( std::vector<MagnitudeType> *normvec ) const = 0;
00107
00109
00117 virtual RefCountPtr<MV> GetCurrentSoln() = 0;
00118
00122 virtual RefCountPtr<LinearProblem<ScalarType,MV,OP> > GetLinearProblem() const = 0;
00123
00124 virtual RefCountPtr<StatusTest<ScalarType,MV,OP> > GetStatusTest() const = 0;
00125
00127
00130
00140 virtual int Reset( const RefCountPtr<ParameterList>& pl = Teuchos::null ) { return 0; }
00141
00143
00146
00150 virtual void Solve() = 0;
00151
00153 };
00154
00155 }
00156
00157 #endif