#include <Belos_StatusTest_GenResNorm_MP_Vector.hpp>
Inherits StatusTestResNorm< Sacado::MP::Vector< Storage >, MV, OP >.
|
StatusType | checkStatus (Iteration< ScalarType, MV, OP > *iSolver) |
| Check convergence status: Passed, Failed, or Undefined. More...
|
|
StatusType | getStatus () const |
| Return the result of the most recent CheckStatus call. More...
|
|
|
void | reset () |
| Resets the internal configuration to the initial state. More...
|
|
|
void | print (std::ostream &os, int indent=0) const |
| Output formatted description of stopping test to output stream. More...
|
|
void | printStatus (std::ostream &os, StatusType type) const |
| Print message for each status specific to this stopping test. More...
|
|
|
std::string | description () const |
| Method to return description of the maximum iteration status test. More...
|
|
template<class Storage, class MV, class OP>
class Belos::StatusTestGenResNorm< Sacado::MP::Vector< Storage >, MV, OP >
Definition at line 85 of file Belos_StatusTest_GenResNorm_MP_Vector.hpp.
◆ ScalarType
template<class Storage , class MV , class OP >
◆ SCT
template<class Storage , class MV , class OP >
◆ MagnitudeType
template<class Storage , class MV , class OP >
◆ MVT
template<class Storage , class MV , class OP >
◆ ResType
template<class Storage , class MV , class OP >
Select how the residual std::vector is produced.
Enumerator |
---|
Implicit | Use the residual std::vector produced by the iterative solver.
|
Explicit | Explicitly compute the residual std::vector r = b - A*x using the linear problem.
|
Definition at line 102 of file Belos_StatusTest_GenResNorm_MP_Vector.hpp.
◆ StatusTestGenResNorm()
template<class Storage , class MV , class OP >
Constructor.
The constructor takes a single argument specifying the tolerance (
). If none of the form definition methods are called, we use
as the stopping criterion, where
uses the least costly form of the 2-norm of residual available from the iterative method and
is the corresponding norm of the initial residual. The least costly form of the 2-norm depends on the chosen iterative method. Most Krylov methods produce the preconditioned residual std::vector in a form that would be exact in infinite precision arithmetic. This std::vector may be different from the true residual either because left preconditioning was used, or because round-off error has introduced significant error, or both.
You can also state the number of vectors that must pass the convergence criteria before the status test passes by using the quorum
argument.
◆ ~StatusTestGenResNorm()
template<class Storage , class MV , class OP >
◆ defineResForm()
template<class Storage , class MV , class OP >
Define form of the residual, its norm and optional weighting std::vector.
This method defines the form of
. We specify:
-
Whether the residual std::vector should be explicitly computed, or taken from the iterative method.
-
The norm to be used on the residual (this may be different than the norm used in DefineScaleForm()).
◆ defineScaleForm()
template<class Storage , class MV , class OP >
Define form of the scaling, its norm, its optional weighting std::vector, or, alternatively, define an explicit value.
This method defines the form of how the residual is scaled (if at all). It operates in two modes:
-
User-provided scaling value:
-
Set argument TypeOfScaling to UserProvided.
-
Set ScaleValue to a non-zero value that the residual norm will be divided by.
-
TypeOfNorm argument will be ignored.
-
Sample use: Define ScaleValue =
where
is the matrix of the linear problem.
-
Use a supported Scaling Form:
-
Define TypeOfScaling to be the norm of the right hand side, the initial residual std::vector, or to none.
-
Define norm to be used on the scaling std::vector (this may be different than the norm used in DefineResForm()).
◆ getResNormType()
template<class Storage , class MV , class OP >
◆ setTolerance()
template<class Storage , class MV , class OP >
Set the value of the tolerance.
We allow the tolerance to be reset for cases where, in the process of testing the residual, we find that the initial tolerance was too tight or too lax.
Definition at line 173 of file Belos_StatusTest_GenResNorm_MP_Vector.hpp.
◆ setQuorum()
template<class Storage , class MV , class OP >
Sets the number of residuals that must pass the convergence test before Passed is returned.
- Note
- If
quorum=-1
then all residuals must pass the convergence test before Passed is returned.
Definition at line 177 of file Belos_StatusTest_GenResNorm_MP_Vector.hpp.
◆ setShowMaxResNormOnly()
template<class Storage , class MV , class OP >
◆ checkStatus()
template<class Storage , class MV , class OP >
Check convergence status: Passed, Failed, or Undefined.
This method checks to see if the convergence criteria are met. Depending on how the residual test is constructed this method will return the appropriate status type.
- Returns
- StatusType: Passed, Failed, or Undefined.
◆ getStatus()
template<class Storage , class MV , class OP >
◆ reset()
template<class Storage , class MV , class OP >
Resets the internal configuration to the initial state.
◆ print()
template<class Storage , class MV , class OP >
Output formatted description of stopping test to output stream.
◆ printStatus()
template<class Storage , class MV , class OP >
Print message for each status specific to this stopping test.
◆ getSolution()
template<class Storage , class MV , class OP >
Returns the current solution estimate that was computed for the most recent residual test.
- Note
- This is useful for explicit residual tests, if this test is an implicit residual test a null pointer will be returned.
Definition at line 223 of file Belos_StatusTest_GenResNorm_MP_Vector.hpp.
◆ getQuorum()
template<class Storage , class MV , class OP >
Returns the number of residuals that must pass the convergence test before Passed is returned.
- Note
- If
quorum=-1
then all residuals must pass the convergence test before Passed is returned.
Definition at line 227 of file Belos_StatusTest_GenResNorm_MP_Vector.hpp.
◆ getShowMaxResNormOnly()
template<class Storage , class MV , class OP >
◆ convIndices()
template<class Storage , class MV , class OP >
◆ getTolerance()
template<class Storage , class MV , class OP >
◆ getTestValue()
template<class Storage , class MV , class OP >
◆ getResNormValue()
template<class Storage , class MV , class OP >
◆ getScaledNormValue()
template<class Storage , class MV , class OP >
◆ getLOADetected()
template<class Storage , class MV , class OP >
Returns a boolean indicating a loss of accuracy has been detected in computing the residual.
- Note
- This status test does not check for loss of accuracy, so this method will always return false.
Definition at line 249 of file Belos_StatusTest_GenResNorm_MP_Vector.hpp.
◆ getEnsembleIterations()
template<class Storage , class MV , class OP >
◆ firstCallCheckStatusSetup()
template<class Storage , class MV , class OP >
Call to setup initial scaling std::vector.
After this function is called getScaledNormValue()
can be called to get the scaling std::vector.
◆ description()
template<class Storage , class MV , class OP >
◆ resFormStr()
template<class Storage , class MV , class OP >
◆ tolerance_
template<class Storage , class MV , class OP >
◆ quorum_
template<class Storage , class MV , class OP >
◆ showMaxResNormOnly_
template<class Storage , class MV , class OP >
◆ restype_
template<class Storage , class MV , class OP >
◆ resnormtype_
template<class Storage , class MV , class OP >
◆ scaletype_
template<class Storage , class MV , class OP >
◆ scalenormtype_
template<class Storage , class MV , class OP >
◆ scalevalue_
template<class Storage , class MV , class OP >
◆ scalevector_
template<class Storage , class MV , class OP >
◆ resvector_
template<class Storage , class MV , class OP >
◆ testvector_
template<class Storage , class MV , class OP >
◆ ind_
template<class Storage , class MV , class OP >
◆ curSoln_
template<class Storage , class MV , class OP >
◆ status_
template<class Storage , class MV , class OP >
◆ curBlksz_
template<class Storage , class MV , class OP >
◆ curNumRHS_
template<class Storage , class MV , class OP >
◆ curLSIdx_
template<class Storage , class MV , class OP >
◆ curLSNum_
template<class Storage , class MV , class OP >
◆ numrhs_
template<class Storage , class MV , class OP >
◆ firstcallCheckStatus_
template<class Storage , class MV , class OP >
◆ firstcallDefineResForm_
template<class Storage , class MV , class OP >
◆ firstcallDefineScaleForm_
template<class Storage , class MV , class OP >
◆ ensemble_converged
template<class Storage , class MV , class OP >
◆ ensemble_iterations
template<class Storage , class MV , class OP >
The documentation for this class was generated from the following file: