OGS
|
Option for Eigen sparse solver.
Definition at line 18 of file EigenOption.h.
#include <EigenOption.h>
Public Types | |
enum class | SolverType : short { CG , LeastSquareCG , BiCGSTAB , BiCGSTABL , IDRS , IDRSTABL , SparseLU , PardisoLU , GMRES } |
Solver type. More... | |
enum class | PreconType : short { NONE , DIAGONAL , LeastSquareDIAGONAL , 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 | |
LeastSquareDIAGONAL | |
ILUT |
Definition at line 35 of file EigenOption.h.
|
strong |
Solver type.
Enumerator | |
---|---|
CG | |
LeastSquareCG | |
BiCGSTAB | |
BiCGSTABL | |
IDRS | |
IDRSTABL | |
SparseLU | |
PardisoLU | |
GMRES |
Definition at line 21 of file EigenOption.h.
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 126 of file EigenOption.cpp.
References DIAGONAL, ILUT, LeastSquareDIAGONAL, 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 77 of file EigenOption.cpp.
References DIAGONAL, ILUT, LeastSquareDIAGONAL, NONE, and OGS_FATAL.
Referenced by MathLib::LinearSolverOptionsParser< EigenLinearSolver >::parseNameAndOptions().
|
static |
return a linear solver name from the solver type
Definition at line 100 of file EigenOption.cpp.
References BiCGSTAB, BiCGSTABL, CG, GMRES, IDRS, IDRSTABL, LeastSquareCG, 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, LeastSquareCG, OGS_FATAL, PardisoLU, and SparseLU.
Referenced by MathLib::LinearSolverOptionsParser< EigenLinearSolver >::parseNameAndOptions().
double MathLib::EigenOption::error_tolerance |
Error tolerance.
Definition at line 50 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 48 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 46 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 44 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().