Anasazi  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
AnasaziTypes.hpp
Go to the documentation of this file.
1 // @HEADER
2 // ***********************************************************************
3 //
4 // Anasazi: Block Eigensolvers Package
5 // Copyright 2004 Sandia Corporation
6 //
7 // Under terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
8 // the U.S. Government retains certain rights in this software.
9 //
10 // Redistribution and use in source and binary forms, with or without
11 // modification, are permitted provided that the following conditions are
12 // met:
13 //
14 // 1. Redistributions of source code must retain the above copyright
15 // notice, this list of conditions and the following disclaimer.
16 //
17 // 2. Redistributions in binary form must reproduce the above copyright
18 // notice, this list of conditions and the following disclaimer in the
19 // documentation and/or other materials provided with the distribution.
20 //
21 // 3. Neither the name of the Corporation nor the names of the
22 // contributors may be used to endorse or promote products derived from
23 // this software without specific prior written permission.
24 //
25 // THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
26 // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
27 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
28 // PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
29 // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
30 // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
31 // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
32 // PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
33 // LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
34 // NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
35 // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
36 //
37 // Questions? Contact Michael A. Heroux (maherou@sandia.gov)
38 //
39 // ***********************************************************************
40 // @HEADER
41 
42 #ifndef ANASAZI_TYPES_HPP
43 #define ANASAZI_TYPES_HPP
44 
45 #include "AnasaziConfigDefs.hpp"
46 #include "Teuchos_RCP.hpp"
47 #include "Teuchos_ScalarTraits.hpp"
48 
53 namespace Anasazi {
54 
55 typedef Teuchos_Ordinal Array_size_type;
56 
58 
59 
63  class AnasaziError : public std::logic_error {
64  public: AnasaziError(const std::string& what_arg) : std::logic_error(what_arg) {}
65  };
66 
68 
70 
71 
73  template <class ScalarType>
74  struct Value {
80  realpart=rp;imagpart=ip;
81  }
82  Value<ScalarType> &operator=(const Value<ScalarType> &rhs) {
84  return *this;
85  }
86  };
87 
89  template <class ScalarType, class MV>
90  struct Eigensolution {
96  std::vector<Value<ScalarType> > Evals;
105  std::vector<int> index;
107  int numVecs;
108 
109  Eigensolution() : Evecs(),Espace(),Evals(0),index(0),numVecs(0) {}
110  };
111 
113 
115 
116 
121  {
124  };
125 
126 
131  enum ConjType
132  {
135  };
136 
137 
142  {
143  Passed = 0x1,
144  Failed = 0x2,
145  Undefined = 0x4
146  };
147 
151  enum ResType {
152  RES_ORTH,
153  RES_2NORM,
154  RITZRES_2NORM
155  };
156 
157 
161  enum MsgType
162  {
163  Errors = 0,
164  Warnings = 0x1,
166  OrthoDetails = 0x4,
167  FinalSummary = 0x8,
168  TimingDetails = 0x10,
170  Debug = 0x40
171  };
172 
174 
175 } // end of namespace Anasazi
176 #endif
177 // end of file AnasaziTypes.hpp
std::vector< Value< ScalarType > > Evals
The computed eigenvalues.
ResType
Enumerated type used to specify which residual norm used by residual norm status tests.
Teuchos::ScalarTraits< ScalarType >::magnitudeType imagpart
The imaginary component of the eigenvalue.
Teuchos::RCP< MV > Evecs
The computed eigenvectors.
An exception class parent to all Anasazi exceptions.
TestStatus
Enumerated type used to pass back information from a StatusTest.
int numVecs
The number of computed eigenpairs.
ConjType
Enumerated types used to specify conjugation arguments.
Teuchos::RCP< MV > Espace
An orthonormal basis for the computed eigenspace.
ReturnType
Enumerated type used to pass back information from a solver manager.
std::vector< int > index
An index into Evecs to allow compressed storage of eigenvectors for real, non-Hermitian problems...
This struct is used for storing eigenvalues and Ritz values, as a pair of real values.
Anasazi header file which uses auto-configuration information to include necessary C++ headers...
Struct for storing an eigenproblem solution.
MsgType
Enumerated list of available message types recognized by the eigensolvers.
Teuchos::ScalarTraits< ScalarType >::magnitudeType realpart
The real component of the eigenvalue.