|
using | ConstVectorViewType = typename Base::ConstVectorViewType |
using | DeviceType = typename Base::DeviceType |
using | IndexType = typename Base::IndexType |
using | MatrixPointer = typename Base::MatrixPointer |
using | MatrixType = typename Base::MatrixType |
using | RealType = typename Base::RealType |
using | VectorViewType = typename Base::VectorViewType |
using | ConstVectorViewType = typename Traits< Matrix >::ConstVectorViewType |
| Type for constant vector view.
|
using | DeviceType = typename Matrix::DeviceType |
| Device where the solver will run on and auxiliary data will alloacted on.
|
using | IndexType = typename Matrix::IndexType |
| Type for indexing.
|
using | MatrixPointer = std::shared_ptr< std::add_const_t< MatrixType > > |
| Type of shared pointer to the matrix.
|
using | MatrixType = Matrix |
| Type of the matrix representing the linear system.
|
using | PreconditionerPointer = std::shared_ptr< std::add_const_t< PreconditionerType > > |
| Type of shared pointer to the preconditioner.
|
using | PreconditionerType = Preconditioners::Preconditioner< MatrixType > |
| Type of preconditioner.
|
using | RealType = typename Matrix::RealType |
| Floating point type used for computations.
|
using | VectorViewType = typename Traits< Matrix >::VectorViewType |
| Type for vector view.
|
using | SolverMonitorType |
| Type of an object used for monitoring of the convergence.
|
|
| GEM ()=default |
| Default constructor.
|
bool | getPivoting () const |
| Checks if pivoting is enabled.
|
void | setPivoting (bool pivoting) |
| Enables or disables pivoting in the GEM algorithm.
|
bool | solve (ConstVectorViewType b, VectorViewType x) override |
| Solves the linear system Ax = b.
|
bool | solve (MatrixType &A, ConstVectorViewType b, VectorViewType x) |
| Solves the linear system Ax = b.
|
virtual | ~LinearSolver ()=default |
| Default destructor.
|
virtual void | setMatrix (const MatrixPointer &matrix) |
| Set the matrix of the linear system.
|
void | setPreconditioner (const PreconditionerPointer &preconditioner) |
| Set the preconditioner.
|
virtual bool | setup (const Config::ParameterContainer ¶meters, const String &prefix="") |
| Method for setup of the linear iterative solver based on configuration parameters.
|
| IterativeSolver ()=default |
| Default constructor.
|
bool | checkConvergence () |
| Checks whether the convergence occurred already.
|
bool | checkNextIteration () |
| Checks if the solver is allowed to do the next iteration.
|
const Matrix::RealType & | getConvergenceResidue () const |
| Gets the the convergence threshold.
|
const Matrix::RealType & | getDivergenceResidue () const |
| Gets the limit for the divergence criterion.
|
const Matrix::IndexType & | getIterations () const |
| Gets the number of iterations performed by the solver so far.
|
const Matrix::IndexType & | getMaxIterations () const |
| Gets the maximal number of iterations the solver is allowed to perform.
|
const Matrix::IndexType & | getMinIterations () const |
| Gets the minimal number of iterations the solver is supposed to do.
|
const Matrix::RealType & | getResidue () const |
| Gets the residue reached at the current iteration.
|
bool | nextIteration () |
| Proceeds to the next iteration.
|
void | resetIterations () |
| Sets the the number of the current iterations to zero.
|
void | setConvergenceResidue (const Matrix::RealType &convergenceResidue) |
| Sets the threshold for the convergence.
|
void | setDivergenceResidue (const Matrix::RealType &divergenceResidue) |
| Sets the residue limit for the divergence criterion.
|
void | setMaxIterations (const Matrix::IndexType &maxIterations) |
| Sets the maximal number of iterations the solver is allowed to perform.
|
void | setMinIterations (const Matrix::IndexType &minIterations) |
| Sets the minimal number of iterations the solver is supposed to do.
|
void | setRefreshRate (const Matrix::IndexType &refreshRate) |
| Sets the refresh rate (in milliseconds) for the solver monitor.
|
void | setResidue (const Matrix::RealType &residue) |
| Sets the residue reached at the current iteration.
|
void | setSolverMonitor (SolverMonitorType &solverMonitor) |
| Sets the solver monitor object.
|
bool | setup (const Config::ParameterContainer ¶meters, const std::string &prefix="") |
| Method for setup of the iterative solver based on configuration parameters.
|
template<typename Matrix, typename
Real = typename Matrix::RealType, typename
SolverMonitor = IterativeSolverMonitor< double >>
struct TNL::Solvers::Linear::GEM< Matrix, Real, SolverMonitor >
Gaussian Elimination Method (GEM) direct solver for dense linear systems.
This class implements the GEM algorithm for solving linear systems with dense matrices. It supports optional pivoting.
- Template Parameters
-
Matrix | Type of the matrix representing the linear system. Must be a dense matrix. |
Real | Floating point type used for computations. |
SolverMonitor | Type of the solver monitor. |