Belos  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
List of all members
Belos::SolverManager< ScalarType, MV, OP > Class Template Referenceabstract

The Belos::SolverManager is a templated virtual base class that defines the basic interface that any solver manager will support. More...

#include <BelosSolverManager.hpp>

Inheritance diagram for Belos::SolverManager< ScalarType, MV, OP >:
Inheritance graph
[legend]

Public Member Functions

Constructors/Destructor
 SolverManager ()
 Empty constructor. More...
 
virtual ~SolverManager ()
 Destructor. More...
 
virtual Teuchos::RCP
< SolverManager< ScalarType,
MV, OP > > 
clone () const =0
 clone the solver manager. More...
 
Accessor methods
virtual const LinearProblem
< ScalarType, MV, OP > & 
getProblem () const =0
 Return a reference to the linear problem being solved by this solver manager. More...
 
virtual Teuchos::RCP< const
Teuchos::ParameterList
getValidParameters () const =0
 Return the valid parameters for this solver manager. More...
 
virtual Teuchos::RCP< const
Teuchos::ParameterList
getCurrentParameters () const =0
 Return the current parameters being used for this solver manager. More...
 
virtual Teuchos::ScalarTraits
< ScalarType >::magnitudeType 
achievedTol () const
 Tolerance achieved by the last solve() invocation. More...
 
virtual int getNumIters () const =0
 Get the iteration count for the most recent call to solve(). More...
 
virtual bool isLOADetected () const =0
 Returns whether a loss of accuracy was detected in the solver. More...
 
Set methods
virtual void setProblem (const Teuchos::RCP< LinearProblem< ScalarType, MV, OP > > &problem)=0
 Set the linear problem that needs to be solved. More...
 
virtual void setParameters (const Teuchos::RCP< Teuchos::ParameterList > &params)=0
 Set the parameters to use when solving the linear problem. More...
 
virtual void setUserConvStatusTest (const Teuchos::RCP< StatusTest< ScalarType, MV, OP > > &, const typename StatusTestCombo< ScalarType, MV, OP >::ComboType &=StatusTestCombo< ScalarType, MV, OP >::SEQ)
 Set user-defined convergence status test. More...
 
virtual void setDebugStatusTest (const Teuchos::RCP< StatusTest< ScalarType, MV, OP > > &)
 Set user-defined debug status test. More...
 
Reset methods
virtual void reset (const ResetType type)=0
 Reset the solver manager. More...
 
Solver application methods
virtual ReturnType solve ()=0
 Iterate until the status test tells us to stop. More...
 
- Public Member Functions inherited from Teuchos::Describable
virtual std::string description () const
 
virtual void describe (FancyOStream &out, const EVerbosityLevel verbLevel=verbLevel_default) const
 
void describe (std::ostream &out, const EVerbosityLevel verbLevel=verbLevel_default) const
 
virtual ~Describable ()
 
 LabeledObject ()
 
virtual ~LabeledObject ()
 
virtual void setObjectLabel (const std::string &objectLabel)
 
virtual std::string getObjectLabel () const
 
DescribableStreamManipulatorState describe (const Describable &describable, const EVerbosityLevel verbLevel=Describable::verbLevel_default)
 
std::ostream & operator<< (std::ostream &os, const DescribableStreamManipulatorState &d)
 

Additional Inherited Members

- Static Public Attributes inherited from Teuchos::Describable
static const EVerbosityLevel verbLevel_default
 

Detailed Description

template<class ScalarType, class MV, class OP>
class Belos::SolverManager< ScalarType, MV, OP >

The Belos::SolverManager is a templated virtual base class that defines the basic interface that any solver manager will support.

Definition at line 39 of file BelosSolverManager.hpp.

Constructor & Destructor Documentation

template<class ScalarType , class MV , class OP >
Belos::SolverManager< ScalarType, MV, OP >::SolverManager ( )
inline

Empty constructor.

Definition at line 47 of file BelosSolverManager.hpp.

template<class ScalarType , class MV , class OP >
virtual Belos::SolverManager< ScalarType, MV, OP >::~SolverManager ( )
inlinevirtual

Destructor.

Definition at line 50 of file BelosSolverManager.hpp.

Member Function Documentation

template<class ScalarType , class MV , class OP >
virtual Teuchos::RCP<SolverManager<ScalarType, MV, OP> > Belos::SolverManager< ScalarType, MV, OP >::clone ( ) const
pure virtual
template<class ScalarType , class MV , class OP >
virtual const LinearProblem<ScalarType,MV,OP>& Belos::SolverManager< ScalarType, MV, OP >::getProblem ( ) const
pure virtual
template<class ScalarType , class MV , class OP >
virtual Teuchos::RCP<const Teuchos::ParameterList> Belos::SolverManager< ScalarType, MV, OP >::getValidParameters ( ) const
pure virtual
template<class ScalarType , class MV , class OP >
virtual Teuchos::RCP<const Teuchos::ParameterList> Belos::SolverManager< ScalarType, MV, OP >::getCurrentParameters ( ) const
pure virtual
template<class ScalarType , class MV , class OP >
virtual Teuchos::ScalarTraits<ScalarType>::magnitudeType Belos::SolverManager< ScalarType, MV, OP >::achievedTol ( ) const
inlinevirtual

Tolerance achieved by the last solve() invocation.

This is the maximum over all right-hand sides' achieved convergence tolerances, and is set whether or not the solve actually managed to achieve the desired convergence tolerance.

