Generalized Minimal Residual (GMRES) method. More...
Public Types | |
| using | backend_type = Backend |
| using | BackendType = Backend |
| 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::rhs_of< value_type >::type | rhs_type |
| typedef math::inner_product_impl< rhs_type >::return_type | coef_type |
| using | params = GMRESSolverParams |
Public Member Functions | |
| GMRESSolver (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() (Matrix const &A, Precond const &P, Vec1 const &rhs, Vec2 &x) const |
| template<class Precond, class Vec1, class Vec2> | |
| std::tuple< size_t, scalar_type > | operator() (Precond const &P, Vec1 const &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 |
| multi_array< coef_type, 2 > | H |
| std::vector< coef_type > | s |
| std::vector< coef_type > | cs |
| std::vector< coef_type > | sn |
| std::shared_ptr< vector > | r |
| std::vector< std::shared_ptr< vector > > | v |
| InnerProduct | inner_product |
Friends | |
| std::ostream & | operator<< (std::ostream &os, const GMRESSolver &s) |
Generalized Minimal Residual (GMRES) method.
\rst The Generalized Minimal Residual method is an extension of MINRES (which is only applicable to symmetric systems) to unsymmetric systems [Barr94]_. \endrst
Definition at line 103 of file GMRESSolver.h.
| typedef Backend::params Arcane::Alina::GMRESSolver< Backend, InnerProduct >::backend_params |
Definition at line 113 of file GMRESSolver.h.
| using Arcane::Alina::GMRESSolver< Backend, InnerProduct >::backend_type = Backend |
Definition at line 108 of file GMRESSolver.h.
| using Arcane::Alina::GMRESSolver< Backend, InnerProduct >::BackendType = Backend |
Definition at line 109 of file GMRESSolver.h.
| typedef math::inner_product_impl<rhs_type>::return_type Arcane::Alina::GMRESSolver< Backend, InnerProduct >::coef_type |
Definition at line 117 of file GMRESSolver.h.
| using Arcane::Alina::GMRESSolver< Backend, InnerProduct >::params = GMRESSolverParams |
Definition at line 119 of file GMRESSolver.h.
| typedef math::rhs_of<value_type>::type Arcane::Alina::GMRESSolver< Backend, InnerProduct >::rhs_type |
Definition at line 116 of file GMRESSolver.h.
| typedef math::scalar_of<value_type>::type Arcane::Alina::GMRESSolver< Backend, InnerProduct >::scalar_type |
Definition at line 115 of file GMRESSolver.h.
| typedef Backend::value_type Arcane::Alina::GMRESSolver< Backend, InnerProduct >::value_type |
Definition at line 112 of file GMRESSolver.h.
| typedef Backend::vector Arcane::Alina::GMRESSolver< Backend, InnerProduct >::vector |
Definition at line 111 of file GMRESSolver.h.
|
inline |
Preallocates necessary data structures for the system of size n.
Definition at line 122 of file GMRESSolver.h.
|
inlinevirtual |
Memory used in bytes.
Implements Arcane::Alina::SolverBase.
Definition at line 287 of file GMRESSolver.h.
|
inlineprivate |
Definition at line 315 of file GMRESSolver.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 156 of file GMRESSolver.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 270 of file GMRESSolver.h.
|
friend |
Definition at line 275 of file GMRESSolver.h.
|
private |
Definition at line 308 of file GMRESSolver.h.
|
mutableprivate |
Definition at line 307 of file GMRESSolver.h.
|
private |
Definition at line 312 of file GMRESSolver.h.
|
private |
Definition at line 305 of file GMRESSolver.h.
| params Arcane::Alina::GMRESSolver< Backend, InnerProduct >::prm |
Definition at line 285 of file GMRESSolver.h.
|
private |
Definition at line 309 of file GMRESSolver.h.
|
mutableprivate |
Definition at line 308 of file GMRESSolver.h.
|
private |
Definition at line 308 of file GMRESSolver.h.
|
private |
Definition at line 310 of file GMRESSolver.h.