Definition at line 25 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 425 of file EigenLinearSolver.cpp.
428{
430
432 {
434 {
435 using SolverType =
436 Eigen::SparseLU<Matrix, Eigen::COLAMDOrdering<int>>;
438 details::EigenDirectLinearSolver<SolverType>>();
439 return;
440 }
449 return;
451 {
452#ifdef USE_MKL
453 using SolverType = Eigen::PardisoLU<EigenMatrix::RawMatrixType>;
454 solver_.reset(
new details::EigenDirectLinearSolver<SolverType>);
455 return;
456#else
458 "The code is not compiled with Intel MKL. Linear solver type "
459 "PardisoLU is not available.");
460#endif
461 }
462 }
463
464 OGS_FATAL(
"Invalid Eigen linear solver type. Aborting.");
465}
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, MathLib::EigenOption::CG, MathLib::details::createIterativeSolver(), MathLib::EigenOption::GMRES, MathLib::EigenOption::IDRS, MathLib::EigenOption::IDRSTABL, OGS_FATAL, option_, MathLib::EigenOption::PardisoLU, MathLib::EigenOption::precon_type, solver_, MathLib::EigenOption::solver_type, and MathLib::EigenOption::SparseLU.
◆ ~EigenLinearSolver()
MathLib::EigenLinearSolver::~EigenLinearSolver |
( |
| ) |
|
|
default |
◆ compute()
bool MathLib::EigenLinearSolver::compute |
( |
EigenMatrix & |
A | ) |
|
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 469 of file EigenLinearSolver.cpp.
470{
471 INFO(
"------------------------------------------------------------------");
472 INFO(
"*** Eigen solver compute()");
473
475}
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]
◆ option_
◆ solver_
The documentation for this class was generated from the following files: