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
00052 namespace Belos {
00053
00055
00056
00059 class StatusTestError : public BelosError
00060 {public: StatusTestError(const std::string& what_arg) : BelosError(what_arg) {}};
00061
00063
00064 template <class ScalarType, class MV, class OP>
00065 class StatusTest {
00066
00067 public:
00069
00070
00072 StatusTest() {};
00073
00075 virtual ~StatusTest() {};
00077
00079
00080
00081
00089 virtual StatusType checkStatus( Iteration<ScalarType,MV,OP>* iSolver ) = 0;
00090
00092 virtual StatusType getStatus() const = 0;
00094
00096
00097
00098
00103 virtual void reset() = 0;
00105
00107
00108
00110 virtual void print(std::ostream& os, int indent = 0) const = 0;
00111
00113 virtual void printStatus(std::ostream& os, StatusType type) const {
00114 os << std::left << std::setw(13) << std::setfill('.');
00115 switch (type) {
00116 case Passed:
00117 os << "Passed";
00118 break;
00119 case Failed:
00120 os << "Failed";
00121 break;
00122 case Undefined:
00123 default:
00124 os << "**";
00125 break;
00126 }
00127 os << std::left << std::setfill(' ');
00128 return;
00129 };
00131
00132 };
00133
00134 }
00135
00136 #endif