#include <BelosStatusTestSimpleOutput.hpp>
Inheritance diagram for Belos::StatusTestSimpleOutput< ScalarType, MV, OP >:

Public Member Functions | |
Constructors/destructors | |
| StatusTestSimpleOutput (const Teuchos::RCP< OutputManager< ScalarType > > &printer, Teuchos::RCP< StatusTestMaxIters< ScalarType, MV, OP > > iterTest, Teuchos::RCP< StatusTest< ScalarType, MV, OP > > resTest, int mod=1, int printStates=Passed) | |
| Constructor. | |
| virtual | ~StatusTestSimpleOutput () |
| Destructor. | |
Status methods | |
| StatusType | checkStatus (Iteration< ScalarType, MV, OP > *solver) |
| StatusType | getStatus () const |
| Return the result of the most recent checkStatus call, or undefined if it has not been run. | |
Accessor methods | |
| void | setOutputManager (const Teuchos::RCP< OutputManager< ScalarType > > &printer) |
| Set the output manager. | |
| void | setOutputFrequency (int mod) |
| Set how often the child test is printed. | |
| void | setSolverDesc (const std::string &solverDesc) |
| Set a short solver description for output clarity. | |
| void | setPrecondDesc (const std::string &precondDesc) |
| Set a short preconditioner description for output clarity. | |
Reset methods | |
| void | reset () |
| Informs the status test that it should reset its internal configuration to the uninitialized state. | |
| void | resetNumCalls () |
| Informs the outputting status test that it should reset the number of calls to zero. | |
| void | clearStatus () |
| Clears the results of the last status test. | |
Print methods | |
| void | print (std::ostream &os, int indent=0) const |
| Output formatted description of stopping test to output stream. | |
StatusTestSimpleOutput is a wrapper around an StatusTest that calls StatusTest::print() on the underlying object on calls to StatusTestSimpleOutput::checkStatus(). The frequency and occasion of the printing can be dictated according to some parameters passed to StatusTestSimpleOutput::StatusTestSimpleOutput().
Definition at line 61 of file BelosStatusTestSimpleOutput.hpp.
| Belos::StatusTestSimpleOutput< ScalarType, MV, OP >::StatusTestSimpleOutput | ( | const Teuchos::RCP< OutputManager< ScalarType > > & | printer, | |
| Teuchos::RCP< StatusTestMaxIters< ScalarType, MV, OP > > | iterTest, | |||
| Teuchos::RCP< StatusTest< ScalarType, MV, OP > > | resTest, | |||
| int | mod = 1, |
|||
| int | printStates = Passed | |||
| ) | [inline] |
Constructor.
The StatusTestSimpleOutput requires an OutputManager for printing the underlying StatusTest on calls to checkStatus(), as well as an underlying StatusTest.
The last two parameters, described below, in addition to the verbosity level of the OutputManager, control when printing is called. When both the mod criterion and the printStates criterion are satisfied, the status test will be printed to the OutputManager with MsgType of StatusTestDetails.
| [in] | iterTest | A reference-counted pointer to a Belos::StatusTestMaxIters object |
| [in] | resTest | A reference-counted pointer to a object that derives from Belos::StatusTestResNorm or a combination of Belos::StatusTestResNorm objects |
| [in] | mod | A positive number describes how often the output should be printed. On every call to checkStatus(), an internal counter is incremented. Printing may only occur when this counter is congruent to zero modulo mod. Default: 1 (attempt to print on every call to checkStatus()) |
| [in] | printStates | A combination of StatusType values for which the output may be printed. Default: Passed (attempt to print whenever checkStatus() will return Passed) |
Definition at line 86 of file BelosStatusTestSimpleOutput.hpp.
| virtual Belos::StatusTestSimpleOutput< ScalarType, MV, OP >::~StatusTestSimpleOutput | ( | ) | [inline, virtual] |
| StatusType Belos::StatusTestSimpleOutput< ScalarType, MV, OP >::checkStatus | ( | Iteration< ScalarType, MV, OP > * | solver | ) | [inline, virtual] |
Check and return status of underlying StatusTest.
This method calls checkStatus() on the StatusTest object passed in the constructor. If appropriate, the method will follow this call with a call to print() on the underlying object, using the OutputManager passed via the constructor with verbosity level StatusTestDetails.
The internal counter will be incremented during this call, but only after performing the tests to decide whether or not to print the underlying StatusTest. This way, the very first call to checkStatus() following initialization or reset() will enable the underlying StatusTest to be printed, regardless of the mod parameter, as the current number of calls will be zero.
If the specified Teuchos::RCP for the child class is Teuchos::null, then calling checkStatus() will result in a StatusTestError std::exception being thrown.
Implements Belos::StatusTest< ScalarType, MV, OP >.
Definition at line 153 of file BelosStatusTestSimpleOutput.hpp.
| StatusType Belos::StatusTestSimpleOutput< ScalarType, MV, OP >::getStatus | ( | ) | const [inline, virtual] |
Return the result of the most recent checkStatus call, or undefined if it has not been run.
Implements Belos::StatusTest< ScalarType, MV, OP >.
Definition at line 183 of file BelosStatusTestSimpleOutput.hpp.
| void Belos::StatusTestSimpleOutput< ScalarType, MV, OP >::setOutputManager | ( | const Teuchos::RCP< OutputManager< ScalarType > > & | printer | ) | [inline] |
| void Belos::StatusTestSimpleOutput< ScalarType, MV, OP >::setOutputFrequency | ( | int | mod | ) | [inline] |
Set how often the child test is printed.
Definition at line 198 of file BelosStatusTestSimpleOutput.hpp.
| void Belos::StatusTestSimpleOutput< ScalarType, MV, OP >::setSolverDesc | ( | const std::string & | solverDesc | ) | [inline] |
Set a short solver description for output clarity.
Definition at line 202 of file BelosStatusTestSimpleOutput.hpp.
| void Belos::StatusTestSimpleOutput< ScalarType, MV, OP >::setPrecondDesc | ( | const std::string & | precondDesc | ) | [inline] |
Set a short preconditioner description for output clarity.
Definition at line 206 of file BelosStatusTestSimpleOutput.hpp.
| void Belos::StatusTestSimpleOutput< ScalarType, MV, OP >::reset | ( | ) | [inline, virtual] |
Informs the status test that it should reset its internal configuration to the uninitialized state.
This resets the cached state to an Undefined state and calls reset() on the underlying test. It also resets the counter for the number of calls to checkStatus().
Implements Belos::StatusTest< ScalarType, MV, OP >.
Definition at line 217 of file BelosStatusTestSimpleOutput.hpp.
| void Belos::StatusTestSimpleOutput< ScalarType, MV, OP >::resetNumCalls | ( | ) | [inline] |
Informs the outputting status test that it should reset the number of calls to zero.
Definition at line 225 of file BelosStatusTestSimpleOutput.hpp.
| void Belos::StatusTestSimpleOutput< ScalarType, MV, OP >::clearStatus | ( | ) | [inline] |
Clears the results of the last status test.
This resets the cached state to an Undefined state and calls clearStatus() on the underlying test.
Definition at line 229 of file BelosStatusTestSimpleOutput.hpp.
| void Belos::StatusTestSimpleOutput< ScalarType, MV, OP >::print | ( | std::ostream & | os, | |
| int | indent = 0 | |||
| ) | const [inline, virtual] |
Output formatted description of stopping test to output stream.
Implements Belos::StatusTest< ScalarType, MV, OP >.
Definition at line 241 of file BelosStatusTestSimpleOutput.hpp.
1.4.7