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
51#ifdef USE_EIGEN_UNSUPPORTED
53 bool scaling;
55 int restart;
56 int l;
57 int s;
58 double angle;
59 bool smoothing;
60 bool residualupdate;
61#endif
62
68
75 static SolverType getSolverType(const std::string& solver_name);
76
83 static PreconType getPreconType(const std::string& precon_name);
84
86 static std::string getSolverName(SolverType const solver_type);
87
89 static std::string getPreconName(PreconType const precon_type);
90};
91
92} // namespace MathLib
static const double s
Option for Eigen sparse solver.
Definition EigenOption.h:19
PreconType precon_type
Preconditioner type.
Definition EigenOption.h:46
static std::string getSolverName(SolverType const solver_type)
return a linear solver name from the solver type
PreconType
Preconditioner type.
Definition EigenOption.h:36
static PreconType getPreconType(const std::string &precon_name)
SolverType solver_type
Linear solver type.
Definition EigenOption.h:44
double error_tolerance
Error tolerance.
Definition EigenOption.h:50
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:48