00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031 #ifndef BELOS_STATUS_TEST_HPP
00032 #define BELOS_STATUS_TEST_HPP
00033
00039 #include "BelosTypes.hpp"
00040 #include "BelosIteration.hpp"
00041 #include "BelosConfigDefs.hpp"
00042 #include "Teuchos_Describable.hpp"
00043
00053 namespace Belos {
00054
00056
00057
00060 class StatusTestError : public BelosError
00061 {public: StatusTestError(const std::string& what_arg) : BelosError(what_arg) {}};
00062
00064
00065 template <class ScalarType, class MV, class OP>
00066 class StatusTest : public Teuchos::Describable {
00067
00068 public:
00070
00071
00073 StatusTest() {};
00074
00076 virtual ~StatusTest() {};
00078
00080
00081
00082
00090 virtual StatusType checkStatus( Iteration<ScalarType,MV,OP>* iSolver ) = 0;
00091
00093 virtual StatusType getStatus() const = 0;
00095
00097
00098
00099
00104 virtual void reset() = 0;
00106
00108
00109
00111 virtual void print(std::ostream& os, int indent = 0) const = 0;
00112
00114 virtual void printStatus(std::ostream& os, StatusType type) const {
00115 os << std::left << std::setw(13) << std::setfill('.');
00116 switch (type) {
00117 case Passed:
00118 os << "Passed";
00119 break;
00120 case Failed:
00121 os << "Failed";
00122 break;
00123 case Undefined:
00124 default:
00125 os << "**";
00126 break;
00127 }
00128 os << std::left << std::setfill(' ');
00129 return;
00130 };
00132
00133 };
00134
00135 }
00136
00137 #endif