OGS
|
Option for Eigen sparse solver.
Definition at line 18 of file EigenOption.h.
#include <EigenOption.h>
Public Types | |
enum class | SolverType : short { CG , BiCGSTAB , BiCGSTABL , IDRS , IDRSTABL , SparseLU , PardisoLU , GMRES } |
Solver type. More... | |
enum class | PreconType : short { NONE , DIAGONAL , ILUT } |
Preconditioner type. More... | |
Public Member Functions | |
EigenOption () | |
Static Public Member Functions | |
static SolverType | getSolverType (const std::string &solver_name) |
static PreconType | getPreconType (const std::string &precon_name) |
static std::string | getSolverName (SolverType const solver_type) |
return a linear solver name from the solver type | |
static std::string | getPreconName (PreconType const precon_type) |
return a preconditioner name from the preconditioner type | |
Public Attributes | |
SolverType | solver_type |
Linear solver type. | |
PreconType | precon_type |
Preconditioner type. | |
int | max_iterations |
Maximum iteration count. | |
double | error_tolerance |
Error tolerance. | |
|
strong |
Preconditioner type.
Enumerator | |
---|---|
NONE | |
DIAGONAL | |
ILUT |
Definition at line 34 of file EigenOption.h.
|
strong |
MathLib::EigenOption::EigenOption | ( | ) |
Constructor
Default options are CG, no preconditioner, iteration count 500 and tolerance 1e-10. Default matrix storage type is CRS.
Definition at line 17 of file EigenOption.cpp.
References error_tolerance, max_iterations, NONE, precon_type, MathLib::s, solver_type, and SparseLU.
|
static |
return a preconditioner name from the preconditioner type
Definition at line 116 of file EigenOption.cpp.
References DIAGONAL, ILUT, NONE, and precon_type.
Referenced by MathLib::details::EigenIterativeLinearSolver< T_SOLVER >::computeImpl(), and MathLib::details::EigenIterativeLinearSolver< T_SOLVER >::solveImpl().
|
static |
return a preconditioner type from the name
precon_name |
Definition at line 73 of file EigenOption.cpp.
References DIAGONAL, ILUT, NONE, and OGS_FATAL.
Referenced by MathLib::LinearSolverOptionsParser< EigenLinearSolver >::parseNameAndOptions().
|
static |
return a linear solver name from the solver type
Definition at line 92 of file EigenOption.cpp.
References BiCGSTAB, BiCGSTABL, CG, GMRES, IDRS, IDRSTABL, PardisoLU, solver_type, and SparseLU.
Referenced by MathLib::details::EigenDirectLinearSolver< T_SOLVER >::computeImpl(), MathLib::details::EigenIterativeLinearSolver< T_SOLVER >::computeImpl(), MathLib::details::EigenDirectLinearSolver< T_SOLVER >::solveImpl(), and MathLib::details::EigenIterativeLinearSolver< T_SOLVER >::solveImpl().
|
static |
return a linear solver type from the solver name
solver_name |
Definition at line 34 of file EigenOption.cpp.
References BiCGSTAB, BiCGSTABL, CG, GMRES, IDRS, IDRSTABL, OGS_FATAL, PardisoLU, and SparseLU.
Referenced by MathLib::LinearSolverOptionsParser< EigenLinearSolver >::parseNameAndOptions().
double MathLib::EigenOption::error_tolerance |
Error tolerance.
Definition at line 48 of file EigenOption.h.
Referenced by EigenOption(), MathLib::details::EigenIterativeLinearSolver< T_SOLVER >::computeImpl(), and MathLib::LinearSolverOptionsParser< EigenLinearSolver >::parseNameAndOptions().
int MathLib::EigenOption::max_iterations |
Maximum iteration count.
Definition at line 46 of file EigenOption.h.
Referenced by EigenOption(), MathLib::details::EigenIterativeLinearSolver< T_SOLVER >::computeImpl(), MathLib::LinearSolverOptionsParser< EigenLinearSolver >::parseNameAndOptions(), and MathLib::details::EigenIterativeLinearSolver< T_SOLVER >::solveImpl().
PreconType MathLib::EigenOption::precon_type |
Preconditioner type.
Definition at line 44 of file EigenOption.h.
Referenced by MathLib::EigenLinearSolver::EigenLinearSolver(), EigenOption(), MathLib::details::EigenIterativeLinearSolver< T_SOLVER >::computeImpl(), getPreconName(), MathLib::LinearSolverOptionsParser< EigenLinearSolver >::parseNameAndOptions(), and MathLib::details::EigenIterativeLinearSolver< T_SOLVER >::solveImpl().
SolverType MathLib::EigenOption::solver_type |
Linear solver type.
Definition at line 42 of file EigenOption.h.
Referenced by MathLib::EigenLinearSolver::EigenLinearSolver(), EigenOption(), MathLib::details::EigenDirectLinearSolver< T_SOLVER >::computeImpl(), MathLib::details::EigenIterativeLinearSolver< T_SOLVER >::computeImpl(), getSolverName(), MathLib::LinearSolverOptionsParser< EigenLinearSolver >::parseNameAndOptions(), MathLib::details::EigenDirectLinearSolver< T_SOLVER >::solveImpl(), and MathLib::details::EigenIterativeLinearSolver< T_SOLVER >::solveImpl().