BelosIterativeSolver.hpp

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

Generated on Thu Sep 18 12:30:12 2008 for Belos by doxygen 1.3.9.1