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 #ifndef BELOS_ITERATION_HPP
00030 #define BELOS_ITERATION_HPP
00031
00036 #include "BelosConfigDefs.hpp"
00037 #include "BelosTypes.hpp"
00038
00039 #include "Teuchos_ParameterList.hpp"
00040 #include "Teuchos_RCP.hpp"
00041 #include "Teuchos_Array.hpp"
00042
00043 namespace Belos {
00044
00045 template <class ScalarType, class MV, class OP>
00046 class LinearProblem;
00047
00048 template <class ScalarType>
00049 class OutputManager;
00050
00051 template <class ScalarType, class MV, class OP>
00052 class StatusTest;
00053
00054 template <class ScalarType, class MV, class OP>
00055 class MatOrthoManager;
00056
00057 template<class ScalarType, class MV, class OP>
00058 class Iteration {
00059
00060 public:
00061
00063
00064
00066 Iteration() {};
00067
00069
00073 Iteration( const Teuchos::RCP<LinearProblem<ScalarType,MV,OP> > &problem,
00074 const Teuchos::RCP<OutputManager<ScalarType> > &printer,
00075 const Teuchos::RCP<StatusTest<ScalarType,MV,OP> > &tester,
00076 const Teuchos::RCP<MatOrthoManager<ScalarType,MV,OP> > &ortho,
00077 Teuchos::ParameterList ¶ms );
00078
00080 virtual ~Iteration() {};
00082
00083
00085
00086
00090 virtual void iterate() = 0;
00091
00095 virtual void initialize() = 0;
00096
00098
00099
00101
00102
00104 virtual int getNumIters() const = 0;
00105
00107 virtual void resetNumIters( int iter = 0 ) = 0;
00108
00111 virtual Teuchos::RCP<const MV> getNativeResiduals( std::vector<typename Teuchos::ScalarTraits<ScalarType>::magnitudeType> *norms ) const = 0;
00112
00114
00117 virtual Teuchos::RCP<MV> getCurrentUpdate() const = 0;
00118
00120
00121
00122
00124
00125
00127 virtual const LinearProblem<ScalarType,MV,OP>& getProblem() const = 0;
00128
00130 virtual int getBlockSize() const = 0;
00131
00133 virtual void setBlockSize(int blockSize) = 0;
00134
00136 virtual bool isInitialized() = 0;
00137
00139
00140 };
00141
00142 }
00143
00144 #endif