OGS
EigenOption.h
Go to the documentation of this file.
1
11#pragma once
12
13#include <string>
14
15namespace MathLib
16{
18struct EigenOption final
19{
21 enum class SolverType : short
22 {
23 CG,
27 IDRS,
31 GMRES
32 };
33
35 enum class PreconType : short
36 {
37 NONE,
40 ILUT
41 };
42
44 enum class TriangularMatrixType : short
45 {
46 Lower,
47 Upper,
49 };
50
61#ifdef USE_EIGEN_UNSUPPORTED
63 bool scaling;
65 int restart;
66 int l;
67 int s;
68 double angle;
69 bool smoothing;
70 bool residualupdate;
71#endif
72
78
85 static SolverType getSolverType(const std::string& solver_name);
86
93 static PreconType getPreconType(const std::string& precon_name);
94
102 const std::string& triangular_matrix_name);
103
105 static std::string getSolverName(SolverType const solver_type);
106
108 static std::string getPreconName(PreconType const precon_type);
109
111 static std::string getTriangularMatrixName(
113};
114
115} // namespace MathLib
static const double s
Option for Eigen sparse solver.
Definition EigenOption.h:19
TriangularMatrixType
triangular matrix type
Definition EigenOption.h:45
static TriangularMatrixType getTriangularMatrixType(const std::string &triangular_matrix_name)
PreconType precon_type
Preconditioner type.
Definition EigenOption.h:54
static std::string getSolverName(SolverType const solver_type)
return a linear solver name from the solver type
TriangularMatrixType triangular_matrix_type
Triangular Matrix Type.
Definition EigenOption.h:56
PreconType
Preconditioner type.
Definition EigenOption.h:36
static std::string getTriangularMatrixName(TriangularMatrixType const triangular_matrix_type)
return a triangular matrix name from the preconditioner type
static PreconType getPreconType(const std::string &precon_name)
SolverType solver_type
Linear solver type.
Definition EigenOption.h:52
double error_tolerance
Error tolerance.
Definition EigenOption.h:60
SolverType
Solver type.
Definition EigenOption.h:22
static SolverType getSolverType(const std::string &solver_name)
static std::string getPreconName(PreconType const precon_type)
return a preconditioner name from the preconditioner type
int max_iterations
Maximum iteration count.
Definition EigenOption.h:58