Arcane  4.1.12.0
Developer documentation
Loading...
Searching...
No Matches
Arcane::Alina::IDRSSolver< Backend, InnerProduct > Class Template Reference

IDR(s) method (Induced Dimension Reduction). More...

#include </__w/arcaneframework.github.io/arcaneframework.github.io/framework/arccore/src/alina/arccore/alina/IDRSSolver.h>

Inheritance diagram for Arcane::Alina::IDRSSolver< Backend, InnerProduct >:
Collaboration diagram for Arcane::Alina::IDRSSolver< Backend, InnerProduct >:

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< typenamemath::rhs_of< value_type >::type >::return_type coef_type
using params = IDRSSolverParams

Public Member Functions

 IDRSSolver (size_t n, const params &prm=params(), const backend_params &bprm=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 &Prec, Vec1 const &rhs, Vec2 &x) const
 Computes the solution for the given system matrix.
template<class Precond, class Vec1, class Vec2>
SolverResult 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
template<class Vector1, class Vector2>
coef_type omega (const Vector1 &t, const Vector2 &s) const

Private Attributes

size_t n
InnerProduct inner_product
multi_array< coef_type, 2 > M
std::vector< coef_type > f
std::vector< coef_type > c
std::shared_ptr< vector > r
std::shared_ptr< vector > v
std::shared_ptr< vector > t
std::shared_ptr< vector > x_s
std::shared_ptr< vector > r_s
std::vector< std::shared_ptr< vector > > P
std::vector< std::shared_ptr< vector > > G
std::vector< std::shared_ptr< vector > > U

Friends

std::ostream & operator<< (std::ostream &os, const IDRSSolver &s)

Detailed Description

template<class Backend, class InnerProduct = detail::default_inner_product>
class Arcane::Alina::IDRSSolver< Backend, InnerProduct >

IDR(s) method (Induced Dimension Reduction).

Definition at line 138 of file IDRSSolver.h.

Member Typedef Documentation

◆ backend_params

template<class Backend, class InnerProduct = detail::default_inner_product>
typedef Backend::params Arcane::Alina::IDRSSolver< Backend, InnerProduct >::backend_params

Definition at line 148 of file IDRSSolver.h.

◆ backend_type

template<class Backend, class InnerProduct = detail::default_inner_product>
using Arcane::Alina::IDRSSolver< Backend, InnerProduct >::backend_type = Backend

Definition at line 143 of file IDRSSolver.h.

◆ BackendType

template<class Backend, class InnerProduct = detail::default_inner_product>
using Arcane::Alina::IDRSSolver< Backend, InnerProduct >::BackendType = Backend

Definition at line 144 of file IDRSSolver.h.

◆ coef_type

template<class Backend, class InnerProduct = detail::default_inner_product>
typedef math::inner_product_impl<typenamemath::rhs_of<value_type>::type>::return_type Arcane::Alina::IDRSSolver< Backend, InnerProduct >::coef_type

Definition at line 153 of file IDRSSolver.h.

◆ params

template<class Backend, class InnerProduct = detail::default_inner_product>
using Arcane::Alina::IDRSSolver< Backend, InnerProduct >::params = IDRSSolverParams

Definition at line 155 of file IDRSSolver.h.

◆ rhs_type

template<class Backend, class InnerProduct = detail::default_inner_product>
typedef math::rhs_of<value_type>::type Arcane::Alina::IDRSSolver< Backend, InnerProduct >::rhs_type

Definition at line 151 of file IDRSSolver.h.

◆ scalar_type

template<class Backend, class InnerProduct = detail::default_inner_product>
typedef math::scalar_of<value_type>::type Arcane::Alina::IDRSSolver< Backend, InnerProduct >::scalar_type

Definition at line 150 of file IDRSSolver.h.

◆ value_type

template<class Backend, class InnerProduct = detail::default_inner_product>
typedef Backend::value_type Arcane::Alina::IDRSSolver< Backend, InnerProduct >::value_type

Definition at line 147 of file IDRSSolver.h.

◆ vector

template<class Backend, class InnerProduct = detail::default_inner_product>
typedef Backend::vector Arcane::Alina::IDRSSolver< Backend, InnerProduct >::vector

Definition at line 146 of file IDRSSolver.h.

Constructor & Destructor Documentation

◆ IDRSSolver()

template<class Backend, class InnerProduct = detail::default_inner_product>
Arcane::Alina::IDRSSolver< Backend, InnerProduct >::IDRSSolver ( size_t n,
const params & prm = params(),
const backend_params & bprm = backend_params(),
const InnerProduct & inner_product = InnerProduct() )
inline

Preallocates necessary data structures for the system of size n.

Definition at line 158 of file IDRSSolver.h.

Member Function Documentation

◆ bytes()

template<class Backend, class InnerProduct = detail::default_inner_product>
size_t Arcane::Alina::IDRSSolver< Backend, InnerProduct >::bytes ( ) const
inlinevirtual

Memory used in bytes.

Implements Arcane::Alina::SolverBase.

Definition at line 405 of file IDRSSolver.h.

◆ norm()

