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

Solver which only apply preconditioner once. More...

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

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

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
typedef Alina::detail::empty_params params
 Solver parameters.

Public Member Functions

 PreconditionerOnlySolver (size_t n, const params &=params(), const backend_params &=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 &, 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.

Private Member Functions

template<class Vec>
scalar_type norm (const Vec &x) const

Private Attributes

size_t n
InnerProduct inner_product

Friends

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

Detailed Description

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

Solver which only apply preconditioner once.

Definition at line 41 of file PreconditionerOnlySolver.h.

Member Typedef Documentation

◆ backend_params

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

Definition at line 50 of file PreconditionerOnlySolver.h.

◆ backend_type

template<class Backend, class InnerProduct = detail::default_inner_product>
typedef Backend Arcane::Alina::PreconditionerOnlySolver< Backend, InnerProduct >::backend_type

Definition at line 46 of file PreconditionerOnlySolver.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::PreconditionerOnlySolver< Backend, InnerProduct >::coef_type

Definition at line 55 of file PreconditionerOnlySolver.h.

◆ params

template<class Backend, class InnerProduct = detail::default_inner_product>
typedef Alina::detail::empty_params Arcane::Alina::PreconditionerOnlySolver< Backend, InnerProduct >::params

Solver parameters.

Definition at line 58 of file PreconditionerOnlySolver.h.

◆ scalar_type

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

Definition at line 52 of file PreconditionerOnlySolver.h.

◆ value_type

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

Definition at line 49 of file PreconditionerOnlySolver.h.

◆ vector

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

Definition at line 48 of file PreconditionerOnlySolver.h.

Constructor & Destructor Documentation

◆ PreconditionerOnlySolver()

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

Preallocates necessary data structures for the system of size n.

Definition at line 61 of file PreconditionerOnlySolver.h.

Member Function Documentation

◆ bytes()

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

Memory used in bytes.

Implements Arcane::Alina::SolverBase.

Definition at line 107 of file PreconditionerOnlySolver.h.

◆ norm()

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

Definition at line 128 of file PreconditionerOnlySolver.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::PreconditionerOnlySolver< Backend, InnerProduct >::operator() ( const Matrix & ,
const Precond & P,
const Vec1 & 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 85 of file PreconditionerOnlySolver.h.

◆ operator()() [2/2]

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

◆ operator<<

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

Definition at line 112 of file PreconditionerOnlySolver.h.

Member Data Documentation

◆ inner_product

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

Definition at line 125 of file PreconditionerOnlySolver.h.

◆ n

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

Definition at line 123 of file PreconditionerOnlySolver.h.


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