Belos
Version of the Day
Toggle main menu visibility
Loading...
Searching...
No Matches
src
BelosTypes.hpp
Go to the documentation of this file.
1
// @HEADER
2
// *****************************************************************************
3
// Belos: Block Linear Solvers Package
4
//
5
// Copyright 2004-2016 NTESS and the Belos contributors.
6
// SPDX-License-Identifier: BSD-3-Clause
7
// *****************************************************************************
8
// @HEADER
9
10
#ifndef BELOS_TYPES_HPP
11
#define BELOS_TYPES_HPP
12
17
18
#include "
BelosConfigDefs.hpp
"
19
#include "Teuchos_Assert.hpp"
20
21
namespace
Belos
{
22
24
25
28
class
BelosError
:
public
std::logic_error {
29
public
:
30
BelosError
(
const
std::string& what_arg) : std::logic_error(what_arg) {}
31
};
32
34
35
49
enum
ETrans
{
NOTRANS
= 0,
50
TRANS
= 1,
51
CONJTRANS
= 2
52
};
53
65
enum
NormType
{
OneNorm
,
66
TwoNorm
,
67
InfNorm
,
68
PreconditionerNorm
69
};
70
88
enum
ScaleType
{
NormOfRHS
,
89
NormOfInitRes
,
90
NormOfPrecInitRes
,
91
None
,
92
UserProvided
,
93
NormOfFullInitRes
,
94
NormOfFullPrecInitRes
,
95
NormOfFullScaledInitRes
,
96
NormOfFullScaledPrecInitRes
97
};
98
109
enum
OutputType
{
General
,
110
Brief
,
111
User
112
};
113
123
enum
ReturnType
{
124
Converged
,
125
Unconverged
126
};
127
129
std::string
130
convertReturnTypeToString
(
const
ReturnType
result);
131
157
enum
StatusType
{
Passed
= 0x1,
158
Failed
= 0x2,
159
Undefined
= 0x4
160
};
161
174
enum
ResetType
{
Problem
= 0x1,
175
RecycleSubspace
= 0x2
176
};
177
179
std::string
180
convertStatusTypeToString
(
const
StatusType
status);
181
183
StatusType
184
convertStringToStatusType
(
const
std::string& status);
185
187
NormType
188
convertStringToNormType
(
const
std::string& normType);
189
191
ScaleType
192
convertStringToScaleType
(
const
std::string& scaleType);
193
195
std::string
196
convertScaleTypeToString
(
const
ScaleType
scaleType);
197
206
enum
ConjType
{
207
NO_CONJ
,
208
CONJ
209
};
210
222
enum
MsgType
{
223
Errors
= 0,
224
Warnings
= 0x1,
225
IterationDetails
= 0x2,
226
OrthoDetails
= 0x4,
227
FinalSummary
= 0x8,
228
TimingDetails
= 0x10,
229
StatusTestDetails
= 0x20,
230
Debug
= 0x40
231
};
232
243
std::string
244
convertMsgTypeToString
(
const
MsgType
msgType);
245
251
struct
DefaultSolverParameters
{
261
static
const
double
convTol
;
262
264
static
const
double
polyTol
;
265
267
static
const
double
orthoKappa
;
268
270
static
const
double
resScaleFactor
;
271
273
static
const
double
impTolScale
;
274
};
275
276
277
}
// end Belos namespace
278
279
#endif
/* BELOS_TYPES_HPP */
BelosConfigDefs.hpp
Belos header file which uses auto-configuration information to include necessary C++ headers.
Belos::BelosError::BelosError
BelosError(const std::string &what_arg)
Definition
BelosTypes.hpp:30
Belos
Definition
Belos_Details_EBelosSolverType.cpp:13
Belos::convertMsgTypeToString
std::string convertMsgTypeToString(const MsgType msgType)
Show MsgType as a comma-delimited list of names.
Definition
BelosTypes.cpp:114
Belos::convertStringToScaleType
ScaleType convertStringToScaleType(const std::string &scaleType)
Convert the given string to its ScaleType enum value.
Definition
BelosTypes.cpp:74
Belos::NormType
NormType
The type of vector norm to compute.
Definition
BelosTypes.hpp:65
Belos::InfNorm
@ InfNorm
Definition
BelosTypes.hpp:67
Belos::OneNorm
@ OneNorm
Definition
BelosTypes.hpp:65
Belos::PreconditionerNorm
@ PreconditionerNorm
Definition
BelosTypes.hpp:68
Belos::TwoNorm
@ TwoNorm
Definition
BelosTypes.hpp:66
Belos::MsgType
MsgType
Available message types recognized by the linear solvers.
Definition
BelosTypes.hpp:222
Belos::OrthoDetails
@ OrthoDetails
Definition
BelosTypes.hpp:226
Belos::StatusTestDetails
@ StatusTestDetails
Definition
BelosTypes.hpp:229
Belos::FinalSummary
@ FinalSummary
Definition
BelosTypes.hpp:227
Belos::TimingDetails
@ TimingDetails
Definition
BelosTypes.hpp:228
Belos::Errors
@ Errors
Definition
BelosTypes.hpp:223
Belos::IterationDetails
@ IterationDetails
Definition
BelosTypes.hpp:225
Belos::Warnings
@ Warnings
Definition
BelosTypes.hpp:224
Belos::Debug
@ Debug
Definition
BelosTypes.hpp:230
Belos::StatusType
StatusType
Whether the StatusTest wants iteration to stop.
Definition
BelosTypes.hpp:157
Belos::Failed
@ Failed
Definition
BelosTypes.hpp:158
Belos::Undefined
@ Undefined
Definition
BelosTypes.hpp:159
Belos::Passed
@ Passed
Definition
BelosTypes.hpp:157
Belos::convertStringToNormType
NormType convertStringToNormType(const std::string &normType)
Convert the given string to its NormType enum value.
Definition
BelosTypes.cpp:56
Belos::ReturnType
ReturnType
Whether the Belos solve converged for all linear systems.
Definition
BelosTypes.hpp:123
Belos::Unconverged
@ Unconverged
Definition
BelosTypes.hpp:125
Belos::Converged
@ Converged
Definition
BelosTypes.hpp:124
Belos::convertScaleTypeToString
std::string convertScaleTypeToString(const ScaleType scaleType)
Convert the given ScaleType enum value to its corresponding string.
Definition
BelosTypes.cpp:94
Belos::OutputType
OutputType
Style of output used to display status test information.
Definition
BelosTypes.hpp:109
Belos::General
@ General
Definition
BelosTypes.hpp:109
Belos::User
@ User
Definition
BelosTypes.hpp:111
Belos::Brief
@ Brief
Definition
BelosTypes.hpp:110
Belos::ConjType
ConjType
Whether or not to conjugate the transpose for block inner products.
Definition
BelosTypes.hpp:206
Belos::CONJ
@ CONJ
Definition
BelosTypes.hpp:208
Belos::NO_CONJ
@ NO_CONJ
Definition
BelosTypes.hpp:207
Belos::convertStatusTypeToString
std::string convertStatusTypeToString(const StatusType status)
The string name corresponding to the given StatusType enum value.
Definition
BelosTypes.cpp:34
Belos::ScaleType
ScaleType
The type of scaling to use on the residual norm value.
Definition
BelosTypes.hpp:88
Belos::UserProvided
@ UserProvided
Definition
BelosTypes.hpp:92
Belos::None
@ None
Definition
BelosTypes.hpp:91
Belos::NormOfFullInitRes
@ NormOfFullInitRes
Definition
BelosTypes.hpp:93
Belos::NormOfFullPrecInitRes
@ NormOfFullPrecInitRes
Definition
BelosTypes.hpp:94
Belos::NormOfFullScaledPrecInitRes
@ NormOfFullScaledPrecInitRes
Definition
BelosTypes.hpp:96
Belos::NormOfFullScaledInitRes
@ NormOfFullScaledInitRes
Definition
BelosTypes.hpp:95
Belos::NormOfPrecInitRes
@ NormOfPrecInitRes
Definition
BelosTypes.hpp:90
Belos::NormOfInitRes
@ NormOfInitRes
Definition
BelosTypes.hpp:89
Belos::NormOfRHS
@ NormOfRHS
Definition
BelosTypes.hpp:88
Belos::ETrans
ETrans
Whether to apply the (conjugate) transpose of an operator.
Definition
BelosTypes.hpp:49
Belos::NOTRANS
@ NOTRANS
Definition
BelosTypes.hpp:49
Belos::CONJTRANS
@ CONJTRANS
Definition
BelosTypes.hpp:51
Belos::TRANS
@ TRANS
Definition
BelosTypes.hpp:50
Belos::ResetType
ResetType
How to reset the solver.
Definition
BelosTypes.hpp:174
Belos::Problem
@ Problem
Definition
BelosTypes.hpp:174
Belos::RecycleSubspace
@ RecycleSubspace
Definition
BelosTypes.hpp:175
Belos::convertReturnTypeToString
std::string convertReturnTypeToString(const ReturnType result)
Convert the given ReturnType enum value to its corresponding string.
Definition
BelosTypes.cpp:165
Belos::convertStringToStatusType
StatusType convertStringToStatusType(const std::string &status)
The StatusType enum value corresponding to the given string name.
Definition
BelosTypes.cpp:40
Belos::DefaultSolverParameters
Default parameters common to most Belos solvers.
Definition
BelosTypes.hpp:251
Belos::DefaultSolverParameters::resScaleFactor
static const double resScaleFactor
User-defined residual scaling factor.
Definition
BelosTypes.hpp:270
Belos::DefaultSolverParameters::impTolScale
static const double impTolScale
"Implicit Tolerance Scale Factor"
Definition
BelosTypes.hpp:273
Belos::DefaultSolverParameters::convTol
static const double convTol
Default convergence tolerance.
Definition
BelosTypes.hpp:261
Belos::DefaultSolverParameters::orthoKappa
static const double orthoKappa
DGKS orthogonalization constant.
Definition
BelosTypes.hpp:267
Belos::DefaultSolverParameters::polyTol
static const double polyTol
Relative residual tolerance for matrix polynomial construction.
Definition
BelosTypes.hpp:264
Generated for Belos by
1.17.0