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 ANASAZI_TYPES_HPP
00030 #define ANASAZI_TYPES_HPP
00031
00032 #include "AnasaziConfigDefs.hpp"
00033 #include "Teuchos_RefCountPtr.hpp"
00034 #include "Teuchos_ScalarTraits.hpp"
00035
00040 namespace Anasazi {
00041
00043
00044
00048 class AnasaziError : public std::logic_error {
00049 public: AnasaziError(const std::string& what_arg) : std::logic_error(what_arg) {}
00050 };
00051
00053
00055
00056
00058 template <class ScalarType>
00059 struct Value {
00061 typename Teuchos::ScalarTraits<ScalarType>::magnitudeType realpart;
00063 typename Teuchos::ScalarTraits<ScalarType>::magnitudeType imagpart;
00064 void set(const typename Teuchos::ScalarTraits<ScalarType>::magnitudeType &rp, const typename Teuchos::ScalarTraits<ScalarType>::magnitudeType &ip){
00065 realpart=rp;imagpart=ip;
00066 }
00067 Value<ScalarType> &operator=(const Value<ScalarType> &rhs) {
00068 realpart=rhs.realpart;imagpart=rhs.imagpart;
00069 return *this;
00070 }
00071 };
00072
00074 template <class ScalarType, class MV>
00075 struct Eigensolution {
00077 Teuchos::RefCountPtr<MV> Evecs;
00079 Teuchos::RefCountPtr<MV> Espace;
00081 std::vector<Value<ScalarType> > Evals;
00090 std::vector<int> index;
00092 int numVecs;
00093
00094 Eigensolution() : Evecs(),Espace(),Evals(0),index(0),numVecs(0) {}
00095 };
00096
00098
00100
00101
00105 enum ReturnType
00106 {
00107 Converged,
00108 Unconverged
00109 };
00110
00111
00116 enum ConjType
00117 {
00118 NO_CONJ,
00119 CONJ
00120 };
00121
00122
00126 enum TestStatus
00127 {
00128 Passed = 0x1,
00129 Failed = 0x2,
00130 Undefined = 0x4
00131 };
00132
00133
00137 enum MsgType
00138 {
00139 Errors = 0,
00140 Warnings = 0x1,
00141 IterationDetails = 0x2,
00142 OrthoDetails = 0x4,
00143 FinalSummary = 0x8,
00144 TimingDetails = 0x10,
00145 StatusTestDetails = 0x20,
00146 Debug = 0x40
00147 };
00148
00150
00151 }
00152 #endif
00153