The default implementation throws std::runtime_error. This is in case the idea of a single convergence tolerance doesn't make sense for some solvers. It also serves as a gradual upgrade path (since this method is a later addition to the SolverManager interface).

Reimplemented in Belos::GCRODRSolMgr< ScalarType, MV, OP, true >, Belos::PseudoBlockGmresSolMgr< ScalarType, MV, OP >, Belos::PCPGSolMgr< ScalarType, MV, OP, true >, Belos::RCGSolMgr< ScalarType, MV, OP, true >, Belos::BlockCGSolMgr< ScalarType, MV, OP, true >, Belos::GmresPolySolMgr< ScalarType, MV, OP >, Belos::MinresSolMgr< ScalarType, MV, OP >, Belos::BlockGmresSolMgr< ScalarType, MV, OP >, Belos::PseudoBlockCGSolMgr< ScalarType, MV, OP, true >, Belos::BlockGCRODRSolMgr< ScalarType, MV, OP >, Belos::PseudoBlockTFQMRSolMgr< ScalarType, MV, OP >, Belos::TFQMRSolMgr< ScalarType, MV, OP >, Belos::BiCGStabSolMgr< ScalarType, MV, OP >, and Belos::FixedPointSolMgr< ScalarType, MV, OP >.

Definition at line 81 of file BelosSolverManager.hpp.

template<class ScalarType , class MV , class OP >
virtual int Belos::SolverManager< ScalarType, MV, OP >::getNumIters ( ) const
pure virtual
template<class ScalarType , class MV , class OP >
virtual bool Belos::SolverManager< ScalarType, MV, OP >::isLOADetected ( ) const
pure virtual
template<class ScalarType , class MV , class OP >
virtual void Belos::SolverManager< ScalarType, MV, OP >::setProblem ( const Teuchos::RCP< LinearProblem< ScalarType, MV, OP > > &  problem)
pure virtual
template<class ScalarType , class MV , class OP >
virtual void Belos::SolverManager< ScalarType, MV, OP >::setParameters ( const Teuchos::RCP< Teuchos::ParameterList > &  params)
pure virtual
template<class ScalarType , class MV , class OP >
virtual void Belos::SolverManager< ScalarType, MV, OP >::setUserConvStatusTest ( const Teuchos::RCP< StatusTest< ScalarType, MV, OP > > &  ,
const typename StatusTestCombo< ScalarType, MV, OP >::ComboType &  = StatusTestCombo<ScalarType,MV,OP>::SEQ 
)
inlinevirtual

Set user-defined convergence status test.

Reimplemented in Belos::PseudoBlockGmresSolMgr< ScalarType, MV, OP >.

Definition at line 114 of file BelosSolverManager.hpp.

template<class ScalarType , class MV , class OP >
virtual void Belos::SolverManager< ScalarType, MV, OP >::setDebugStatusTest ( const Teuchos::RCP< StatusTest< ScalarType, MV, OP > > &  )
inlinevirtual

Set user-defined debug status test.

Reimplemented in Belos::PseudoBlockGmresSolMgr< ScalarType, MV, OP >, and Belos::BlockGmresSolMgr< ScalarType, MV, OP >.

Definition at line 125 of file BelosSolverManager.hpp.

template<class ScalarType , class MV , class OP >
virtual void Belos::SolverManager< ScalarType, MV, OP >::reset ( const ResetType  type)
pure virtual
template<class ScalarType , class MV , class OP >
virtual ReturnType Belos::SolverManager< ScalarType, MV, OP >::solve ( )
pure virtual

Iterate until the status test tells us to stop.

This method performs possibly repeated calls to the underlying linear solver's iterate() routine, until the problem has been solved (as decided by the solver manager via the status test(s)), or the solver manager decides to quit.

Returns
A Belos::ReturnType enum specifying:
  • Belos::Converged: the linear problem was solved to the specification required by the solver manager.
  • Belos::Unconverged: the linear problem was not solved to the specification desired by the solver manager.

Implemented in Belos::Details::SolverManagerRequiresRealLapack< ScalarType, MV, OP, false >, Belos::LSQRSolMgr< ScalarType, MV, OP, false >, Belos::PseudoBlockGmresSolMgr< ScalarType, MV, OP >, Belos::Details::SolverManagerRequiresLapack< ScalarType, MV, OP, false >, Belos::GCRODRSolMgr< ScalarType, MV, OP, true >, Belos::PCPGSolMgr< ScalarType, MV, OP, true >, Belos::RCGSolMgr< ScalarType, MV, OP, true >, Belos::GmresPolySolMgr< ScalarType, MV, OP >, Belos::BlockCGSolMgr< ScalarType, MV, OP, true >, Belos::MinresSolMgr< ScalarType, MV, OP >, Belos::PseudoBlockCGSolMgr< ScalarType, MV, OP, true >, Belos::Details::RealSolverManager< ScalarType, MV, OP, true >, Belos::BlockGCRODRSolMgr< ScalarType, MV, OP >, Belos::BlockGmresSolMgr< ScalarType, MV, OP >, Belos::FixedPointSolMgr< ScalarType, MV, OP >, Belos::PseudoBlockTFQMRSolMgr< ScalarType, MV, OP >, Belos::TFQMRSolMgr< ScalarType, MV, OP >, Belos::BiCGStabSolMgr< ScalarType, MV, OP >, and Belos::PseudoBlockStochasticCGSolMgr< ScalarType, MV, OP >.


The documentation for this class was generated from the following file:

Generated on Fri Dec 20 2024 09:24:50 for Belos by doxygen 1.8.5