template<class Backend, class InnerProduct = detail::default_inner_product>
template<class Vec>
scalar_type Arcane::Alina::IDRSSolver< Backend, InnerProduct >::norm ( const Vec & x) const
inlineprivate

Definition at line 461 of file IDRSSolver.h.

◆ omega()

template<class Backend, class InnerProduct = detail::default_inner_product>
template<class Vector1, class Vector2>
coef_type Arcane::Alina::IDRSSolver< Backend, InnerProduct >::omega ( const Vector1 & t,
const Vector2 & s ) const
inlineprivate

Definition at line 467 of file IDRSSolver.h.

◆ operator()() [1/2]

template<class Backend, class InnerProduct = detail::default_inner_product>
template<class Matrix, class Precond, class Vec1, class Vec2>
SolverResult Arcane::Alina::IDRSSolver< Backend, InnerProduct >::operator() ( Matrix const & A,
Precond const & Prec,
Vec1 const & rhs,
Vec2 & x ) const
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 233 of file IDRSSolver.h.

◆ operator()() [2/2]

template<class Backend, class InnerProduct = detail::default_inner_product>
template<class Precond, class Vec1, class Vec2>
SolverResult Arcane::Alina::IDRSSolver< Backend, InnerProduct >::operator() ( Precond const & P,
Vec1 const & rhs,
Vec2 & x ) const
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 400 of file IDRSSolver.h.

◆ operator<<

template<class Backend, class InnerProduct = detail::default_inner_product>
std::ostream & operator<< ( std::ostream & os,
const IDRSSolver< Backend, InnerProduct > & s )
friend

Definition at line 433 of file IDRSSolver.h.

Member Data Documentation

◆ c

template<class Backend, class InnerProduct = detail::default_inner_product>
std::vector<coef_type> Arcane::Alina::IDRSSolver< Backend, InnerProduct >::c
private

Definition at line 452 of file IDRSSolver.h.

◆ f

template<class Backend, class InnerProduct = detail::default_inner_product>
std::vector<coef_type> Arcane::Alina::IDRSSolver< Backend, InnerProduct >::f
mutableprivate

Definition at line 452 of file IDRSSolver.h.

◆ G

template<class Backend, class InnerProduct = detail::default_inner_product>
std::vector<std::shared_ptr<vector> > Arcane::Alina::IDRSSolver< Backend, InnerProduct >::G
private

Definition at line 458 of file IDRSSolver.h.

◆ inner_product

template<class Backend, class InnerProduct = detail::default_inner_product>
InnerProduct Arcane::Alina::IDRSSolver< Backend, InnerProduct >::inner_product
private

Definition at line 449 of file IDRSSolver.h.

◆ M

template<class Backend, class InnerProduct = detail::default_inner_product>
multi_array<coef_type, 2> Arcane::Alina::IDRSSolver< Backend, InnerProduct >::M
mutableprivate

Definition at line 451 of file IDRSSolver.h.

◆ n

template<class Backend, class InnerProduct = detail::default_inner_product>
size_t Arcane::Alina::IDRSSolver< Backend, InnerProduct >::n
private

Definition at line 447 of file IDRSSolver.h.

◆ P

template<class Backend, class InnerProduct = detail::default_inner_product>
std::vector<std::shared_ptr<vector> > Arcane::Alina::IDRSSolver< Backend, InnerProduct >::P
private

Definition at line 458 of file IDRSSolver.h.

◆ prm

template<class Backend, class InnerProduct = detail::default_inner_product>
params Arcane::Alina::IDRSSolver< Backend, InnerProduct >::prm

Definition at line 443 of file IDRSSolver.h.

◆ r

template<class Backend, class InnerProduct = detail::default_inner_product>
std::shared_ptr<vector> Arcane::Alina::IDRSSolver< Backend, InnerProduct >::r
private

Definition at line 454 of file IDRSSolver.h.

◆ r_s

template<class Backend, class InnerProduct = detail::default_inner_product>
std::shared_ptr<vector> Arcane::Alina::IDRSSolver< Backend, InnerProduct >::r_s
private

Definition at line 456 of file IDRSSolver.h.

◆ t

template<class Backend, class InnerProduct = detail::default_inner_product>
std::shared_ptr<vector> Arcane::Alina::IDRSSolver< Backend, InnerProduct >::t
private

Definition at line 454 of file IDRSSolver.h.

◆ U

template<class Backend, class InnerProduct = detail::default_inner_product>
std::vector<std::shared_ptr<vector> > Arcane::Alina::IDRSSolver< Backend, InnerProduct >::U
private

Definition at line 458 of file IDRSSolver.h.

◆ v

template<class Backend, class InnerProduct = detail::default_inner_product>
std::shared_ptr<vector> Arcane::Alina::IDRSSolver< Backend, InnerProduct >::v
private

Definition at line 454 of file IDRSSolver.h.

◆ x_s

template<class Backend, class InnerProduct = detail::default_inner_product>
std::shared_ptr<vector> Arcane::Alina::IDRSSolver< Backend, InnerProduct >::x_s
private

Definition at line 455 of file IDRSSolver.h.


The documentation for this class was generated from the following file: