GEOSX
coreComponents
linearAlgebra
utilities
LinearSolverResult.hpp
Go to the documentation of this file.
1
/*
2
* ------------------------------------------------------------------------------------------------------------
3
* SPDX-License-Identifier: LGPL-2.1-only
4
*
5
* Copyright (c) 2018-2020 Lawrence Livermore National Security LLC
6
* Copyright (c) 2018-2020 The Board of Trustees of the Leland Stanford Junior University
7
* Copyright (c) 2018-2020 TotalEnergies
8
* Copyright (c) 2019- GEOSX Contributors
9
* All rights reserved
10
*
11
* See top level LICENSE, COPYRIGHT, CONTRIBUTORS, NOTICE, and ACKNOWLEDGEMENTS files for details.
12
* ------------------------------------------------------------------------------------------------------------
13
*/
14
19
#ifndef GEOS_LINEARALGEBRA_UTILITIES_LINEARSOLVERRESULT_HPP_
20
#define GEOS_LINEARALGEBRA_UTILITIES_LINEARSOLVERRESULT_HPP_
21
22
#include "
common/DataTypes.hpp
"
23
24
#include <vector>
25
26
namespace
geos
27
{
28
35
struct
LinearSolverResult
36
{
40
enum class
Status
41
{
42
InProgress,
43
Success,
44
NotConverged,
45
Breakdown
46
};
47
49
Status
status
= Status::InProgress;
50
52
integer
numIterations
= 0;
53
55
real64
residualReduction
= 0.0;
56
58
real64
setupTime
= 0.0;
59
61
real64
solveTime
= 0.0;
62
67
bool
success
()
const
68
{
69
return
status
== Status::Success;
70
}
71
76
bool
breakdown
()
const
77
{
78
return
status
== Status::Breakdown;
79
}
80
};
81
83
ENUM_STRINGS
(
LinearSolverResult::Status
,
84
"InProgress"
,
85
"Success"
,
86
"NotConverged"
,
87
"Breakdown"
);
88
89
}
90
91
#endif
//GEOS_LINEARALGEBRA_UTILITIES_LINEARSOLVERRESULT_HPP_
DataTypes.hpp
geos
Definition:
DataLayouts.hpp:28
geos::ENUM_STRINGS
ENUM_STRINGS(LinearSolverParameters::SolverType, "direct", "cg", "gmres", "fgmres", "bicgstab", "preconditioner")
Declare strings associated with enumeration values.
geos::real64
double real64
64-bit floating point type.
Definition:
DataTypes.hpp:139
geos::integer
std::int32_t integer
Signed integer type.
Definition:
DataTypes.hpp:122
geos::LinearSolverResult
Results/stats of a linear solve.
Definition:
LinearSolverResult.hpp:36
geos::LinearSolverResult::success
bool success() const
Check whether the last solve was successful.
Definition:
LinearSolverResult.hpp:67
geos::LinearSolverResult::residualReduction
real64 residualReduction
Final relative residual norm.
Definition:
LinearSolverResult.hpp:55
geos::LinearSolverResult::setupTime
real64 setupTime
Setup time (in seconds) for preconditioners and/or direct factorizations.
Definition:
LinearSolverResult.hpp:58
geos::LinearSolverResult::status
Status status
convergence flag
Definition:
LinearSolverResult.hpp:49
geos::LinearSolverResult::breakdown
bool breakdown() const
Check whether the last solve brokedown.
Definition:
LinearSolverResult.hpp:76
geos::LinearSolverResult::solveTime
real64 solveTime
Solve time (in seconds) exclusive of setup costs.
Definition:
LinearSolverResult.hpp:61
geos::LinearSolverResult::Status
Status
Status of the linear solve.
Definition:
LinearSolverResult.hpp:41
geos::LinearSolverResult::numIterations
integer numIterations
Number of solver iterations performed.
Definition:
LinearSolverResult.hpp:52
Generated by
1.9.1