43#ifndef BELOS_STATUS_TEST_MAXITERS_HPP
44#define BELOS_STATUS_TEST_MAXITERS_HPP
62template <
class ScalarType,
class MV,
class OP>
117 void print(std::ostream& os,
int indent = 0)
const;
130 std::ostringstream oss;
152 template <
class ScalarType,
class MV,
class OP>
164 template <
class ScalarType,
class MV,
class OP>
174 template <
class ScalarType,
class MV,
class OP>
181 template <
class ScalarType,
class MV,
class OP>
184 for (
int j = 0; j < indent; j ++)
187 os <<
"Number of Iterations = ";
194 template <
class ScalarType,
class MV,
class OP>
197 os << std::left << std::setw(13) << std::setfill(
'.');
210 os << std::left << std::setfill(
' ');
Pure virtual base class for defining the status testing capabilities of Belos.
virtual int getNumIters() const =0
Get the current iteration count.
void print(std::ostream &os, int indent=0) const
Output formatted description of stopping test to output stream.
StatusType checkStatus(Iteration< ScalarType, MV, OP > *iSolver)
Check convergence status of the iterative solver: Unconverged, Converged, Failed.
void reset()
Resets the status test to the initial internal state.
StatusTestMaxIters(int maxIters)
Constructor.
std::string description() const
Method to return description of the maximum iteration status test.
virtual ~StatusTestMaxIters()
Destructor.
StatusType getStatus() const
Return the result of the most recent CheckStatus call.
void setMaxIters(int maxIters)
Sets the maximum number of iterations allowed.
int getMaxIters() const
Returns the maximum number of iterations set in the constructor.
int getNumIters() const
Returns the current number of iterations from the most recent StatusTest call.
void printStatus(std::ostream &os, StatusType type) const
Print message for each status specific to this stopping test.
StatusType
Whether the StatusTest wants iteration to stop.