Iterative preconditioned solver with deflation. More...
Classes | |
| struct | params |
| Combined parameters of the bundled preconditioner and the iterative solver. More... | |
Public Types | |
| typedef IterativeSolver::backend_type | backend_type |
| typedef backend_type::matrix | matrix |
| typedef backend_type::vector | vector |
| typedef backend_type::value_type | value_type |
| typedef backend_type::params | backend_params |
| typedef BuiltinBackend< value_type >::matrix | build_matrix |
| typedef math::scalar_of< value_type >::type | scalar_type |
Public Member Functions | |
| template<class Matrix> | |
| DeflatedSolver (const Matrix &A, const params &prm=params(), const backend_params &bprm=backend_params()) | |
| DeflatedSolver (std::shared_ptr< build_matrix > A, const params &prm=params(), const backend_params &bprm=backend_params()) | |
| template<class Matrix> | |
| void | init (const Matrix &A, const backend_params &bprm) |
| template<class Matrix, class Vec1, class Vec2> | |
| SolverResult | operator() (const Matrix &A, const Vec1 &rhs, Vec2 &&x) const |
| Computes the solution for the given system matrix. | |
| template<class Vec1, class Vec2> | |
| SolverResult | operator() (const Vec1 &rhs, Vec2 &&x) const |
| Computes the solution for the given right-hand. | |
| template<class Vec1, class Vec2> | |
| void | apply (const Vec1 &rhs, Vec2 &&x) const |
| template<class Vec1, class Vec2> | |
| void | project (const Vec1 &b, 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. | |
| 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 |
Public Attributes | |
| params | prm |
Private Attributes | |
| size_t | n |
| Precond | P |
| IterativeSolver | S |
| std::shared_ptr< vector > | r |
| std::vector< std::shared_ptr< vector > > | Z |
| std::vector< scalar_type > | E |
| std::vector< scalar_type > | d |
Friends | |
| std::ostream & | operator<< (std::ostream &os, const DeflatedSolver &p) |
Additional Inherited Members | |
| Protected Member Functions inherited from Arcane::Alina::detail::non_copyable | |
| non_copyable (non_copyable const &)=delete | |
| void | operator= (non_copyable const &x)=delete |
Iterative preconditioned solver with deflation.
Definition at line 42 of file DeflatedSolver.h.
| typedef backend_type::params Arcane::Alina::DeflatedSolver< Precond, IterativeSolver >::backend_params |
Definition at line 57 of file DeflatedSolver.h.
| typedef IterativeSolver::backend_type Arcane::Alina::DeflatedSolver< Precond, IterativeSolver >::backend_type |
Definition at line 52 of file DeflatedSolver.h.
| typedef BuiltinBackend<value_type>::matrix Arcane::Alina::DeflatedSolver< Precond, IterativeSolver >::build_matrix |
Definition at line 58 of file DeflatedSolver.h.
| typedef backend_type::matrix Arcane::Alina::DeflatedSolver< Precond, IterativeSolver >::matrix |
Definition at line 53 of file DeflatedSolver.h.
| typedef math::scalar_of<value_type>::type Arcane::Alina::DeflatedSolver< Precond, IterativeSolver >::scalar_type |
Definition at line 60 of file DeflatedSolver.h.
| typedef backend_type::value_type Arcane::Alina::DeflatedSolver< Precond, IterativeSolver >::value_type |
Definition at line 56 of file DeflatedSolver.h.
| typedef backend_type::vector Arcane::Alina::DeflatedSolver< Precond, IterativeSolver >::vector |
Definition at line 54 of file DeflatedSolver.h.
|
inline |
Sets up the preconditioner and creates the iterative solver.
Definition at line 96 of file DeflatedSolver.h.
References precond(), and solver().
|
inline |
Definition at line 113 of file DeflatedSolver.h.
|
inline |
Definition at line 200 of file DeflatedSolver.h.
|
inline |
Definition at line 261 of file DeflatedSolver.h.
|
inline |
Stores the parameters used during construction into the property tree p.
Definition at line 250 of file DeflatedSolver.h.
|
inline |
Definition at line 129 of file DeflatedSolver.h.
|
inline |
Computes the solution for the given system matrix.
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
Definition at line 178 of file DeflatedSolver.h.
|
inline |
Computes the solution for the given right-hand.
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.
Definition at line 193 of file DeflatedSolver.h.
|
inline |
Returns reference to the constructed preconditioner.
Definition at line 227 of file DeflatedSolver.h.
|
inline |
Returns reference to the constructed preconditioner.
Definition at line 221 of file DeflatedSolver.h.
Referenced by DeflatedSolver().
|
inline |
Definition at line 207 of file DeflatedSolver.h.
|
inline |
Returns the size of the system matrix.
Definition at line 256 of file DeflatedSolver.h.
|
inline |
Returns reference to the constructed iterative solver.
Definition at line 233 of file DeflatedSolver.h.
Referenced by DeflatedSolver().
|
inline |
Definition at line 244 of file DeflatedSolver.h.
|
inline |
Returns the system matrix in the backend format.
Definition at line 239 of file DeflatedSolver.h.
|
friend |
Definition at line 266 of file DeflatedSolver.h.
|
mutableprivate |
Definition at line 286 of file DeflatedSolver.h.
|
private |
Definition at line 285 of file DeflatedSolver.h.
|
private |
Definition at line 280 of file DeflatedSolver.h.
|
private |
Definition at line 281 of file DeflatedSolver.h.
| params Arcane::Alina::DeflatedSolver< Precond, IterativeSolver >::prm |
Definition at line 276 of file DeflatedSolver.h.
|
private |
Definition at line 283 of file DeflatedSolver.h.
|
private |
Definition at line 282 of file DeflatedSolver.h.
|
private |
Definition at line 284 of file DeflatedSolver.h.