Richardson iteration. More...
Public Types | |
| typedef Backend | backend_type |
| typedef Backend::vector | vector |
| typedef Backend::value_type | value_type |
| typedef Backend::params | backend_params |
| typedef math::scalar_of< value_type >::type | scalar_type |
| typedef math::inner_product_impl< typenamemath::rhs_of< value_type >::type >::return_type | coef_type |
| using | params = RichardsonSolverParams |
Public Member Functions | |
| RichardsonSolver (size_t n, const params &prm=params(), const backend_params &backend_prm=backend_params(), const InnerProduct &inner_product=InnerProduct()) | |
Preallocates necessary data structures for the system of size n. | |
| template<class Matrix, class Precond, class Vec1, class Vec2> | |
| SolverResult | operator() (const Matrix &A, const Precond &P, const Vec1 &rhs, Vec2 &&x) const |
| Computes the solution for the given system matrix. | |
| template<class Precond, class Vec1, class Vec2> | |
| SolverResult | operator() (const Precond &P, const Vec1 &rhs, Vec2 &&x) const |
| Computes the solution for the given right-hand side. | |
| size_t | bytes () const |
| Memory used in bytes. | |
Public Attributes | |
| params | prm |
Private Member Functions | |
| template<class Vec> | |
| scalar_type | norm (const Vec &x) const |
Private Attributes | |
| size_t | n |
| std::shared_ptr< vector > | r |
| std::shared_ptr< vector > | s |
| InnerProduct | inner_product |
Friends | |
| std::ostream & | operator<< (std::ostream &os, const RichardsonSolver &s) |
Richardson iteration.
Definition at line 93 of file RichardsonSolver.h.
| typedef Backend::params Arcane::Alina::RichardsonSolver< Backend, InnerProduct >::backend_params |
Definition at line 102 of file RichardsonSolver.h.
| typedef Backend Arcane::Alina::RichardsonSolver< Backend, InnerProduct >::backend_type |
Definition at line 98 of file RichardsonSolver.h.
| typedef math::inner_product_impl<typenamemath::rhs_of<value_type>::type>::return_type Arcane::Alina::RichardsonSolver< Backend, InnerProduct >::coef_type |
Definition at line 107 of file RichardsonSolver.h.
| using Arcane::Alina::RichardsonSolver< Backend, InnerProduct >::params = RichardsonSolverParams |
Definition at line 109 of file RichardsonSolver.h.
| typedef math::scalar_of<value_type>::type Arcane::Alina::RichardsonSolver< Backend, InnerProduct >::scalar_type |
Definition at line 104 of file RichardsonSolver.h.
| typedef Backend::value_type Arcane::Alina::RichardsonSolver< Backend, InnerProduct >::value_type |
Definition at line 101 of file RichardsonSolver.h.
| typedef Backend::vector Arcane::Alina::RichardsonSolver< Backend, InnerProduct >::vector |
Definition at line 100 of file RichardsonSolver.h.
|
inline |
Preallocates necessary data structures for the system of size n.
Definition at line 114 of file RichardsonSolver.h.
|
inlinevirtual |
Memory used in bytes.
Implements Arcane::Alina::SolverBase.
Definition at line 193 of file RichardsonSolver.h.
|
inlineprivate |
Definition at line 221 of file RichardsonSolver.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.
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]_.
Definition at line 141 of file RichardsonSolver.h.
|
inline |
Computes the solution for the given right-hand side.
Computes the solution for the given right-hand side rhs. The system matrix is the same that was used for the setup of the preconditioner P. 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 188 of file RichardsonSolver.h.
|
friend |
Definition at line 199 of file RichardsonSolver.h.
|
private |
Definition at line 218 of file RichardsonSolver.h.
|
private |
Definition at line 213 of file RichardsonSolver.h.
| params Arcane::Alina::RichardsonSolver< Backend, InnerProduct >::prm |
Definition at line 209 of file RichardsonSolver.h.
|
private |
Definition at line 215 of file RichardsonSolver.h.
|
private |
Definition at line 216 of file RichardsonSolver.h.