Belos
Version of the Day
|
MINRES linear solver solution manager. More...
#include <BelosMinresSolMgr.hpp>
Public Member Functions | |
Constructors/Destructor | |
MinresSolMgr () | |
Default constructor. More... | |
MinresSolMgr (const Teuchos::RCP< LinearProblem< ScalarType, MV, OP > > &problem, const Teuchos::RCP< Teuchos::ParameterList > ¶ms) | |
Basic constructor for MinresSolMgr. More... | |
virtual | ~MinresSolMgr () |
Destructor. More... | |
Teuchos::RCP< SolverManager < ScalarType, MV, OP > > | clone () const override |
clone for Inverted Injection (DII) More... | |
Accessor methods | |
const LinearProblem < ScalarType, MV, OP > & | getProblem () const override |
Return the linear problem to be solved. More... | |
Teuchos::RCP< const Teuchos::ParameterList > | getValidParameters () const override |
Return the list of default parameters for this object. More... | |
Teuchos::RCP< const Teuchos::ParameterList > | getCurrentParameters () const override |
Return the list of current parameters for this object. More... | |
Teuchos::Array< Teuchos::RCP < Teuchos::Time > > | getTimers () const |
Return all timers for this object. More... | |
MagnitudeType | achievedTol () const override |
Tolerance achieved by the last solve() invocation. More... | |
int | getNumIters () const override |
Get the iteration count for the most recent call to solve() . More... | |
bool | isLOADetected () const override |
Whether a loss of accuracy was detected in the solver. More... | |
Set methods (overridden from \c SolverManager) | |
void | setProblem (const Teuchos::RCP< LinearProblem< ScalarType, MV, OP > > &problem) override |
Set the linear problem that needs to be solved. More... | |
void | setParameters (const Teuchos::RCP< Teuchos::ParameterList > ¶ms) override |
Set the parameters to use when solving the linear problem. More... | |
Reset methods (overridden from \c SolverManager) | |
void | reset (const ResetType type) override |
Reset the solver manager. More... | |
Solver application methods (overridden from \c SolverManager) | |
ReturnType | solve () override |
Iterate until the status test tells us to stop. More... | |
Overridden from Teuchos::Describable | |
std::string | description () const override |
Public Member Functions inherited from Belos::SolverManager< ScalarType, MV, OP > | |
SolverManager () | |
Empty constructor. More... | |
virtual | ~SolverManager () |
Destructor. 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... | |
Public Member Functions inherited from Teuchos::Describable | |
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) |
MinresSolMgr Exceptions | |
static Teuchos::RCP< const Teuchos::ParameterList > | defaultParameters () |
List of valid MINRES parameters and their default values. More... | |
Additional Inherited Members | |
Static Public Attributes inherited from Teuchos::Describable | |
static const EVerbosityLevel | verbLevel_default |
MINRES linear solver solution manager.
The Minimal Residual Method (MINRES) is a Krylov subspace method for solving symmetric (in real arithmetic, or Hermitian in complex arithmetic), nonsingular, but possibly indefinite linear systems
Definition at line 115 of file BelosMinresSolMgr.hpp.
Belos::MinresSolMgr< ScalarType, MV, OP >::MinresSolMgr | ( | ) |
Default constructor.
This constructor takes no arguments and sets the default values for the solver. The linear problem must be passed in using setProblem() before solve() is called on this object, otherwise an exception is thrown. The solver's parameters (which this constructor sets to their default values) may be changed using setParameters().
Definition at line 457 of file BelosMinresSolMgr.hpp.
Belos::MinresSolMgr< ScalarType, MV, OP >::MinresSolMgr | ( | const Teuchos::RCP< LinearProblem< ScalarType, MV, OP > > & | problem, |
const Teuchos::RCP< Teuchos::ParameterList > & | params | ||
) |
Basic constructor for MinresSolMgr.
problem | [in/out] The LinearProblem to be solved |
params | [in/out] Parameter list of options for the solver manager. Parameters not provided will be filled in with default values. These are the options accepted by the solver manager:
|
We accept the "Num Blocks" parameter for compatibility with other Belos solvers, but ignore it, since it is not relevant to MINRES. ("Num Blocks" specifies the restart length, but our MINRES implementation does not restart.)
Definition at line 474 of file BelosMinresSolMgr.hpp.
|
inlinevirtual |
Destructor.
Definition at line 187 of file BelosMinresSolMgr.hpp.
|
static |
List of valid MINRES parameters and their default values.
One way to set up this solver manager with nondefault parameters, is to make a deep non-const copy of the default parameters, and change the parameters you want to change.
Definition at line 404 of file BelosMinresSolMgr.hpp.
|
inlineoverridevirtual |
clone for Inverted Injection (DII)
Implements Belos::SolverManager< ScalarType, MV, OP >.
Definition at line 190 of file BelosMinresSolMgr.hpp.
|
inlineoverridevirtual |
Return the linear problem to be solved.
Implements Belos::SolverManager< ScalarType, MV, OP >.
Definition at line 199 of file BelosMinresSolMgr.hpp.
|
inlineoverridevirtual |
Return the list of default parameters for this object.
Implements Belos::SolverManager< ScalarType, MV, OP >.
Definition at line 204 of file BelosMinresSolMgr.hpp.
|
inlineoverridevirtual |
Return the list of current parameters for this object.
Implements Belos::SolverManager< ScalarType, MV, OP >.
Definition at line 212 of file BelosMinresSolMgr.hpp.
|
inline |
Return all timers for this object.
Currently only one timer is being used, which is the total time spent in the solve()
routine. Thus, the returned Array currently has only one element.
setParameters()
has not yet been called, or if you change the timer label, that invalidates the pointer timer(s). Definition at line 225 of file BelosMinresSolMgr.hpp.
|
inlineoverridevirtual |
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.
Reimplemented from Belos::SolverManager< ScalarType, MV, OP >.
Definition at line 234 of file BelosMinresSolMgr.hpp.
|
inlineoverridevirtual |
Get the iteration count for the most recent call to solve()
.
Implements Belos::SolverManager< ScalarType, MV, OP >.
Definition at line 239 of file BelosMinresSolMgr.hpp.
|
inlineoverridevirtual |
Whether a loss of accuracy was detected in the solver.
Implements Belos::SolverManager< ScalarType, MV, OP >.
Definition at line 248 of file BelosMinresSolMgr.hpp.
|
inlineoverridevirtual |
Set the linear problem that needs to be solved.
Implements Belos::SolverManager< ScalarType, MV, OP >.
Definition at line 256 of file BelosMinresSolMgr.hpp.
|
overridevirtual |
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. Implements Belos::SolverManager< ScalarType, MV, OP >.
Definition at line 512 of file BelosMinresSolMgr.hpp.
|
inlineoverridevirtual |
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.
Implements Belos::SolverManager< ScalarType, MV, OP >.
Definition at line 270 of file BelosMinresSolMgr.hpp.
|
overridevirtual |
Iterate until the status test tells us to stop.
This method implements SolverManager::solve() (which see).
MINRES' implementation of this method invokes MinresIter::iterate()
, which will return either because a specially constructed status test that evaluates to Passed, or an std::exception is thrown.
A return from MinresIter::iterate() signifies one of the following scenarios:
Implements Belos::SolverManager< ScalarType, MV, OP >.
Definition at line 675 of file BelosMinresSolMgr.hpp.
|
overridevirtual |
Reimplemented from Teuchos::Describable.
Definition at line 839 of file BelosMinresSolMgr.hpp.