BelosIteration.hpp

Go to the documentation of this file.
00001 // @HEADER
00002 // ***********************************************************************
00003 //
00004 //                 Belos: Block Linear Solvers Package
00005 //                 Copyright (2004) Sandia Corporation
00006 //
00007 // Under terms of Contract DE-AC04-94AL85000, there is a non-exclusive
00008 // license for use of this work by or on behalf of the U.S. Government.
00009 //
00010 // This library is free software; you can redistribute it and/or modify
00011 // it under the terms of the GNU Lesser General Public License as
00012 // published by the Free Software Foundation; either version 2.1 of the
00013 // License, or (at your option) any later version.
00014 //
00015 // This library is distributed in the hope that it will be useful, but
00016 // WITHOUT ANY WARRANTY; without even the implied warranty of
00017 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00018 // Lesser General Public License for more details.
00019 //
00020 // You should have received a copy of the GNU Lesser General Public
00021 // License along with this library; if not, write to the Free Software
00022 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
00023 // USA
00024 // Questions? Contact Michael A. Heroux (maherou@sandia.gov)
00025 //
00026 // ***********************************************************************
00027 // @HEADER
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 &params );
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 } // end Belos namespace
00143 
00144 #endif /* BELOS_ITERATION_HPP */
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Generated on Wed Apr 13 10:05:06 2011 for Belos by  doxygen 1.6.3