A special StatusTest for printing other status tests in a simple format.
More...
#include <BelosStatusTestResNormOutput.hpp>
|
| 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 | setChild (Teuchos::RCP< StatusTest< ScalarType, MV, OP > > test) |
| | Set child test, which must be a combination of a Belos::StatusTestMaxIters AND a single or combination of Belos::StatusTestResNorms.
|
| Teuchos::RCP< StatusTest< ScalarType, MV, OP > > | getChild () const |
| | Get child test.
|
| 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.
|
|
| 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.
|
template<class ScalarType, class MV, class OP>
class Belos::StatusTestResNormOutput< ScalarType, MV, OP >
A special StatusTest for printing other status tests in a simple format.
StatusTestResNormOutput is a wrapper around an StatusTest that calls StatusTest::print() on the underlying object on calls to StatusTestResNormOutput::checkStatus(). The frequency and occasion of the printing can be dictated according to some parameters passed to StatusTestResNormOutput::StatusTestResNormOutput().
Definition at line 74 of file BelosStatusTestResNormOutput.hpp.
◆ MVT
template<class ScalarType, class MV, class OP>
◆ StatusTestCombo_t
template<class ScalarType, class MV, class OP>
◆ StatusTestResNorm_t
template<class ScalarType, class MV, class OP>
◆ StatusTestMaxIters_t
template<class ScalarType, class MV, class OP>
◆ StatusTestResNormOutput()
template<class ScalarType, class MV, class OP>
Constructor.
The StatusTestResNormOutput 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.
- Parameters
-
| [in] | test | A reference-counted pointer to an object that combines Belos::StatusTestMaxIters and a set of Belos::StatusTestResNorm |
| [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 100 of file BelosStatusTestResNormOutput.hpp.
◆ ~StatusTestResNormOutput()
template<class ScalarType, class MV, class OP>
◆ checkStatus()
template<class ScalarType, class MV, class OP>
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.
- Returns
- ::StatusType indicating whether the underlying test passed or failed.
Implements Belos::StatusTest< ScalarType, MV, OP >.
Definition at line 145 of file BelosStatusTestResNormOutput.hpp.
◆ getStatus()
template<class ScalarType, class MV, class OP>
◆ setOutputManager()
template<class ScalarType, class MV, class OP>
◆ setOutputFrequency()
template<class ScalarType, class MV, class OP>
◆ setChild()
template<class ScalarType, class MV, class OP>
◆ getChild()
template<class ScalarType, class MV, class OP>
◆ setSolverDesc()
template<class ScalarType, class MV, class OP>
◆ setPrecondDesc()
template<class ScalarType, class MV, class OP>
◆ reset()
template<class ScalarType, class MV, class OP>
◆ resetNumCalls()
template<class ScalarType, class MV, class OP>
◆ print()
template<class ScalarType, class MV, class OP>
◆ printer_
template<class ScalarType, class MV, class OP>
◆ test_
template<class ScalarType, class MV, class OP>
◆ iterTest_
template<class ScalarType, class MV, class OP>
◆ resTestVec_
template<class ScalarType, class MV, class OP>
◆ solverDesc_
template<class ScalarType, class MV, class OP>
◆ precondDesc_
template<class ScalarType, class MV, class OP>
◆ currIdx_
template<class ScalarType, class MV, class OP>
◆ state_
template<class ScalarType, class MV, class OP>
◆ headerPrinted_
template<class ScalarType, class MV, class OP>
◆ stateTest_
template<class ScalarType, class MV, class OP>
◆ modTest_
template<class ScalarType, class MV, class OP>
◆ lastNumIters_
template<class ScalarType, class MV, class OP>
◆ comboType_
template<class ScalarType, class MV, class OP>
◆ numResTests_
template<class ScalarType, class MV, class OP>
◆ blockSize_
template<class ScalarType, class MV, class OP>
◆ currNumRHS_
template<class ScalarType, class MV, class OP>
◆ currLSNum_
template<class ScalarType, class MV, class OP>
◆ numLSDgts_
template<class ScalarType, class MV, class OP>
◆ numIterDgts_
template<class ScalarType, class MV, class OP>
The documentation for this class was generated from the following file: