#include <BelosStatusTestCombo.hpp>
Inheritance diagram for Belos::StatusTestCombo< ScalarType, MV, OP >:

Public Types | |
Enums | |
| enum | ComboType { AND, OR, SEQ } |
| The test can be either the AND of all the component tests, or the OR of all the component tests, or a sequential AND (SEQ). More... | |
Public Member Functions | |
Constructors / Destructor | |
| StatusTestCombo (ComboType t) | |
| Constructor. | |
| StatusTestCombo (ComboType t, StatusTest< ScalarType, MV, OP > &test1) | |
| Single test constructor. | |
| StatusTestCombo (ComboType t, StatusTest< ScalarType, MV, OP > &test1, StatusTest< ScalarType, MV, OP > &test2) | |
| Dual test constructor. | |
| StatusTestCombo< ScalarType, MV, OP > & | AddStatusTest (StatusTest< ScalarType, MV, OP > &add_test) |
| Add another test to this combination. | |
| virtual | ~StatusTestCombo () |
| Destructor. | |
Status methods | |
| StatusType | CheckStatus (IterativeSolver< ScalarType, MV, OP > *iSolver) |
| Check convergence status of the iterative solver: Unconverged, Converged, Failed. | |
| StatusType | GetStatus () const |
| Return the result of the most recent CheckStatus call. | |
Reset methods | |
| void | Reset () |
| Resets all the status tests in this combination to their initial internal state. | |
Accessor methods | |
| ComboType | GetComboType () const |
| Returns the maximum number of iterations set in the constructor. | |
Attribute methods | |
| bool | ResidualVectorRequired () const |
| Indicates if residual vector is required by this convergence test. | |
Print methods | |
| ostream & | Print (ostream &os, int indent=0) const |
| Output formatted description of stopping test to output stream. | |
Protected Member Functions | |
Internal methods. | |
| void | OrOp (IterativeSolver< ScalarType, MV, OP > *iSolver) |
| Use this for checkStatus when this is an OR type combo. Updates status. | |
| void | AndOp (IterativeSolver< ScalarType, MV, OP > *iSolver) |
| Use this for checkStatus when this is an AND type combo. Updates status. | |
| void | SeqOp (IterativeSolver< ScalarType, MV, OP > *iSolver) |
| Use this for checkStatus when this is a sequential AND type combo. Updates status. | |
| bool | IsSafe (StatusTest< ScalarType, MV, OP > &test1) |
| Check whether or not it is safe to add a to the list of tests. | |
StatusTestCombo is an interface that can be implemented to extend the convergence testing capabilities of Belos. This class supports composite tests. In this situation, two or more existing StatusTestCombo objects test1 and test2 can be used to create a new test. For all combinations, if any tests returns Failed or returns not-a-number (NaN) status, then the combination test returns Failed. There are three possible combinations:
The purpose of the SEQ combination is to allow the addition of expensive but more rigorous convergence tests. For example, we could define a test that used the implicit residual vector (the one produced by the iterative method) as the first subtest and define a second test using the explicitly computed residual vector. Explicitly computing the residual requires a matrix multiplication with the original matrix operator, an expensive operation. By using the SEQ combination, we can avoid the matrix multiplication associated with the explicit residual calculation until the implicit residual is small.
Definition at line 76 of file BelosStatusTestCombo.hpp.
|
|||||
|
The test can be either the AND of all the component tests, or the OR of all the component tests, or a sequential AND (SEQ).
Definition at line 94 of file BelosStatusTestCombo.hpp. |
|
||||||||||
|
Constructor.
Definition at line 205 of file BelosStatusTestCombo.hpp. |
|
||||||||||||||||
|
Single test constructor.
Definition at line 212 of file BelosStatusTestCombo.hpp. |
|
||||||||||||||||||||
|
Dual test constructor.
Definition at line 220 of file BelosStatusTestCombo.hpp. |
|
|||||||||
|
Destructor.
Definition at line 117 of file BelosStatusTestCombo.hpp. |
|
||||||||||
|
Add another test to this combination.
Definition at line 229 of file BelosStatusTestCombo.hpp. |
|
||||||||||
|
Check convergence status of the iterative solver: Unconverged, Converged, Failed. This method checks to see if the convergence criteria are met using the current information from the iterative solver. Implements Belos::StatusTest< ScalarType, MV, OP >. Definition at line 284 of file BelosStatusTestCombo.hpp. |
|
|||||||||
|
Return the result of the most recent CheckStatus call.
Implements Belos::StatusTest< ScalarType, MV, OP >. Definition at line 130 of file BelosStatusTestCombo.hpp. |
|
|||||||||
|
Resets all the status tests in this combination to their initial internal state. This should be done when the status test is being reused with another solver or linear problem. Implements Belos::StatusTest< ScalarType, MV, OP >. Definition at line 299 of file BelosStatusTestCombo.hpp. |
|
|||||||||
|
Returns the maximum number of iterations set in the constructor.
Definition at line 148 of file BelosStatusTestCombo.hpp. |
|
|||||||||
|
Indicates if residual vector is required by this convergence test. If this method returns true, then one or more of the StatusTest objects that make up this combined test requires the norm of the true residual vector to perform its test. Implements Belos::StatusTest< ScalarType, MV, OP >. Definition at line 266 of file BelosStatusTestCombo.hpp. |
|
||||||||||||||||
|
Output formatted description of stopping test to output stream.
Implements Belos::StatusTest< ScalarType, MV, OP >. Definition at line 394 of file BelosStatusTestCombo.hpp. |
|
||||||||||
|
Use this for checkStatus when this is an OR type combo. Updates status.
Definition at line 313 of file BelosStatusTestCombo.hpp. |
|
||||||||||
|
Use this for checkStatus when this is an AND type combo. Updates status.
Definition at line 338 of file BelosStatusTestCombo.hpp. |
|
||||||||||
|
Use this for checkStatus when this is a sequential AND type combo. Updates status.
Definition at line 371 of file BelosStatusTestCombo.hpp. |
|
||||||||||
|
Check whether or not it is safe to add a to the list of tests. This is necessary to avoid any infinite recursions. Definition at line 247 of file BelosStatusTestCombo.hpp. |
1.3.9.1