Belos Package Browser (Single Doxygen Collection)
Development
|
The Belos::SolverManager is a templated virtual base class that defines the basic interface that any solver manager will support. More...
#include <BelosSolverManager.hpp>
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 > ¶ms)=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... | |
Additional Inherited Members | |
Public Member Functions inherited from Teuchos::Describable | |
DescribableStreamManipulatorState | describe (const Describable &describable, const EVerbosityLevel verbLevel=Describable::verbLevel_default) |
std::ostream & | operator<< (std::ostream &os, const DescribableStreamManipulatorState &d) |
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 |
Static Public Attributes inherited from Teuchos::Describable | |
static const EVerbosityLevel | verbLevel_default |
The Belos::SolverManager is a templated virtual base class that defines the basic interface that any solver manager will support.
Definition at line 72 of file BelosSolverManager.hpp.
|
inline |
Empty constructor.
Definition at line 80 of file BelosSolverManager.hpp.
|
inlinevirtual |
Destructor.
Definition at line 83 of file BelosSolverManager.hpp.
|
pure virtual |
clone the solver manager.
Implements the DII inversion and injection pattern
Implemented in Belos::LSQRSolMgr< ScalarType, MV, OP, false >, 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::PseudoBlockCGSolMgr< ScalarType, MV, OP, true >, Belos::BlockGmresSolMgr< ScalarType, MV, OP >, Belos::PseudoBlockTFQMRSolMgr< ScalarType, MV, OP >, Belos::TFQMRSolMgr< ScalarType, MV, OP >, Belos::BiCGStabSolMgr< ScalarType, MV, OP >, Belos::FixedPointSolMgr< ScalarType, MV, OP >, and Belos::PseudoBlockStochasticCGSolMgr< ScalarType, MV, OP >.
|
pure virtual |
Return a reference to the linear problem being solved by this solver manager.
Implemented in Belos::Details::SolverManagerRequiresRealLapack< ScalarType, MV, OP, false >, Belos::Details::SolverManagerRequiresLapack< ScalarType, MV, OP, false >, Belos::LSQRSolMgr< ScalarType, MV, OP, false >, Belos::GCRODRSolMgr< ScalarType, MV, OP, true >, Belos::PseudoBlockGmresSolMgr< ScalarType, MV, OP >, Belos::PCPGSolMgr< ScalarType, MV, OP, true >, Belos::Details::RealSolverManager< 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::BlockGCRODRSolMgr< ScalarType, MV, OP >, Belos::PseudoBlockCGSolMgr< ScalarType, MV, OP, true >, Belos::BlockGmresSolMgr< ScalarType, MV, OP >, Belos::PseudoBlockTFQMRSolMgr< ScalarType, MV, OP >, Belos::TFQMRSolMgr< ScalarType, MV, OP >, Belos::BiCGStabSolMgr< ScalarType, MV, OP >, Belos::FixedPointSolMgr< ScalarType, MV, OP >, and Belos::PseudoBlockStochasticCGSolMgr< ScalarType, MV, OP >.
|
pure virtual |
Return the valid parameters for this solver manager.
Implemented in Belos::Details::SolverManagerRequiresRealLapack< ScalarType, MV, OP, false >, Belos::Details::SolverManagerRequiresLapack< ScalarType, MV, OP, false >, Belos::LSQRSolMgr< ScalarType, MV, OP, false >, Belos::GCRODRSolMgr< ScalarType, MV, OP, true >, Belos::PseudoBlockGmresSolMgr< ScalarType, MV, OP >, Belos::PCPGSolMgr< ScalarType, MV, OP, true >, Belos::Details::RealSolverManager< 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::BlockGCRODRSolMgr< ScalarType, MV, OP >, Belos::PseudoBlockCGSolMgr< ScalarType, MV, OP, true >, Belos::BlockGmresSolMgr< ScalarType, MV, OP >, Belos::PseudoBlockTFQMRSolMgr< ScalarType, MV, OP >, Belos::TFQMRSolMgr< ScalarType, MV, OP >, Belos::BiCGStabSolMgr< ScalarType, MV, OP >, Belos::FixedPointSolMgr< ScalarType, MV, OP >, and Belos::PseudoBlockStochasticCGSolMgr< ScalarType, MV, OP >.
|
pure virtual |
Return the current parameters being used for this solver manager.
Implemented in Belos::Details::SolverManagerRequiresRealLapack< ScalarType, MV, OP, false >, Belos::Details::SolverManagerRequiresLapack< ScalarType, MV, OP, false >, Belos::LSQRSolMgr< ScalarType, MV, OP, false >, Belos::GCRODRSolMgr< ScalarType, MV, OP, true >, Belos::PseudoBlockGmresSolMgr< ScalarType, MV, OP >, Belos::PCPGSolMgr< ScalarType, MV, OP, true >, Belos::Details::RealSolverManager< 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::BlockGCRODRSolMgr< ScalarType, MV, OP >, Belos::PseudoBlockCGSolMgr< ScalarType, MV, OP, true >, Belos::BlockGmresSolMgr< ScalarType, MV, OP >, Belos::PseudoBlockTFQMRSolMgr< ScalarType, MV, OP >, Belos::TFQMRSolMgr< ScalarType, MV, OP >, Belos::BiCGStabSolMgr< ScalarType, MV, OP >, Belos::FixedPointSolMgr< ScalarType, MV, OP >, and Belos::PseudoBlockStochasticCGSolMgr< ScalarType, MV, OP >.
|
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::MinresSolMgr< ScalarType, MV, OP >, Belos::PseudoBlockCGSolMgr< ScalarType, MV, OP, true >, Belos::BlockGmresSolMgr< ScalarType, MV, OP >, Belos::BlockGCRODRSolMgr< ScalarType, MV, OP >, Belos::BiCGStabSolMgr< ScalarType, MV, OP >, Belos::PseudoBlockTFQMRSolMgr< ScalarType, MV, OP >, Belos::TFQMRSolMgr< ScalarType, MV, OP >, and Belos::FixedPointSolMgr< ScalarType, MV, OP >.
Definition at line 114 of file BelosSolverManager.hpp.
|
pure virtual |
Get the iteration count for the most recent call to solve()
.
Implemented in Belos::Details::SolverManagerRequiresRealLapack< ScalarType, MV, OP, false >, Belos::Details::SolverManagerRequiresLapack< ScalarType, MV, OP, false >, Belos::LSQRSolMgr< ScalarType, MV, OP, false >, 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::Details::RealSolverManager< ScalarType, MV, OP, true >, Belos::MinresSolMgr< ScalarType, MV, OP >, Belos::PseudoBlockCGSolMgr< ScalarType, MV, OP, true >, Belos::GmresPolySolMgr< ScalarType, MV, OP >, Belos::BlockGmresSolMgr< ScalarType, MV, OP >, Belos::BlockGCRODRSolMgr< ScalarType, MV, OP >, Belos::BiCGStabSolMgr< ScalarType, MV, OP >, Belos::PseudoBlockTFQMRSolMgr< ScalarType, MV, OP >, Belos::TFQMRSolMgr< ScalarType, MV, OP >, Belos::FixedPointSolMgr< ScalarType, MV, OP >, and Belos::PseudoBlockStochasticCGSolMgr< ScalarType, MV, OP >.
|
pure virtual |
Returns whether a loss of accuracy was detected in the solver.
Implemented in Belos::Details::SolverManagerRequiresRealLapack< ScalarType, MV, OP, false >, Belos::LSQRSolMgr< ScalarType, MV, OP, false >, Belos::Details::SolverManagerRequiresLapack< ScalarType, MV, OP, false >, Belos::PseudoBlockGmresSolMgr< ScalarType, MV, OP >, Belos::GCRODRSolMgr< ScalarType, MV, OP, true >, Belos::PCPGSolMgr< ScalarType, MV, OP, true >, Belos::BlockCGSolMgr< ScalarType, MV, OP, true >, Belos::RCGSolMgr< ScalarType, MV, OP, true >, Belos::Details::RealSolverManager< ScalarType, MV, OP, true >, Belos::MinresSolMgr< ScalarType, MV, OP >, Belos::PseudoBlockCGSolMgr< ScalarType, MV, OP, true >, Belos::GmresPolySolMgr< ScalarType, MV, OP >, Belos::BlockGmresSolMgr< ScalarType, MV, OP >, Belos::BlockGCRODRSolMgr< ScalarType, MV, OP >, Belos::BiCGStabSolMgr< ScalarType, MV, OP >, Belos::PseudoBlockTFQMRSolMgr< ScalarType, MV, OP >, Belos::TFQMRSolMgr< ScalarType, MV, OP >, Belos::FixedPointSolMgr< ScalarType, MV, OP >, and Belos::PseudoBlockStochasticCGSolMgr< ScalarType, MV, OP >.
|
pure virtual |
Set the linear problem that needs to be solved.
Implemented in Belos::Details::SolverManagerRequiresRealLapack< ScalarType, MV, OP, false >, Belos::LSQRSolMgr< ScalarType, MV, OP, false >, Belos::Details::SolverManagerRequiresLapack< ScalarType, MV, OP, false >, Belos::PseudoBlockGmresSolMgr< ScalarType, MV, OP >, Belos::GCRODRSolMgr< ScalarType, MV, OP, true >, Belos::PCPGSolMgr< ScalarType, MV, OP, true >, Belos::BlockCGSolMgr< ScalarType, MV, OP, true >, Belos::RCGSolMgr< ScalarType, MV, OP, true >, Belos::Details::RealSolverManager< ScalarType, MV, OP, true >, Belos::MinresSolMgr< ScalarType, MV, OP >, Belos::PseudoBlockCGSolMgr< ScalarType, MV, OP, true >, Belos::GmresPolySolMgr< ScalarType, MV, OP >, Belos::BlockGmresSolMgr< ScalarType, MV, OP >, Belos::BlockGCRODRSolMgr< ScalarType, MV, OP >, Belos::BiCGStabSolMgr< ScalarType, MV, OP >, Belos::PseudoBlockTFQMRSolMgr< ScalarType, MV, OP >, Belos::TFQMRSolMgr< ScalarType, MV, OP >, Belos::FixedPointSolMgr< ScalarType, MV, OP >, and Belos::PseudoBlockStochasticCGSolMgr< ScalarType, MV, OP >.
|
pure virtual |
Set the parameters to use when solving the linear problem.
params | [in/out] List of parameters to use when solving the linear problem. This list will be modified as necessary to include default parameters that need not be provided. If params is null, then this method uses default parameters. |
getValidParameters()
has all the parameters that the solver understands, possibly including human-readable documentation and validators. Implemented in Belos::Details::SolverManagerRequiresRealLapack< ScalarType, MV, OP, false >, Belos::LSQRSolMgr< ScalarType, MV, OP, false >, Belos::Details::SolverManagerRequiresLapack< ScalarType, MV, OP, false >, Belos::PseudoBlockGmresSolMgr< ScalarType, MV, OP >, Belos::GCRODRSolMgr< ScalarType, MV, OP, true >, Belos::PCPGSolMgr< ScalarType, MV, OP, true >, Belos::BlockCGSolMgr< ScalarType, MV, OP, true >, Belos::RCGSolMgr< ScalarType, MV, OP, true >, Belos::Details::RealSolverManager< ScalarType, MV, OP, true >, Belos::MinresSolMgr< ScalarType, MV, OP >, Belos::PseudoBlockCGSolMgr< ScalarType, MV, OP, true >, Belos::GmresPolySolMgr< ScalarType, MV, OP >, Belos::BlockGCRODRSolMgr< ScalarType, MV, OP >, Belos::BlockGmresSolMgr< ScalarType, MV, OP >, Belos::BiCGStabSolMgr< ScalarType, MV, OP >, Belos::PseudoBlockTFQMRSolMgr< ScalarType, MV, OP >, Belos::TFQMRSolMgr< ScalarType, MV, OP >, Belos::FixedPointSolMgr< ScalarType, MV, OP >, and Belos::PseudoBlockStochasticCGSolMgr< ScalarType, MV, OP >.
|
inlinevirtual |
Set user-defined convergence status test.
Reimplemented in Belos::PseudoBlockGmresSolMgr< ScalarType, MV, OP >.
Definition at line 147 of file BelosSolverManager.hpp.
|
inlinevirtual |
Set user-defined debug status test.
Reimplemented in Belos::PseudoBlockGmresSolMgr< ScalarType, MV, OP >, and Belos::BlockGmresSolMgr< ScalarType, MV, OP >.
Definition at line 158 of file BelosSolverManager.hpp.
|
pure virtual |
Reset the solver manager.
Reset the solver manager in a way specified by the ResetType
parameter. This informs the solver manager that the solver should prepare for the next call to solve by resetting certain elements of the iterative solver strategy.
Implemented in Belos::Details::SolverManagerRequiresRealLapack< ScalarType, MV, OP, false >, Belos::LSQRSolMgr< ScalarType, MV, OP, false >, Belos::Details::SolverManagerRequiresLapack< ScalarType, MV, OP, false >, Belos::PseudoBlockGmresSolMgr< ScalarType, MV, OP >, Belos::GCRODRSolMgr< ScalarType, MV, OP, true >, Belos::PCPGSolMgr< ScalarType, MV, OP, true >, Belos::RCGSolMgr< ScalarType, MV, OP, true >, Belos::BlockCGSolMgr< ScalarType, MV, OP, true >, Belos::Details::RealSolverManager< ScalarType, MV, OP, true >, Belos::MinresSolMgr< ScalarType, MV, OP >, Belos::PseudoBlockCGSolMgr< ScalarType, MV, OP, true >, Belos::GmresPolySolMgr< ScalarType, MV, OP >, Belos::BlockGCRODRSolMgr< ScalarType, MV, OP >, Belos::BlockGmresSolMgr< ScalarType, MV, OP >, Belos::BiCGStabSolMgr< ScalarType, MV, OP >, Belos::FixedPointSolMgr< ScalarType, MV, OP >, Belos::PseudoBlockTFQMRSolMgr< ScalarType, MV, OP >, Belos::TFQMRSolMgr< ScalarType, MV, OP >, and Belos::PseudoBlockStochasticCGSolMgr< ScalarType, MV, OP >.
|
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.
Belos::ReturnType
enum specifying: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::BlockCGSolMgr< ScalarType, MV, OP, true >, Belos::MinresSolMgr< ScalarType, MV, OP >, Belos::PseudoBlockCGSolMgr< ScalarType, MV, OP, true >, Belos::GmresPolySolMgr< ScalarType, MV, OP >, Belos::Details::RealSolverManager< ScalarType, MV, OP, true >, Belos::BlockGCRODRSolMgr< ScalarType, MV, OP >, Belos::BlockGmresSolMgr< ScalarType, MV, OP >, Belos::BiCGStabSolMgr< ScalarType, MV, OP >, Belos::FixedPointSolMgr< ScalarType, MV, OP >, Belos::PseudoBlockTFQMRSolMgr< ScalarType, MV, OP >, Belos::TFQMRSolMgr< ScalarType, MV, OP >, and Belos::PseudoBlockStochasticCGSolMgr< ScalarType, MV, OP >.