|
using | ConstVectorViewType = typename Base::ConstVectorViewType |
| Type for constant vector view.
|
|
using | DeviceType = typename Base::DeviceType |
| Device where the solver will run on and auxillary data will alloacted on.
|
|
using | IndexType = typename Base::IndexType |
| Type for indexing.
|
|
using | RealType = typename Base::RealType |
| Floating point type used for computations.
|
|
using | VectorViewType = typename Base::VectorViewType |
| Type for vector view.
|
|
using | ConstVectorViewType = typename Traits< Matrix >::ConstVectorViewType |
| Type for constant vector view.
|
|
using | DeviceType = typename Matrix::DeviceType |
| Device where the solver will run on and auxillary 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.
|
|
|
void | setResidualSmoothing (bool smoothing) |
| Enables or disables the residual smoothing procedure.
|
|
void | setShadowSpaceDimension (int s) |
| Sets the dimension of the shadow space.
|
|
bool | setup (const Config::ParameterContainer ¶meters, const String &prefix="") override |
| Method for setup of the linear iterative solver based on configuration parameters.
|
|
bool | solve (ConstVectorViewType b, VectorViewType x) override |
| Method for solving of a linear system.
|
|
virtual | ~LinearSolver () |
| Default destructor.
|
|
void | setMatrix (const MatrixPointer &matrix) |
| Set the matrix of the linear system.
|
|
void | setPreconditioner (const PreconditionerPointer &preconditioner) |
| Set the preconditioner.
|
|
| 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>
class TNL::Solvers::Linear::IDRs< Matrix >
Iterative solver of linear systems based on the IDR(s) method.
IDRs implements an iterative solver for non-symmetric linear systems, using the Induced Dimension Reduction algorithm, denoted as IDR(s), according to the description in [1] and [2].
- Note
- Unlike other iterative methods in TNL, IDR(s) is implemented with right-preconditioning rather than left-preconditioning.
[1] Peter Sonneveld and Martin Van Gijzen. "IDR(s): A Family of Simple and
Fast Algorithms for Solving Large Nonsymmetric Systems of Linear
Equations", SIAM Journal on Scientific Computing 31.2 (2009): 1035-1062. [2] Martin Van Gijzen and Peter Sonneveld. "Algorithm 913: An elegant
IDR(s) variant that efficiently exploits biorthogonality properties." ACM Transactions on Mathematical Software (TOMS) 38.1 (2011): 1-19.
See TNL::Solvers::Linear::LinearSolver for example of showing how to use the linear solvers.
- Template Parameters
-
Matrix | is type of matrix describing the linear system. |
template<typename Matrix >
This is method defines configuration entries for setup of the linear iterative solver.
In addition to config entries defined by IterativeSolver::configSetup, this method defines the following:
bicgstab-ell - number of Bi-CG iterations before the MR part starts.
bicgstab-exact-residue - says whether the BiCGstab should compute the exact residue in each step (true) or to use a cheap approximation (false).
- Parameters
-
config | contains description of configuration parameters. |
prefix | is a prefix of particular configuration entries. |