The Belos::FixedPointSolMgr provides a powerful and fully-featured solver manager over the FixedPoint linear solver.
More...
#include <BelosFixedPointSolMgr.hpp>
|
Teuchos::RCP< LinearProblem< ScalarType, MV, OP > > | problem_ |
| The linear problem to solve.
|
|
Teuchos::RCP< OutputManager< ScalarType > > | printer_ |
| Output manager, that handles printing of different kinds of messages.
|
|
Teuchos::RCP< std::ostream > | outputStream_ |
| Output stream to which the output manager prints.
|
|
Teuchos::RCP< StatusTest< ScalarType, MV, OP > > | sTest_ |
| Aggregate stopping criterion.
|
|
Teuchos::RCP< StatusTestMaxIters< ScalarType, MV, OP > > | maxIterTest_ |
| Maximum iteration count stopping criterion.
|
|
Teuchos::RCP< StatusTestResNorm< ScalarType, MV, OP > > | convTest_ |
| Convergence stopping criterion.
|
|
Teuchos::RCP< StatusTestOutput< ScalarType, MV, OP > > | outputTest_ |
| Output "status test" that controls all the other status tests.
|
|
Teuchos::RCP< Teuchos::ParameterList > | params_ |
| Current parameter list.
|
|
MagnitudeType | convtol_ |
| Convergence tolerance (read from parameter list).
|
|
MagnitudeType | achievedTol_ |
| Tolerance achieved by the last solve() invocation.
|
|
int | maxIters_ |
| Maximum iteration count (read from parameter list).
|
|
int | numIters_ |
| Number of iterations taken by the last solve() invocation.
|
|
int | blockSize_ |
|
int | verbosity_ |
|
int | outputStyle_ |
|
int | outputFreq_ |
|
bool | showMaxResNormOnly_ |
|
std::string | label_ |
| Prefix label for all the timers.
|
|
Teuchos::RCP< Teuchos::Time > | timerSolve_ |
| Solve timer.
|
|
bool | isSet_ |
| Whether or not the parameters have been set (via setParameters() ).
|
|
static constexpr int | maxIters_default_ = 1000 |
|
static constexpr bool | showMaxResNormOnly_default_ = false |
|
static constexpr int | blockSize_default_ = 1 |
|
static constexpr int | verbosity_default_ = Belos::Errors |
|
static constexpr int | outputStyle_default_ = Belos::General |
|
static constexpr int | outputFreq_default_ = -1 |
|
static constexpr const char * | label_default_ = "Belos" |
|
std::string | description () const override |
| Method to return description of the block CG solver manager.
|
|
|
const LinearProblem< ScalarType, MV, OP > & | getProblem () const override |
| Return a reference to the linear problem being solved by this solver manager.
|
|
Teuchos::RCP< const Teuchos::ParameterList > | getValidParameters () const override |
| Get a parameter list containing the valid parameters for this object.
|
|
Teuchos::RCP< const Teuchos::ParameterList > | getCurrentParameters () const override |
| Get a parameter list containing the current parameters for this object.
|
|
Teuchos::Array< Teuchos::RCP< Teuchos::Time > > | getTimers () const |
| Return the timers for this object.
|
|
MagnitudeType | achievedTol () const override |
| Tolerance achieved by the last solve() invocation.
|
|
int | getNumIters () const override |
| Get the iteration count for the most recent call to solve() .
|
|
bool | isLOADetected () const override |
| Return whether a loss of accuracy was detected by this solver during the most current solve.
|
|
|
void | setProblem (const Teuchos::RCP< LinearProblem< ScalarType, MV, OP > > &problem) override |
| Set the linear problem that needs to be solved.
|
|
void | setParameters (const Teuchos::RCP< Teuchos::ParameterList > ¶ms) override |
| Set the parameters the solver manager should use to solve the linear problem.
|
|
void | replaceUserConvStatusTest (const Teuchos::RCP< StatusTestResNorm< ScalarType, MV, OP > > &userConvStatusTest) |
| Set user-defined convergence status test.
|
|
|
void | reset (const ResetType type) override |
| Performs a reset of the solver manager specified by the ResetType . 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.
|
|
|
ReturnType | solve () override |
| 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) or the solver manager decides to quit.
|
|
template<class ScalarType, class MV, class OP>
class Belos::FixedPointSolMgr< ScalarType, MV, OP >
The Belos::FixedPointSolMgr provides a powerful and fully-featured solver manager over the FixedPoint linear solver.
Definition at line 91 of file BelosFixedPointSolMgr.hpp.
◆ MVT
template<class ScalarType , class MV , class OP >
◆ OPT
template<class ScalarType , class MV , class OP >
◆ SCT
template<class ScalarType , class MV , class OP >
◆ MagnitudeType
template<class ScalarType , class MV , class OP >
typedef Teuchos::ScalarTraits<ScalarType>::magnitudeType Belos::FixedPointSolMgr< ScalarType, MV, OP >::MagnitudeType |
|
private |
◆ MT
template<class ScalarType , class MV , class OP >
◆ FixedPointSolMgr() [1/2]
template<class ScalarType , class MV , class OP >
◆ FixedPointSolMgr() [2/2]
template<class ScalarType , class MV , class OP >
Belos::FixedPointSolMgr< ScalarType, MV, OP >::FixedPointSolMgr |
( |
const Teuchos::RCP< LinearProblem< ScalarType, MV, OP > > & |
problem, |
|
|
const Teuchos::RCP< Teuchos::ParameterList > & |
pl |
|
) |
| |
Basic constructor for FixedPointSolMgr.
This constructor accepts the LinearProblem to be solved in addition to a parameter list of options for the solver manager. These options include the following:
- "Block Size" - an
int
specifying the block size to be used by the underlying block conjugate-gradient solver. Default: 1
- "Verbosity" - a sum of MsgType specifying the verbosity. Default: Belos::Errors
- "Output Style" - a OutputType specifying the style of output. Default: Belos::General
- "Output Stream" - a reference-counted pointer to the output stream where all solver output is sent. Default: Teuchos::rcp(&std::cout,false)
- "Output Frequency" - an
int
specifying how often convergence information should be outputted. Default: -1 (never)
- "Show Maximum Residual Norm Only" - a
bool
specifying whether that only the maximum relative residual norm is printed if convergence information is printed. Default: false
- "Timer Label" - a
std::string
to use as a prefix for the timer labels. Default: "Belos"
Definition at line 343 of file BelosFixedPointSolMgr.hpp.
◆ ~FixedPointSolMgr()
template<class ScalarType , class MV , class OP >
◆ clone()
template<class ScalarType , class MV , class OP >
◆ getProblem()
template<class ScalarType , class MV , class OP >
◆ getValidParameters()
template<class ScalarType , class MV , class OP >
◆ getCurrentParameters()
template<class ScalarType , class MV , class OP >
Teuchos::RCP< const Teuchos::ParameterList > Belos::FixedPointSolMgr< ScalarType, MV, OP >::getCurrentParameters |
( |
| ) |
const |
|
inlineoverridevirtual |
◆ getTimers()
template<class ScalarType , class MV , class OP >
◆ achievedTol()
template<class ScalarType , class MV , class OP >
◆ getNumIters()
template<class ScalarType , class MV , class OP >
◆ isLOADetected()
template<class ScalarType , class MV , class OP >
◆ setProblem()
template<class ScalarType , class MV , class OP >
◆ setParameters()
template<class ScalarType , class MV , class OP >
void Belos::FixedPointSolMgr< ScalarType, MV, OP >::setParameters |
( |
const Teuchos::RCP< Teuchos::ParameterList > & |
params | ) |
|
|
overridevirtual |
◆ replaceUserConvStatusTest()
template<class ScalarType , class MV , class OP >
◆ reset()
template<class ScalarType , class MV , class OP >
◆ solve()
template<class ScalarType , class MV , class OP >
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) or the solver manager decides to quit.
This method calls FixedPointIter::iterate() or CGIter::iterate(), which will return either because a specially constructed status test evaluates to Passed or an std::exception is thrown.
A return from FixedPointIter::iterate() signifies one of the following scenarios:
- the maximum number of iterations has been exceeded. In this scenario, the current solutions to the linear system will be placed in the linear problem and return Unconverged.
- global convergence has been met. In this case, the current solutions to the linear system will be placed in the linear problem and the solver manager will return Converged
- Returns
- ReturnType specifying:
- Converged: the linear problem was solved to the specification required by the solver manager.
- Unconverged: the linear problem was not solved to the specification desired by the solver manager.
Implements Belos::SolverManager< ScalarType, MV, OP >.
Definition at line 586 of file BelosFixedPointSolMgr.hpp.
◆ description()
template<class ScalarType , class MV , class OP >
◆ problem_
template<class ScalarType , class MV , class OP >
◆ printer_
template<class ScalarType , class MV , class OP >
◆ outputStream_
template<class ScalarType , class MV , class OP >
◆ sTest_
template<class ScalarType , class MV , class OP >
Aggregate stopping criterion.
This is an OR combination of the maximum iteration count test (maxIterTest_
) and convergence test (convTest_
).
Definition at line 264 of file BelosFixedPointSolMgr.hpp.
◆ maxIterTest_
template<class ScalarType , class MV , class OP >
◆ convTest_
template<class ScalarType , class MV , class OP >
◆ outputTest_
template<class ScalarType , class MV , class OP >
◆ params_
template<class ScalarType , class MV , class OP >
◆ maxIters_default_
template<class ScalarType , class MV , class OP >
◆ showMaxResNormOnly_default_
template<class ScalarType , class MV , class OP >
◆ blockSize_default_
template<class ScalarType , class MV , class OP >
◆ verbosity_default_
template<class ScalarType , class MV , class OP >
◆ outputStyle_default_
template<class ScalarType , class MV , class OP >
◆ outputFreq_default_
template<class ScalarType , class MV , class OP >
◆ label_default_
template<class ScalarType , class MV , class OP >
◆ convtol_
template<class ScalarType , class MV , class OP >
◆ achievedTol_
template<class ScalarType , class MV , class OP >
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.
Definition at line 301 of file BelosFixedPointSolMgr.hpp.
◆ maxIters_
template<class ScalarType , class MV , class OP >
◆ numIters_
template<class ScalarType , class MV , class OP >
◆ blockSize_
template<class ScalarType , class MV , class OP >
◆ verbosity_
template<class ScalarType , class MV , class OP >
◆ outputStyle_
template<class ScalarType , class MV , class OP >
◆ outputFreq_
template<class ScalarType , class MV , class OP >
◆ showMaxResNormOnly_
template<class ScalarType , class MV , class OP >
◆ label_
template<class ScalarType , class MV , class OP >
◆ timerSolve_
template<class ScalarType , class MV , class OP >
◆ isSet_
template<class ScalarType , class MV , class OP >
The documentation for this class was generated from the following file: