Convenience class that bundles together a preconditioner and an iterative solver.
Plus de détails...
|
| template<class Matrix> |
| | PreconditionedSolver (const Matrix &A, const params &prm=params(), const backend_params &bprm=backend_params()) |
| | Sets up the preconditioner and creates the iterative solver.
|
| | PreconditionedSolver (std::shared_ptr< build_matrix > A, const params &prm=params(), const backend_params &bprm=backend_params()) |
| template<class Matrix, class Vec1, class Vec2> |
| SolverResult | operator() (const Matrix &A, const Vec1 &rhs, Vec2 &&x) const |
| template<class Vec1, class Vec2> |
| SolverResult | operator() (const Vec1 &rhs, Vec2 &&x) const |
| template<class Vec1, class Vec2> |
| void | apply (const Vec1 &rhs, Vec2 &&x) const |
| const Precond & | precond () const |
| | Returns reference to the constructed preconditioner.
|
| Precond & | precond () |
| | Returns reference to the constructed preconditioner.
|
| const IterativeSolver & | solver () const |
| | Returns reference to the constructed iterative solver.
|
| IterativeSolver & | solver () |
| | Returns reference to the constructed iterative solver.
|
| std::shared_ptr< typename Precond::matrix > | system_matrix_ptr () const |
| | Returns the system matrix in the backend format.
|
| Precond::matrix const & | system_matrix () const |
| void | get_params (Alina::PropertyTree &p) const |
| | Stores the parameters used during construction into the property tree p.
|
| size_t | size () const |
| | Returns the size of the system matrix.
|
| size_t | bytes () const |
template<class Precond, class IterativeSolver>
class Arcane::Alina::PreconditionedSolver< Precond, IterativeSolver >
Convenience class that bundles together a preconditioner and an iterative solver.
Définition à la ligne 41 du fichier PreconditionedSolver.h.
template<class Precond, class IterativeSolver>
template<class Vec1, class Vec2>
Acts as a preconditioner. That is, applies the solver to the right-hand side rhs to get the solution x with zero initial approximation. Iterative methods usually use estimated residual for exit condition. For some problems the value of the estimated residual can get too far from the true residual due to round-off errors. Nesting iterative solvers in this way may allow to shave the last bits off the error. The method should not be used directly but rather allows nesting make_solver classes as in the following example:
\rst .. code-block:: cpp
typedef Arcane::Alina::PreconditionedSolver< Arcane::Alina::PreconditionedSolver< Arcane::Alina::AMG< Backend, ::Arcane::Alina::coarsening::smoothed_aggregation, ::Arcane::Alina::relaxation::spai0 >, ::Arcane::Alina::solver::cg<Backend> >, ::Arcane::Alina::solver::cg<Backend> > NestedSolver; \endrst
Définition à la ligne 167 du fichier PreconditionedSolver.h.
template<class Precond, class IterativeSolver>
template<class
Matrix, class Vec1, class Vec2>
Computes the solution for the given system matrix A and the right-hand side rhs. Returns the number of iterations made and the achieved residual as a std::tuple. The solution vector x provides initial approximation in input and holds the computed solution on output.
\rst The system matrix may differ from the matrix used during initialization. This may be used for the solution of non-stationary problems with slowly changing coefficients. There is a strong chance that a preconditioner built for a time step will act as a reasonably good preconditioner for several subsequent time steps [DeSh12]_. \endrst
Définition à la ligne 125 du fichier PreconditionedSolver.h.
template<class Precond, class IterativeSolver>
template<class Vec1, class Vec2>
Computes the solution for the given right-hand side rhs. Returns the number of iterations made and the achieved residual as a std::tuple. The solution vector x provides initial approximation in input and holds the computed solution on output.
Définition à la ligne 136 du fichier PreconditionedSolver.h.