11#ifndef BELOS_STATUS_TEST_GENERAL_OUTPUT_HPP
12#define BELOS_STATUS_TEST_GENERAL_OUTPUT_HPP
39template <
class ScalarType,
class MV,
class OP>
97 state_ = test_->checkStatus(
solver);
99 if (numCalls_++ % modTest_ == 0) {
100 if ( (state_ & stateTest_) == state_) {
104 else if ( printer_->isVerbosity(
Debug) ) {
141 Teuchos::RCP<StatusTest<ScalarType,MV,OP> >
getChild()
const {
180 os << std::endl <<
ind <<
"Belos::StatusTestGeneralOutput: ";
183 os <<
"Passed" << std::endl;
186 os <<
"Failed" << std::endl;
189 os <<
"Undefined" << std::endl;
192 os <<
ind <<
" (Num calls,Mod test,State test): " <<
"(" << numCalls_ <<
", " << modTest_ <<
",";
193 if (stateTest_ == 0) {
194 os <<
" none)" << std::endl;
197 if ( stateTest_ &
Passed )
os <<
" Passed";
198 if ( stateTest_ &
Failed )
os <<
" Failed";
200 os <<
")" << std::endl;
209 Teuchos::RCP<OutputManager<ScalarType> > printer_;
210 Teuchos::RCP<StatusTest<ScalarType,MV,OP> > test_;
211 std::string solverDesc_;
212 std::string precondDesc_;
Belos header file which uses auto-configuration information to include necessary C++ headers.
Pure virtual base class which describes the basic interface to the linear solver iteration.
Class which manages the output and verbosity of the Belos solvers.
Virtual base class for StatusTest that printing status tests.
Pure virtual base class for defining the status testing capabilities of Belos.
Collection of types and exceptions used within the Belos solvers.
Alternative run-time polymorphic interface for operators.
Exception thrown to signal error in a status test during Belos::StatusTest::checkStatus().
A special StatusTest for printing other status tests.
StatusType getStatus() const
Return the result of the most recent checkStatus call, or undefined if it has not been run.
void resetNumCalls()
Informs the outputting status test that it should reset the number of calls to zero.
void reset()
Informs the status test that it should reset its internal configuration to the uninitialized state.
virtual ~StatusTestGeneralOutput()
Destructor.
void setOutputManager(const Teuchos::RCP< OutputManager< ScalarType > > &printer)
Set the output manager.
StatusType checkStatus(Iteration< ScalarType, MV, OP > *solver)
void setOutputFrequency(int mod)
Set how often the child test is printed.
Teuchos::RCP< StatusTest< ScalarType, MV, OP > > getChild() const
Get child test.
void setChild(Teuchos::RCP< StatusTest< ScalarType, MV, OP > > test)
Set child test.
StatusTestGeneralOutput(const Teuchos::RCP< OutputManager< ScalarType > > &printer, Teuchos::RCP< StatusTest< ScalarType, MV, OP > > test, int mod=1, int printStates=Passed)
Constructor.
void setSolverDesc(const std::string &solverDesc)
Set a short solver description for output clarity.
void print(std::ostream &os, int indent=0) const
Output formatted description of stopping test to output stream.
void setPrecondDesc(const std::string &precondDesc)
Set a short preconditioner description for output clarity.
A virtual base class for StatusTest that print other status tests.
StatusType
Whether the StatusTest wants iteration to stop.