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
00108 enum ResetType { Problem = 0x1,
00109 RecycleSubspace = 0x2
00110 };
00111
00115 inline
00116 const char* toString(const StatusType status)
00117 {
00118 switch(status) {
00119 case Passed:
00120 return "Passed";
00121 case Failed:
00122 return "Failed";
00123 case Undefined:
00124 return "Undefined";
00125 default:
00126 TEST_FOR_EXCEPT(true);
00127 }
00128 return NULL;
00129 }
00130
00137 enum ConjType {
00138 NO_CONJ,
00139 CONJ
00140 };
00141
00146 enum MsgType
00147 {
00148 Errors= 0,
00149 Warnings = 0x1,
00150 IterationDetails = 0x2,
00151 OrthoDetails = 0x4,
00152 FinalSummary = 0x8,
00153 TimingDetails = 0x10,
00154 StatusTestDetails = 0x20,
00155 Debug = 0x40
00156 };
00157
00158 }
00159
00160 #endif