Convenience class that bundles together a preconditioner and an iterative solver. Plus de détails...
Graphe d'héritage de Arcane::Alina::PreconditionedSolver< Precond, IterativeSolver >:
Graphe de collaboration de Arcane::Alina::PreconditionedSolver< Precond, IterativeSolver >:Classes | |
| struct | params |
| Combined parameters of the bundled preconditioner and the iterative solver. Plus de détails... | |
Types publics | |
| typedef IterativeSolver::backend_type | backend_type |
| typedef backend_type::matrix | matrix |
| typedef backend_type::value_type | value_type |
| typedef backend_type::col_type | col_type |
| typedef backend_type::ptr_type | ptr_type |
| typedef backend_type::params | backend_params |
| typedef BuiltinBackend< value_type, col_type, ptr_type >::matrix | build_matrix |
| typedef math::scalar_of< value_type >::type | scalar_type |
Fonctions membres publiques | |
| 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 |
Attributs publics | |
| struct Arcane::Alina::PreconditionedSolver::params | prm |
Attributs privés | |
| size_t | n |
| Precond | P |
| IterativeSolver | S |
Amis | |
| std::ostream & | operator<< (std::ostream &os, const PreconditionedSolver &p) |
Membres hérités additionnels | |
Fonctions membres protégées hérités de Arcane::Alina::detail::non_copyable | |
| non_copyable (non_copyable const &)=delete | |
| void | operator= (non_copyable const &x)=delete |
Convenience class that bundles together a preconditioner and an iterative solver.
Définition à la ligne 41 du fichier PreconditionedSolver.h.
| typedef backend_type::params Arcane::Alina::PreconditionedSolver< Precond, IterativeSolver >::backend_params |
Définition à la ligne 57 du fichier PreconditionedSolver.h.
| typedef IterativeSolver::backend_type Arcane::Alina::PreconditionedSolver< Precond, IterativeSolver >::backend_type |
Définition à la ligne 51 du fichier PreconditionedSolver.h.
| typedef BuiltinBackend<value_type,col_type,ptr_type>::matrix Arcane::Alina::PreconditionedSolver< Precond, IterativeSolver >::build_matrix |
Définition à la ligne 58 du fichier PreconditionedSolver.h.
| typedef backend_type::col_type Arcane::Alina::PreconditionedSolver< Precond, IterativeSolver >::col_type |
Définition à la ligne 55 du fichier PreconditionedSolver.h.
| typedef backend_type::matrix Arcane::Alina::PreconditionedSolver< Precond, IterativeSolver >::matrix |
Définition à la ligne 52 du fichier PreconditionedSolver.h.
| typedef backend_type::ptr_type Arcane::Alina::PreconditionedSolver< Precond, IterativeSolver >::ptr_type |
Définition à la ligne 56 du fichier PreconditionedSolver.h.
| typedef math::scalar_of<value_type>::type Arcane::Alina::PreconditionedSolver< Precond, IterativeSolver >::scalar_type |
Définition à la ligne 60 du fichier PreconditionedSolver.h.
| typedef backend_type::value_type Arcane::Alina::PreconditionedSolver< Precond, IterativeSolver >::value_type |
Définition à la ligne 54 du fichier PreconditionedSolver.h.
|
inline |
Sets up the preconditioner and creates the iterative solver.
Définition à la ligne 90 du fichier PreconditionedSolver.h.
|
inline |
Définition à la ligne 101 du fichier PreconditionedSolver.h.
|
inline |
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.
|
inline |
Définition à la ligne 220 du fichier PreconditionedSolver.h.
|
inline |
Stores the parameters used during construction into the property tree p.
Définition à la ligne 209 du fichier PreconditionedSolver.h.
|
inline |
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.
|
inline |
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.
|
inline |
Returns reference to the constructed preconditioner.
Définition à la ligne 180 du fichier PreconditionedSolver.h.
|
inline |
Returns reference to the constructed preconditioner.
Définition à la ligne 174 du fichier PreconditionedSolver.h.
|
inline |
Returns the size of the system matrix.
Définition à la ligne 215 du fichier PreconditionedSolver.h.
|
inline |
Returns reference to the constructed iterative solver.
Définition à la ligne 192 du fichier PreconditionedSolver.h.
|
inline |
Returns reference to the constructed iterative solver.
Définition à la ligne 186 du fichier PreconditionedSolver.h.
|
inline |
Définition à la ligne 203 du fichier PreconditionedSolver.h.
|
inline |
Returns the system matrix in the backend format.
Définition à la ligne 198 du fichier PreconditionedSolver.h.
|
friend |
Définition à la ligne 225 du fichier PreconditionedSolver.h.
|
private |
Définition à la ligne 235 du fichier PreconditionedSolver.h.
|
private |
Définition à la ligne 236 du fichier PreconditionedSolver.h.
|
private |
Définition à la ligne 237 du fichier PreconditionedSolver.h.