|
Stokhos Package Browser (Single Doxygen Collection) Version of the Day
|
#include <Belos_StatusTest_GenResNorm_MP_Vector.hpp>

Public Types | |
| typedef Sacado::MP::Vector< Storage > | ScalarType |
| typedef Teuchos::ScalarTraits< ScalarType > | SCT |
| typedef SCT::magnitudeType | MagnitudeType |
| typedef MultiVecTraits< ScalarType, MV > | MVT |
Enums. | |
| enum | ResType { Implicit , Explicit } |
| Select how the residual std::vector is produced. More... | |
Private data members. | |
| MagnitudeType | tolerance_ |
| Tolerance used to determine convergence. | |
| int | quorum_ |
| Number of residuals that must pass the convergence test before Passed is returned. | |
| bool | showMaxResNormOnly_ |
| Determines if the entries for all of the residuals are shown or just the max. | |
| ResType | restype_ |
| Type of residual to use (explicit or implicit) | |
| NormType | resnormtype_ |
| Type of norm to use on residual (OneNorm, TwoNorm, or InfNorm). | |
| ScaleType | scaletype_ |
| Type of scaling to use (Norm of RHS, Norm of Initial Residual, None or User provided) | |
| NormType | scalenormtype_ |
| Type of norm to use on the scaling (OneNorm, TwoNorm, or InfNorm) | |
| MagnitudeType | scalevalue_ |
| Scaling value. | |
| std::vector< MagnitudeType > | scalevector_ |
| Scaling std::vector. | |
| std::vector< MagnitudeType > | resvector_ |
| Residual norm std::vector. | |
| std::vector< MagnitudeType > | testvector_ |
| Test std::vector = resvector_ / scalevector_. | |
| std::vector< int > | ind_ |
| Vector containing the indices for the vectors that passed the test. | |
| Teuchos::RCP< MV > | curSoln_ |
| Most recent solution vector used by this status test. | |
| StatusType | status_ |
| Status. | |
| int | curBlksz_ |
| The current blocksize of the linear system being solved. | |
| int | curNumRHS_ |
| The current number of right-hand sides being solved for. | |
| std::vector< int > | curLSIdx_ |
| The indices of the current number of right-hand sides being solved for. | |
| int | curLSNum_ |
| The current number of linear systems that have been loaded into the linear problem. | |
| int | numrhs_ |
| The total number of right-hand sides being solved for. | |
| bool | firstcallCheckStatus_ |
| Is this the first time CheckStatus is called? | |
| bool | firstcallDefineResForm_ |
| Is this the first time DefineResForm is called? | |
| bool | firstcallDefineScaleForm_ |
| Is this the first time DefineScaleForm is called? | |
| std::vector< int > | ensemble_converged |
| Which ensemble components have converged. | |
| std::vector< int > | ensemble_iterations |
| The number of iterations at which point each ensemble component converges. | |
Constructors/destructors. | |
| StatusTestGenResNorm (MagnitudeType Tolerance, int quorum=-1, bool showMaxResNormOnly=false) | |
| Constructor. | |
| virtual | ~StatusTestGenResNorm () |
| Destructor. | |
Form and parameter definition methods. | |
| int | defineResForm (ResType TypeOfResidual, NormType TypeOfNorm) |
| Define form of the residual, its norm and optional weighting std::vector. | |
| int | defineScaleForm (ScaleType TypeOfScaling, NormType TypeOfNorm, MagnitudeType ScaleValue=Teuchos::ScalarTraits< MagnitudeType >::one()) |
| Define form of the scaling, its norm, its optional weighting std::vector, or, alternatively, define an explicit value. | |
| NormType | getResNormType () |
| int | setTolerance (MagnitudeType tolerance) |
| Set the value of the tolerance. | |
| int | setQuorum (int quorum) |
| int | setShowMaxResNormOnly (bool showMaxResNormOnly) |
| Set whether the only maximum residual norm is displayed when the print() method is called. | |
Status methods | |
| StatusType | checkStatus (Iteration< ScalarType, MV, OP > *iSolver) |
| Check convergence status: Passed, Failed, or Undefined. | |
| StatusType | getStatus () const |
| Return the result of the most recent CheckStatus call. | |
Reset methods | |
| void | reset () |
| Resets the internal configuration to the initial state. | |
Print methods | |
| void | print (std::ostream &os, int indent=0) const |
| Output formatted description of stopping test to output stream. | |
| void | printStatus (std::ostream &os, StatusType type) const |
| Print message for each status specific to this stopping test. | |
Methods to access data members. | |
| Teuchos::RCP< MV > | getSolution () |
| int | getQuorum () const |
| bool | getShowMaxResNormOnly () |
| Returns whether the only maximum residual norm is displayed when the print() method is called. | |
| std::vector< int > | convIndices () |
| Returns the std::vector containing the indices of the residuals that passed the test. | |
| MagnitudeType | getTolerance () const |
Returns the value of the tolerance, ![]() | |
| const std::vector< MagnitudeType > * | getTestValue () const |
Returns the test value, ![]() | |
| const std::vector< MagnitudeType > * | getResNormValue () const |
Returns the residual norm value, ![]() | |
| const std::vector< MagnitudeType > * | getScaledNormValue () const |
Returns the scaled norm value, ![]() | |
| bool | getLOADetected () const |
| const std::vector< int > | getEnsembleIterations () const |
| Returns number of ensemble iterations. | |
Misc. | |
| StatusType | firstCallCheckStatusSetup (Iteration< ScalarType, MV, OP > *iSolver) |
| Call to setup initial scaling std::vector. | |
Overridden from Teuchos::Describable | |
| std::string | description () const |
| Method to return description of the maximum iteration status test. | |
Private methods. | |
| std::string | resFormStr () const |
| Description of current residual form. | |
Definition at line 85 of file Belos_StatusTest_GenResNorm_MP_Vector.hpp.
| typedef Sacado::MP::Vector<Storage> Belos::StatusTestGenResNorm< Sacado::MP::Vector< Storage >, MV, OP >::ScalarType |
Definition at line 91 of file Belos_StatusTest_GenResNorm_MP_Vector.hpp.
| typedef Teuchos::ScalarTraits<ScalarType> Belos::StatusTestGenResNorm< Sacado::MP::Vector< Storage >, MV, OP >::SCT |
Definition at line 92 of file Belos_StatusTest_GenResNorm_MP_Vector.hpp.
| typedef SCT::magnitudeType Belos::StatusTestGenResNorm< Sacado::MP::Vector< Storage >, MV, OP >::MagnitudeType |
Definition at line 93 of file Belos_StatusTest_GenResNorm_MP_Vector.hpp.
| typedef MultiVecTraits<ScalarType,MV> Belos::StatusTestGenResNorm< Sacado::MP::Vector< Storage >, MV, OP >::MVT |
Definition at line 94 of file Belos_StatusTest_GenResNorm_MP_Vector.hpp.
| enum Belos::StatusTestGenResNorm< Sacado::MP::Vector< Storage >, MV, OP >::ResType |
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.
| Belos::StatusTestGenResNorm< Sacado::MP::Vector< Storage >, MV, OP >::StatusTestGenResNorm | ( | MagnitudeType | Tolerance, |
| int | quorum = -1, | ||
| bool | showMaxResNormOnly = false ) |
Constructor.
The constructor takes a single argument specifying the tolerance ( 



You can also state the number of vectors that must pass the convergence criteria before the status test passes by using the quorum argument.
|
virtual |
Destructor.
| int Belos::StatusTestGenResNorm< Sacado::MP::Vector< Storage >, MV, OP >::defineResForm | ( | ResType | TypeOfResidual, |
| NormType | TypeOfNorm ) |
Define form of the residual, its norm and optional weighting std::vector.
This method defines the form of 
| int Belos::StatusTestGenResNorm< Sacado::MP::Vector< Storage >, MV, OP >::defineScaleForm | ( | ScaleType | TypeOfScaling, |
| NormType | TypeOfNorm, | ||
| MagnitudeType | ScaleValue = Teuchos::ScalarTraits< MagnitudeType >::one() ) |
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:


|
inline |
Definition at line 167 of file Belos_StatusTest_GenResNorm_MP_Vector.hpp.
|
inline |
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.
|
inline |
Sets the number of residuals that must pass the convergence test before Passed is returned.
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.
|
inline |
Set whether the only maximum residual norm is displayed when the print() method is called.
Definition at line 180 of file Belos_StatusTest_GenResNorm_MP_Vector.hpp.
| StatusType Belos::StatusTestGenResNorm< Sacado::MP::Vector< Storage >, MV, OP >::checkStatus | ( | Iteration< ScalarType, MV, OP > * | iSolver | ) |
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.
|
inline |
Return the result of the most recent CheckStatus call.
Definition at line 196 of file Belos_StatusTest_GenResNorm_MP_Vector.hpp.
| void Belos::StatusTestGenResNorm< Sacado::MP::Vector< Storage >, MV, OP >::reset | ( | ) |
Resets the internal configuration to the initial state.
| void Belos::StatusTestGenResNorm< Sacado::MP::Vector< Storage >, MV, OP >::print | ( | std::ostream & | os, |
| int | indent = 0 ) const |
Output formatted description of stopping test to output stream.
| void Belos::StatusTestGenResNorm< Sacado::MP::Vector< Storage >, MV, OP >::printStatus | ( | std::ostream & | os, |
| StatusType | type ) const |
Print message for each status specific to this stopping test.
|
inline |
Returns the current solution estimate that was computed for the most recent residual test.
Definition at line 223 of file Belos_StatusTest_GenResNorm_MP_Vector.hpp.
|
inline |
Returns the number of residuals that must pass the convergence test before Passed is returned.
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.
|
inline |
Returns whether the only maximum residual norm is displayed when the print() method is called.
Definition at line 230 of file Belos_StatusTest_GenResNorm_MP_Vector.hpp.
|
inline |
Returns the std::vector containing the indices of the residuals that passed the test.
Definition at line 233 of file Belos_StatusTest_GenResNorm_MP_Vector.hpp.
|
inline |
Returns the value of the tolerance, 
Definition at line 236 of file Belos_StatusTest_GenResNorm_MP_Vector.hpp.
|
inline |
Returns the test value, 
Definition at line 239 of file Belos_StatusTest_GenResNorm_MP_Vector.hpp.
|
inline |
Returns the residual norm value, 
Definition at line 242 of file Belos_StatusTest_GenResNorm_MP_Vector.hpp.
|
inline |
Returns the scaled norm value, 
Definition at line 245 of file Belos_StatusTest_GenResNorm_MP_Vector.hpp.
|
inline |
Returns a boolean indicating a loss of accuracy has been detected in computing the residual.
Definition at line 249 of file Belos_StatusTest_GenResNorm_MP_Vector.hpp.
|
inline |
Returns number of ensemble iterations.
Definition at line 252 of file Belos_StatusTest_GenResNorm_MP_Vector.hpp.
| StatusType Belos::StatusTestGenResNorm< Sacado::MP::Vector< Storage >, MV, OP >::firstCallCheckStatusSetup | ( | Iteration< ScalarType, MV, OP > * | iSolver | ) |
Call to setup initial scaling std::vector.
After this function is called getScaledNormValue() can be called to get the scaling std::vector.
|
inline |
Method to return description of the maximum iteration status test.
Definition at line 272 of file Belos_StatusTest_GenResNorm_MP_Vector.hpp.
|
inlineprivate |
Description of current residual form.
Definition at line 288 of file Belos_StatusTest_GenResNorm_MP_Vector.hpp.
|
private |
Tolerance used to determine convergence.
Definition at line 327 of file Belos_StatusTest_GenResNorm_MP_Vector.hpp.
|
private |
Number of residuals that must pass the convergence test before Passed is returned.
Definition at line 330 of file Belos_StatusTest_GenResNorm_MP_Vector.hpp.
|
private |
Determines if the entries for all of the residuals are shown or just the max.
Definition at line 333 of file Belos_StatusTest_GenResNorm_MP_Vector.hpp.
|
private |
Type of residual to use (explicit or implicit)
Definition at line 336 of file Belos_StatusTest_GenResNorm_MP_Vector.hpp.
|
private |
Type of norm to use on residual (OneNorm, TwoNorm, or InfNorm).
Definition at line 339 of file Belos_StatusTest_GenResNorm_MP_Vector.hpp.
|
private |
Type of scaling to use (Norm of RHS, Norm of Initial Residual, None or User provided)
Definition at line 342 of file Belos_StatusTest_GenResNorm_MP_Vector.hpp.
|
private |
Type of norm to use on the scaling (OneNorm, TwoNorm, or InfNorm)
Definition at line 345 of file Belos_StatusTest_GenResNorm_MP_Vector.hpp.
|
private |
Scaling value.
Definition at line 348 of file Belos_StatusTest_GenResNorm_MP_Vector.hpp.
|
private |
Scaling std::vector.
Definition at line 351 of file Belos_StatusTest_GenResNorm_MP_Vector.hpp.
|
private |
Residual norm std::vector.
Definition at line 354 of file Belos_StatusTest_GenResNorm_MP_Vector.hpp.
|
private |
Test std::vector = resvector_ / scalevector_.
Definition at line 357 of file Belos_StatusTest_GenResNorm_MP_Vector.hpp.
|
private |
Vector containing the indices for the vectors that passed the test.
Definition at line 360 of file Belos_StatusTest_GenResNorm_MP_Vector.hpp.
|
private |
Most recent solution vector used by this status test.
Definition at line 363 of file Belos_StatusTest_GenResNorm_MP_Vector.hpp.
|
private |
Status.
Definition at line 366 of file Belos_StatusTest_GenResNorm_MP_Vector.hpp.
|
private |
The current blocksize of the linear system being solved.
Definition at line 369 of file Belos_StatusTest_GenResNorm_MP_Vector.hpp.
|
private |
The current number of right-hand sides being solved for.
Definition at line 372 of file Belos_StatusTest_GenResNorm_MP_Vector.hpp.
|
private |
The indices of the current number of right-hand sides being solved for.
Definition at line 375 of file Belos_StatusTest_GenResNorm_MP_Vector.hpp.
|
private |
The current number of linear systems that have been loaded into the linear problem.
Definition at line 378 of file Belos_StatusTest_GenResNorm_MP_Vector.hpp.
|
private |
The total number of right-hand sides being solved for.
Definition at line 381 of file Belos_StatusTest_GenResNorm_MP_Vector.hpp.
|
private |
Is this the first time CheckStatus is called?
Definition at line 384 of file Belos_StatusTest_GenResNorm_MP_Vector.hpp.
|
private |
Is this the first time DefineResForm is called?
Definition at line 387 of file Belos_StatusTest_GenResNorm_MP_Vector.hpp.
|
private |
Is this the first time DefineScaleForm is called?
Definition at line 390 of file Belos_StatusTest_GenResNorm_MP_Vector.hpp.
|
private |
Which ensemble components have converged.
Definition at line 393 of file Belos_StatusTest_GenResNorm_MP_Vector.hpp.
|
private |
The number of iterations at which point each ensemble component converges.
Definition at line 396 of file Belos_StatusTest_GenResNorm_MP_Vector.hpp.