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_RCP.hpp"
00034 #include "Teuchos_ScalarTraits.hpp"
00035
00040 namespace Anasazi {
00041
00042 typedef Teuchos_Ordinal Array_size_type;
00043
00045
00046
00050 class AnasaziError : public std::logic_error {
00051 public: AnasaziError(const std::string& what_arg) : std::logic_error(what_arg) {}
00052 };
00053
00055
00057
00058
00060 template <class ScalarType>
00061 struct Value {
00063 typename Teuchos::ScalarTraits<ScalarType>::magnitudeType realpart;
00065 typename Teuchos::ScalarTraits<ScalarType>::magnitudeType imagpart;
00066 void set(const typename Teuchos::ScalarTraits<ScalarType>::magnitudeType &rp, const typename Teuchos::ScalarTraits<ScalarType>::magnitudeType &ip){
00067 realpart=rp;imagpart=ip;
00068 }
00069 Value<ScalarType> &operator=(const Value<ScalarType> &rhs) {
00070 realpart=rhs.realpart;imagpart=rhs.imagpart;
00071 return *this;
00072 }
00073 };
00074
00076 template <class ScalarType, class MV>
00077 struct Eigensolution {
00079 Teuchos::RCP<MV> Evecs;
00081 Teuchos::RCP<MV> Espace;
00083 std::vector<Value<ScalarType> > Evals;
00092 std::vector<int> index;
00094 int numVecs;
00095
00096 Eigensolution() : Evecs(),Espace(),Evals(0),index(0),numVecs(0) {}
00097 };
00098
00100
00102
00103
00107 enum ReturnType
00108 {
00109 Converged,
00110 Unconverged
00111 };
00112
00113
00118 enum ConjType
00119 {
00120 NO_CONJ,
00121 CONJ
00122 };
00123
00124
00128 enum TestStatus
00129 {
00130 Passed = 0x1,
00131 Failed = 0x2,
00132 Undefined = 0x4
00133 };
00134
00135
00139 enum MsgType
00140 {
00141 Errors = 0,
00142 Warnings = 0x1,
00143 IterationDetails = 0x2,
00144 OrthoDetails = 0x4,
00145 FinalSummary = 0x8,
00146 TimingDetails = 0x10,
00147 StatusTestDetails = 0x20,
00148 Debug = 0x40
00149 };
00150
00152
00153 }
00154 #endif
00155