Anasazi
Version of the Day
Toggle main menu visibility
Loading...
Searching...
No Matches
src
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
52
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
{
76
typename
Teuchos::ScalarTraits<ScalarType>::magnitudeType
realpart
;
78
typename
Teuchos::ScalarTraits<ScalarType>::magnitudeType
imagpart
;
79
void
set(
const
typename
Teuchos::ScalarTraits<ScalarType>::magnitudeType &rp,
const
typename
Teuchos::ScalarTraits<ScalarType>::magnitudeType &ip){
80
realpart
=rp;
imagpart
=ip;
81
}
82
Value<ScalarType>
&operator=(
const
Value<ScalarType>
&rhs) {
83
realpart
=rhs.
realpart
;
imagpart
=rhs.
imagpart
;
84
return
*
this
;
85
}
86
};
87
89
template
<
class
ScalarType,
class
MV>
90
struct
Eigensolution {
92
Teuchos::RCP<MV>
Evecs
;
94
Teuchos::RCP<MV>
Espace
;
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
120
enum
ReturnType
121
{
122
Converged
,
123
Unconverged
124
};
125
126
131
enum
ConjType
132
{
133
NO_CONJ
,
134
CONJ
135
};
136
137
141
enum
TestStatus
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,
165
IterationDetails
= 0x2,
166
OrthoDetails
= 0x4,
167
FinalSummary
= 0x8,
168
TimingDetails
= 0x10,
169
StatusTestDetails
= 0x20,
170
Debug
= 0x40
171
};
172
174
175
}
// end of namespace Anasazi
176
#endif
177
// end of file AnasaziTypes.hpp
AnasaziConfigDefs.hpp
Anasazi header file which uses auto-configuration information to include necessary C++ headers.
Anasazi
Namespace Anasazi contains the classes, structs, enums and utilities used by the Anasazi package.
Anasazi::ReturnType
ReturnType
Enumerated type used to pass back information from a solver manager.
Definition
AnasaziTypes.hpp:121
Anasazi::Unconverged
@ Unconverged
Definition
AnasaziTypes.hpp:123
Anasazi::Converged
@ Converged
Definition
AnasaziTypes.hpp:122
Anasazi::ResType
ResType
Enumerated type used to specify which residual norm used by residual norm status tests.
Definition
AnasaziTypes.hpp:151
Anasazi::ConjType
ConjType
Enumerated types used to specify conjugation arguments.
Definition
AnasaziTypes.hpp:132
Anasazi::CONJ
@ CONJ
Definition
AnasaziTypes.hpp:134
Anasazi::NO_CONJ
@ NO_CONJ
Definition
AnasaziTypes.hpp:133
Anasazi::MsgType
MsgType
Enumerated list of available message types recognized by the eigensolvers.
Definition
AnasaziTypes.hpp:162
Anasazi::Errors
@ Errors
Definition
AnasaziTypes.hpp:163
Anasazi::Debug
@ Debug
Definition
AnasaziTypes.hpp:170
Anasazi::OrthoDetails
@ OrthoDetails
Definition
AnasaziTypes.hpp:166
Anasazi::IterationDetails
@ IterationDetails
Definition
AnasaziTypes.hpp:165
Anasazi::StatusTestDetails
@ StatusTestDetails
Definition
AnasaziTypes.hpp:169
Anasazi::Warnings
@ Warnings
Definition
AnasaziTypes.hpp:164
Anasazi::FinalSummary
@ FinalSummary
Definition
AnasaziTypes.hpp:167
Anasazi::TimingDetails
@ TimingDetails
Definition
AnasaziTypes.hpp:168
Anasazi::TestStatus
TestStatus
Enumerated type used to pass back information from a StatusTest.
Definition
AnasaziTypes.hpp:142
Anasazi::Undefined
@ Undefined
Definition
AnasaziTypes.hpp:145
Anasazi::Passed
@ Passed
Definition
AnasaziTypes.hpp:143
Anasazi::Failed
@ Failed
Definition
AnasaziTypes.hpp:144
Anasazi::Eigensolution::Evecs
Teuchos::RCP< MV > Evecs
The computed eigenvectors.
Definition
AnasaziTypes.hpp:92
Anasazi::Eigensolution::index
std::vector< int > index
An index into Evecs to allow compressed storage of eigenvectors for real, non-Hermitian problems.
Definition
AnasaziTypes.hpp:105
Anasazi::Eigensolution::numVecs
int numVecs
The number of computed eigenpairs.
Definition
AnasaziTypes.hpp:107
Anasazi::Eigensolution::Espace
Teuchos::RCP< MV > Espace
An orthonormal basis for the computed eigenspace.
Definition
AnasaziTypes.hpp:94
Anasazi::Eigensolution::Evals
std::vector< Value< ScalarType > > Evals
The computed eigenvalues.
Definition
AnasaziTypes.hpp:96
Anasazi::Value
This struct is used for storing eigenvalues and Ritz values, as a pair of real values.
Definition
AnasaziTypes.hpp:74
Anasazi::Value::imagpart
Teuchos::ScalarTraits< ScalarType >::magnitudeType imagpart
The imaginary component of the eigenvalue.
Definition
AnasaziTypes.hpp:78
Anasazi::Value::realpart
Teuchos::ScalarTraits< ScalarType >::magnitudeType realpart
The real component of the eigenvalue.
Definition
AnasaziTypes.hpp:76
Generated by
1.17.0