Anasazi Version of the Day
Loading...
Searching...
No Matches
AnasaziTypes.hpp
Go to the documentation of this file.
1// @HEADER
2// *****************************************************************************
3// Anasazi: Block Eigensolvers Package
4//
5// Copyright 2004 NTESS and the Anasazi contributors.
6// SPDX-License-Identifier: BSD-3-Clause
7// *****************************************************************************
8// @HEADER
9
10#ifndef ANASAZI_TYPES_HPP
11#define ANASAZI_TYPES_HPP
12
13#include "AnasaziConfigDefs.hpp"
14#include "Teuchos_RCP.hpp"
15#include "Teuchos_ScalarTraits.hpp"
16
21namespace Anasazi {
22
23typedef Teuchos_Ordinal Array_size_type;
24
26
27
31 class AnasaziError : public std::logic_error {
32 public: AnasaziError(const std::string& what_arg) : std::logic_error(what_arg) {}
33 };
34
36
38
39
41 template <class ScalarType>
42 struct Value {
44 typename Teuchos::ScalarTraits<ScalarType>::magnitudeType realpart;
46 typename Teuchos::ScalarTraits<ScalarType>::magnitudeType imagpart;
47 void set(const typename Teuchos::ScalarTraits<ScalarType>::magnitudeType &rp, const typename Teuchos::ScalarTraits<ScalarType>::magnitudeType &ip){
48 realpart=rp;imagpart=ip;
49 }
50 Value<ScalarType> &operator=(const Value<ScalarType> &rhs) {
52 return *this;
53 }
54 };
55
57 template <class ScalarType, class MV>
60 Teuchos::RCP<MV> Evecs;
62 Teuchos::RCP<MV> Espace;
64 std::vector<Value<ScalarType> > Evals;
73 std::vector<int> index;
76
77 Eigensolution() : Evecs(),Espace(),Evals(0),index(0),numVecs(0) {}
78 };
79
81
83
84
93
94
100 {
102 CONJ
103 };
104
105
110 {
111 Passed = 0x1,
112 Failed = 0x2,
113 Undefined = 0x4
114 };
115
119 enum ResType {
120 RES_ORTH,
121 RES_2NORM,
122 RITZRES_2NORM
123 };
124
125
140
142
143} // end of namespace Anasazi
144#endif
145// end of file AnasaziTypes.hpp
Anasazi header file which uses auto-configuration information to include necessary C++ headers.
An exception class parent to all Anasazi exceptions.
Namespace Anasazi contains the classes, structs, enums and utilities used by the Anasazi package.
ReturnType
Enumerated type used to pass back information from a solver manager.
ResType
Enumerated type used to specify which residual norm used by residual norm status tests.
ConjType
Enumerated types used to specify conjugation arguments.
MsgType
Enumerated list of available message types recognized by the eigensolvers.
TestStatus
Enumerated type used to pass back information from a StatusTest.
Struct for storing an eigenproblem solution.
Teuchos::RCP< MV > Evecs
The computed eigenvectors.
std::vector< int > index
An index into Evecs to allow compressed storage of eigenvectors for real, non-Hermitian problems.
int numVecs
The number of computed eigenpairs.
Teuchos::RCP< MV > Espace
An orthonormal basis for the computed eigenspace.
std::vector< Value< ScalarType > > Evals
The computed eigenvalues.
This struct is used for storing eigenvalues and Ritz values, as a pair of real values.
Teuchos::ScalarTraits< ScalarType >::magnitudeType imagpart
The imaginary component of the eigenvalue.
Teuchos::ScalarTraits< ScalarType >::magnitudeType realpart
The real component of the eigenvalue.