GEOSX
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 
36 {
40  enum class Status
41  {
42  InProgress,
43  Success,
44  NotConverged,
45  Breakdown
46  };
47 
49  Status status = Status::InProgress;
50 
53 
56 
59 
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 
84  "InProgress",
85  "Success",
86  "NotConverged",
87  "Breakdown" );
88 
89 }
90 
91 #endif //GEOS_LINEARALGEBRA_UTILITIES_LINEARSOLVERRESULT_HPP_
ENUM_STRINGS(LinearSolverParameters::SolverType, "direct", "cg", "gmres", "fgmres", "bicgstab", "preconditioner")
Declare strings associated with enumeration values.
double real64
64-bit floating point type.
Definition: DataTypes.hpp:139
std::int32_t integer
Signed integer type.
Definition: DataTypes.hpp:122
Results/stats of a linear solve.
bool success() const
Check whether the last solve was successful.
real64 residualReduction
Final relative residual norm.
real64 setupTime
Setup time (in seconds) for preconditioners and/or direct factorizations.
Status status
convergence flag
bool breakdown() const
Check whether the last solve brokedown.
real64 solveTime
Solve time (in seconds) exclusive of setup costs.
Status
Status of the linear solve.
integer numIterations
Number of solver iterations performed.