Go to the documentation of this file.
43 #ifndef BELOS_STATUS_TEST_GENERAL_OUTPUT_HPP
44 #define BELOS_STATUS_TEST_GENERAL_OUTPUT_HPP
71 template <
class ScalarType,
class MV,
class OP>
99 stateTest_(printStates),
128 TEUCHOS_TEST_FOR_EXCEPTION(test_ == Teuchos::null,
StatusTestError,
"StatusTestGeneralOutput::checkStatus(): child pointer is null.");
129 state_ = test_->checkStatus(solver);
131 if (numCalls_++ % modTest_ == 0) {
132 if ( (state_ & stateTest_) == state_) {
136 else if ( printer_->isVerbosity(
Debug) ) {
173 Teuchos::RCP<StatusTest<ScalarType,MV,OP> >
getChild()
const {
179 void setSolverDesc(
const std::string& solverDesc) { solverDesc_ = solverDesc; }
183 void setPrecondDesc(
const std::string& precondDesc) { precondDesc_ = precondDesc; }
210 void print(std::ostream& os,
int indent = 0)
const {
211 std::string ind(indent,
' ');
212 os << std::endl << ind <<
"Belos::StatusTestGeneralOutput: ";
215 os <<
"Passed" << std::endl;
218 os <<
"Failed" << std::endl;
221 os <<
"Undefined" << std::endl;
224 os << ind <<
" (Num calls,Mod test,State test): " <<
"(" << numCalls_ <<
", " << modTest_ <<
",";
225 if (stateTest_ == 0) {
226 os <<
" none)" << std::endl;
229 if ( stateTest_ &
Passed ) os <<
" Passed";
230 if ( stateTest_ &
Failed ) os <<
" Failed";
231 if ( stateTest_ &
Undefined ) os <<
" Undefined";
232 os <<
")" << std::endl;
235 test_->print(os,indent+3);
241 Teuchos::RCP<OutputManager<ScalarType> > printer_;
242 Teuchos::RCP<StatusTest<ScalarType,MV,OP> > test_;
243 std::string solverDesc_;
244 std::string precondDesc_;
Belos header file which uses auto-configuration information to include necessary C++ headers.
Belos's basic output manager for sending information of select verbosity levels to the appropriate ou...
Pure virtual base class for defining the status testing capabilities of Belos.
Exception thrown to signal error in a status test during Belos::StatusTest::checkStatus().
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.
A special StatusTest for printing other status tests.
void setSolverDesc(const std::string &solverDesc)
Set a short solver description for output clarity.
Virtual base class for StatusTest that printing status tests.
Class which manages the output and verbosity of the Belos solvers.
StatusType getStatus() const
Return the result of the most recent checkStatus call, or undefined if it has not been run.
StatusType
Whether the StatusTest wants iteration to stop.
void print(std::ostream &os, int indent=0) const
Output formatted description of stopping test to output stream.
void setOutputManager(const Teuchos::RCP< OutputManager< ScalarType > > &printer)
Set the output manager.
void setOutputFrequency(int mod)
Set how often the child test is printed.
Teuchos::RCP< StatusTest< ScalarType, MV, OP > > getChild() const
Get child test.
void setPrecondDesc(const std::string &precondDesc)
Set a short preconditioner description for output clarity.
StatusTestGeneralOutput(const Teuchos::RCP< OutputManager< ScalarType > > &printer, Teuchos::RCP< StatusTest< ScalarType, MV, OP > > test, int mod=1, int printStates=Passed)
Constructor.
StatusType checkStatus(Iteration< ScalarType, MV, OP > *solver)
A pure virtual class for defining the status tests for the Belos iterative solvers.
void setChild(Teuchos::RCP< StatusTest< ScalarType, MV, OP > > test)
Set child test.
Collection of types and exceptions used within the Belos solvers.
A virtual base class for StatusTest that print other status tests.
Pure virtual base class which describes the basic interface to the linear solver iteration.
virtual ~StatusTestGeneralOutput()
Destructor.
Generated on Thu Feb 27 2020 16:06:46 for Belos by
1.8.16