Belos Package Browser (Single Doxygen Collection)
Development
Toggle main menu visibility
Loading...
Searching...
No Matches
src
BelosTypes.hpp
Go to the documentation of this file.
1
//@HEADER
2
// ************************************************************************
3
//
4
// Belos: Block Linear Solvers Package
5
// Copyright 2004 Sandia Corporation
6
//
7
// Under the 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 BELOS_TYPES_HPP
43
#define BELOS_TYPES_HPP
44
49
50
#include "
BelosConfigDefs.hpp
"
51
#include "Teuchos_Assert.hpp"
52
53
namespace
Belos
{
54
56
57
60
class
BelosError
:
public
std::logic_error {
61
public
:
62
BelosError
(
const
std::string& what_arg) : std::logic_error(what_arg) {}
63
};
64
66
67
81
enum
ETrans
{
NOTRANS
= 0,
82
TRANS
= 1,
83
CONJTRANS
= 2
84
};
85
97
enum
NormType
{
OneNorm
,
98
TwoNorm
,
99
InfNorm
,
100
PreconditionerNorm
101
};
102
120
enum
ScaleType
{
NormOfRHS
,
121
NormOfInitRes
,
122
NormOfPrecInitRes
,
123
None
,
124
UserProvided
,
125
NormOfFullInitRes
,
126
NormOfFullPrecInitRes
,
127
NormOfFullScaledInitRes
,
128
NormOfFullScaledPrecInitRes
129
};
130
141
enum
OutputType
{
General
,
142
Brief
,
143
User
144
};
145
155
enum
ReturnType
{
156
Converged
,
157
Unconverged
158
};
159
161
std::string
162
convertReturnTypeToString
(
const
ReturnType
result);
163
189
enum
StatusType
{
Passed
= 0x1,
190
Failed
= 0x2,
191
Undefined
= 0x4
192
};
193
206
enum
ResetType
{
Problem
= 0x1,
207
RecycleSubspace
= 0x2
208
};
209
211
std::string
212
convertStatusTypeToString
(
const
StatusType
status);
213
215
StatusType
216
convertStringToStatusType
(
const
std::string& status);
217
219
NormType
220
convertStringToNormType
(
const
std::string& normType);
221
223
ScaleType
224
convertStringToScaleType
(
const
std::string& scaleType);
225
227
std::string
228
convertScaleTypeToString
(
const
ScaleType
scaleType);
229
238
enum
ConjType
{
239
NO_CONJ
,
240
CONJ
241
};
242
254
enum
MsgType
{
255
Errors
= 0,
256
Warnings
= 0x1,
257
IterationDetails
= 0x2,
258
OrthoDetails
= 0x4,
259
FinalSummary
= 0x8,
260
TimingDetails
= 0x10,
261
StatusTestDetails
= 0x20,
262
Debug
= 0x40
263
};
264
275
std::string
276
convertMsgTypeToString
(
const
MsgType
msgType);
277
283
struct
DefaultSolverParameters
{
293
static
const
double
convTol
;
294
296
static
const
double
polyTol
;
297
299
static
const
double
orthoKappa
;
300
302
static
const
double
resScaleFactor
;
303
305
static
const
double
impTolScale
;
306
};
307
308
309
}
// end Belos namespace
310
311
#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:62
Belos
Definition
Belos_Details_EBelosSolverType.cpp:45
Belos::convertMsgTypeToString
std::string convertMsgTypeToString(const MsgType msgType)
Show MsgType as a comma-delimited list of names.
Definition
BelosTypes.cpp:146
Belos::convertStringToScaleType
ScaleType convertStringToScaleType(const std::string &scaleType)
Convert the given string to its ScaleType enum value.
Definition
BelosTypes.cpp:106
Belos::NormType
NormType
The type of vector norm to compute.
Definition
BelosTypes.hpp:97
Belos::InfNorm
@ InfNorm
Definition
BelosTypes.hpp:99
Belos::OneNorm
@ OneNorm
Definition
BelosTypes.hpp:97
Belos::PreconditionerNorm
@ PreconditionerNorm
Definition
BelosTypes.hpp:100
Belos::TwoNorm
@ TwoNorm
Definition
BelosTypes.hpp:98
Belos::MsgType
MsgType
Available message types recognized by the linear solvers.
Definition
BelosTypes.hpp:254
Belos::OrthoDetails
@ OrthoDetails
Definition
BelosTypes.hpp:258
Belos::StatusTestDetails
@ StatusTestDetails
Definition
BelosTypes.hpp:261
Belos::FinalSummary
@ FinalSummary
Definition
BelosTypes.hpp:259
Belos::TimingDetails
@ TimingDetails
Definition
BelosTypes.hpp:260
Belos::Errors
@ Errors
Definition
BelosTypes.hpp:255
Belos::IterationDetails
@ IterationDetails
Definition
BelosTypes.hpp:257
Belos::Warnings
@ Warnings
Definition
BelosTypes.hpp:256
Belos::Debug
@ Debug
Definition
BelosTypes.hpp:262
Belos::StatusType
StatusType
Whether the StatusTest wants iteration to stop.
Definition
BelosTypes.hpp:189
Belos::Failed
@ Failed
Definition
BelosTypes.hpp:190
Belos::Undefined
@ Undefined
Definition
BelosTypes.hpp:191
Belos::Passed
@ Passed
Definition
BelosTypes.hpp:189
Belos::convertStringToNormType
NormType convertStringToNormType(const std::string &normType)
Convert the given string to its NormType enum value.
Definition
BelosTypes.cpp:88
Belos::ReturnType
ReturnType
Whether the Belos solve converged for all linear systems.
Definition
BelosTypes.hpp:155
Belos::Unconverged
@ Unconverged
Definition
BelosTypes.hpp:157
Belos::Converged
@ Converged
Definition
BelosTypes.hpp:156
Belos::convertScaleTypeToString
std::string convertScaleTypeToString(const ScaleType scaleType)
Convert the given ScaleType enum value to its corresponding string.
Definition
BelosTypes.cpp:126
Belos::OutputType
OutputType
Style of output used to display status test information.
Definition
BelosTypes.hpp:141
Belos::General
@ General
Definition
BelosTypes.hpp:141
Belos::User
@ User
Definition
BelosTypes.hpp:143
Belos::Brief
@ Brief
Definition
BelosTypes.hpp:142
Belos::ConjType
ConjType
Whether or not to conjugate the transpose for block inner products.
Definition
BelosTypes.hpp:238
Belos::CONJ
@ CONJ
Definition
BelosTypes.hpp:240
Belos::NO_CONJ
@ NO_CONJ
Definition
BelosTypes.hpp:239
Belos::convertStatusTypeToString
std::string convertStatusTypeToString(const StatusType status)
The string name corresponding to the given StatusType enum value.
Definition
BelosTypes.cpp:66
Belos::ScaleType
ScaleType
The type of scaling to use on the residual norm value.
Definition
BelosTypes.hpp:120
Belos::UserProvided
@ UserProvided
Definition
BelosTypes.hpp:124
Belos::None
@ None
Definition
BelosTypes.hpp:123
Belos::NormOfFullInitRes
@ NormOfFullInitRes
Definition
BelosTypes.hpp:125
Belos::NormOfFullPrecInitRes
@ NormOfFullPrecInitRes
Definition
BelosTypes.hpp:126
Belos::NormOfFullScaledPrecInitRes
@ NormOfFullScaledPrecInitRes
Definition
BelosTypes.hpp:128
Belos::NormOfFullScaledInitRes
@ NormOfFullScaledInitRes
Definition
BelosTypes.hpp:127
Belos::NormOfPrecInitRes
@ NormOfPrecInitRes
Definition
BelosTypes.hpp:122
Belos::NormOfInitRes
@ NormOfInitRes
Definition
BelosTypes.hpp:121
Belos::NormOfRHS
@ NormOfRHS
Definition
BelosTypes.hpp:120
Belos::ETrans
ETrans
Whether to apply the (conjugate) transpose of an operator.
Definition
BelosTypes.hpp:81
Belos::NOTRANS
@ NOTRANS
Definition
BelosTypes.hpp:81
Belos::CONJTRANS
@ CONJTRANS
Definition
BelosTypes.hpp:83
Belos::TRANS
@ TRANS
Definition
BelosTypes.hpp:82
Belos::ResetType
ResetType
How to reset the solver.
Definition
BelosTypes.hpp:206
Belos::Problem
@ Problem
Definition
BelosTypes.hpp:206
Belos::RecycleSubspace
@ RecycleSubspace
Definition
BelosTypes.hpp:207
Belos::convertReturnTypeToString
std::string convertReturnTypeToString(const ReturnType result)
Convert the given ReturnType enum value to its corresponding string.
Definition
BelosTypes.cpp:197
Belos::convertStringToStatusType
StatusType convertStringToStatusType(const std::string &status)
The StatusType enum value corresponding to the given string name.
Definition
BelosTypes.cpp:72
Belos::DefaultSolverParameters
Default parameters common to most Belos solvers.
Definition
BelosTypes.hpp:283
Belos::DefaultSolverParameters::resScaleFactor
static const double resScaleFactor
User-defined residual scaling factor.
Definition
BelosTypes.hpp:302
Belos::DefaultSolverParameters::impTolScale
static const double impTolScale
"Implicit Tolerance Scale Factor"
Definition
BelosTypes.hpp:305
Belos::DefaultSolverParameters::convTol
static const double convTol
Default convergence tolerance.
Definition
BelosTypes.hpp:293
Belos::DefaultSolverParameters::orthoKappa
static const double orthoKappa
DGKS orthogonalization constant.
Definition
BelosTypes.hpp:299
Belos::DefaultSolverParameters::polyTol
static const double polyTol
Relative residual tolerance for matrix polynomial construction.
Definition
BelosTypes.hpp:296
Generated by
1.17.0