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 #ifndef BELOS_TYPES_HPP
00030 #define BELOS_TYPES_HPP
00031
00037 #include "BelosConfigDefs.hpp"
00038 #include "Teuchos_TestForException.hpp"
00039
00040 namespace Belos {
00041
00043
00044
00048 class BelosError: public std::logic_error {
00049 public: BelosError(const std::string& what_arg) : std::logic_error(what_arg) {}
00050 };
00051
00053
00054
00059 enum ETrans { NOTRANS = 0,
00060 TRANS = 1,
00061 CONJTRANS = 2
00062 };
00063
00068 enum NormType { OneNorm,
00069 TwoNorm,
00070 InfNorm
00071 };
00072
00077 enum ScaleType {NormOfRHS,
00078 NormOfInitRes,
00079 NormOfPrecInitRes,
00080 None,
00081 UserProvided
00083 };
00084
00085
00093 enum ReturnType { Converged,
00094 Unconverged
00095 };
00096
00103 enum StatusType { Passed = 0x1,
00104 Failed = 0x2,
00105 Undefined = 0x4
00106 };
00107
00111 inline
00112 const char* toString(const StatusType status)
00113 {
00114 switch(status) {
00115 case Passed:
00116 return "Passed";
00117 case Failed:
00118 return "Failed";
00119 case Undefined:
00120 return "Undefined";
00121 default:
00122 TEST_FOR_EXCEPT(true);
00123 }
00124 return NULL;
00125 }
00126
00133 enum ConjType {
00134 NO_CONJ,
00135 CONJ
00136 };
00137
00142 enum MsgType
00143 {
00144 Errors= 0,
00145 Warnings = 0x1,
00146 IterationDetails = 0x2,
00147 OrthoDetails = 0x4,
00148 FinalSummary = 0x8,
00149 TimingDetails = 0x10,
00150 StatusTestDetails = 0x20,
00151 Debug = 0x40
00152 };
00153
00154 }
00155
00156 #endif