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,
26 IDRS,
30 GMRES
31 };
32
34 enum class PreconType : short
35 {
36 NONE,
38 ILUT
39 };
40
49#ifdef USE_EIGEN_UNSUPPORTED
51 bool scaling;
53 int restart;
54 int l;
55 int s;
56 double angle;
57 bool smoothing;
58 bool residualupdate;
59#endif
60
66
73 static SolverType getSolverType(const std::string& solver_name);
74
81 static PreconType getPreconType(const std::string& precon_name);
82
84 static std::string getSolverName(SolverType const solver_type);
85
87 static std::string getPreconName(PreconType const precon_type);
88};
89
90} // namespace MathLib
static const double s
Option for Eigen sparse solver.
Definition EigenOption.h:19
PreconType precon_type
Preconditioner type.
Definition EigenOption.h:44
static std::string getSolverName(SolverType const solver_type)
return a linear solver name from the solver type
PreconType
Preconditioner type.
Definition EigenOption.h:35
static PreconType getPreconType(const std::string &precon_name)
SolverType solver_type
Linear solver type.
Definition EigenOption.h:42
double error_tolerance
Error tolerance.
Definition EigenOption.h:48
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:46