Definition at line 26 of file EigenLinearSolver.h.
#include <EigenLinearSolver.h>
◆ EigenLinearSolver()
MathLib::EigenLinearSolver::EigenLinearSolver |
( |
std::string const & | solver_name, |
|
|
EigenOption const & | option ) |
|
explicit |
Constructor
- Parameters
-
solver_name | A name used as a prefix for command line options if there are such options available. |
option | Eigen linear solver options. |
Definition at line 485 of file EigenLinearSolver.cpp.
488{
490
492 {
494 {
495 using SolverType =
496 Eigen::SparseLU<Matrix, Eigen::COLAMDOrdering<int>>;
498 details::EigenDirectLinearSolver<SolverType>>();
500 return;
501 }
511 return;
516 return;
518 {
519#ifdef USE_MKL
520 using SolverType = Eigen::PardisoLU<EigenMatrix::RawMatrixType>;
521 solver_.reset(
new details::EigenDirectLinearSolver<SolverType>);
523 return;
524#else
526 "The code is not compiled with Intel MKL. Linear solver type "
527 "PardisoLU is not available.");
528#endif
529 }
530 }
531
532 OGS_FATAL(
"Invalid Eigen linear solver type. Aborting.");
533}
bool can_solve_rectangular_
std::unique_ptr< EigenLinearSolverBase > solver_
Eigen::SparseMatrix< double, Eigen::RowMajor > RawMatrixType
std::unique_ptr< EigenLinearSolverBase > createIterativeSolver()
PreconType precon_type
Preconditioner type.
SolverType solver_type
Linear solver type.
References MathLib::EigenOption::BiCGSTAB, MathLib::EigenOption::BiCGSTABL, can_solve_rectangular_, MathLib::EigenOption::CG, MathLib::details::createIterativeSolver(), MathLib::EigenOption::GMRES, MathLib::EigenOption::IDRS, MathLib::EigenOption::IDRSTABL, MathLib::EigenOption::LeastSquareCG, OGS_FATAL, option_, MathLib::EigenOption::PardisoLU, MathLib::EigenOption::precon_type, solver_, MathLib::EigenOption::solver_type, and MathLib::EigenOption::SparseLU.
◆ ~EigenLinearSolver()
MathLib::EigenLinearSolver::~EigenLinearSolver |
( |
| ) |
|
|
default |
◆ canSolveRectangular()
bool MathLib::EigenLinearSolver::canSolveRectangular |
( |
| ) |
const |
|
inline |
◆ compute()
Performs the compute() step of the Eigen linear solver.
I.e., computes the (LU) decomposition in case of a direct solver, or computes the preconditioner of an iterative solver.
Definition at line 537 of file EigenLinearSolver.cpp.
540{
541 INFO(
"------------------------------------------------------------------");
542 INFO(
"*** Eigen solver compute()");
543
544 return solver_->compute(A.getRawMatrix(),
option_, linear_solver_behaviour);
545}
void INFO(fmt::format_string< Args... > fmt, Args &&... args)
References MathLib::EigenMatrix::getRawMatrix(), INFO(), option_, and solver_.
◆ getOption()
EigenOption & MathLib::EigenLinearSolver::getOption |
( |
| ) |
|
|
inline |
◆ setAngle()
void MathLib::EigenLinearSolver::setAngle |
( |
| ) |
|
|
protected |
◆ setL()
void MathLib::EigenLinearSolver::setL |
( |
| ) |
|
|
protected |
◆ setOption()
void MathLib::EigenLinearSolver::setOption |
( |
const EigenOption & | option | ) |
|
|
inline |
◆ setResidualUpdate()
void MathLib::EigenLinearSolver::setResidualUpdate |
( |
| ) |
|
|
protected |
◆ setRestart()
void MathLib::EigenLinearSolver::setRestart |
( |
| ) |
|
|
protected |
◆ setS()
void MathLib::EigenLinearSolver::setS |
( |
| ) |
|
|
protected |
◆ setSmoothing()
void MathLib::EigenLinearSolver::setSmoothing |
( |
| ) |
|
|
protected |
◆ solve() [1/2]
◆ solve() [2/2]
◆ can_solve_rectangular_
bool MathLib::EigenLinearSolver::can_solve_rectangular_ = false |
|
protected |
◆ option_
◆ solver_
The documentation for this class was generated from the following files: