Lethe Open-Source Library version 1.2.0
Developer Guide
Loading...
Searching...
No Matches
PreconditionAdapter< VectorType, VectorTypePrecondition > Class Template Reference
Inheritance diagram for PreconditionAdapter< VectorType, VectorTypePrecondition >:
[legend]

Public Member Functions

template<typename PreconditionType>
 PreconditionAdapter (const std::shared_ptr< PreconditionType > &preconditioner)
void vmult (VectorType &dst, const VectorType &src) const override
template<typename U = VectorTypePrecondition>
requires (!std::is_same_v<VectorType, U>)
void vmult (U &dst, const U &src) const
Public Member Functions inherited from PreconditionBase< VectorType >
 PreconditionBase ()
void timer_print () const
void timer_reset () const

Private Attributes

const std::function< void(VectorTypePrecondition &, const VectorTypePrecondition &)> fu_preconditioner
VectorTypePrecondition src_
VectorTypePrecondition dst_

Additional Inherited Members

Protected Attributes inherited from PreconditionBase< VectorType >
const MPI_Comm comm
ConditionalOStream pcout
TimerOutput timer

Detailed Description

template<typename VectorType, typename VectorTypePrecondition>
class PreconditionAdapter< VectorType, VectorTypePrecondition >

A wrapper class around a preconditioner to be able to handle vector types that are not supported by the preconditioner.

Definition at line 111 of file fluid_dynamics_matrix_free.cc.

Constructor & Destructor Documentation

◆ PreconditionAdapter()

template<typename VectorType, typename VectorTypePrecondition>
template<typename PreconditionType>
PreconditionAdapter< VectorType, VectorTypePrecondition >::PreconditionAdapter ( const std::shared_ptr< PreconditionType > & preconditioner)
inline

Constructor.

Parameters
[in]preconditionerPreconditioner.

Definition at line 120 of file fluid_dynamics_matrix_free.cc.

References fu_preconditioner.

Member Function Documentation

◆ vmult() [1/2]

template<typename VectorType, typename VectorTypePrecondition>
template<typename U = VectorTypePrecondition>
requires (!std::is_same_v<VectorType, U>)
void PreconditionAdapter< VectorType, VectorTypePrecondition >::vmult ( U & dst,
const U & src ) const
inline

Apply preconditioner.

Parameters
[in,out]dstDestination vector holding the result.
[in]srcInput source vector.

Definition at line 160 of file fluid_dynamics_matrix_free.cc.

References fu_preconditioner.

◆ vmult() [2/2]

template<typename VectorType, typename VectorTypePrecondition>
void PreconditionAdapter< VectorType, VectorTypePrecondition >::vmult ( VectorType & dst,
const VectorType & src ) const
inlineoverridevirtual

Apply preconditioner.

Parameters
[in,out]dstDestination vector holding the result.
[in]srcInput source vector.

Implements PreconditionBase< VectorType >.

Definition at line 134 of file fluid_dynamics_matrix_free.cc.

References dst_, fu_preconditioner, and src_.

Member Data Documentation

◆ dst_

template<typename VectorType, typename VectorTypePrecondition>
VectorTypePrecondition PreconditionAdapter< VectorType, VectorTypePrecondition >::dst_
mutableprivate

Destination vector supported by the preconditioner.

Definition at line 175 of file fluid_dynamics_matrix_free.cc.

◆ fu_preconditioner

template<typename VectorType, typename VectorTypePrecondition>
const std::function<void(VectorTypePrecondition &, const VectorTypePrecondition &)> PreconditionAdapter< VectorType, VectorTypePrecondition >::fu_preconditioner
private

Preconditioner.

Definition at line 169 of file fluid_dynamics_matrix_free.cc.

◆ src_

template<typename VectorType, typename VectorTypePrecondition>
VectorTypePrecondition PreconditionAdapter< VectorType, VectorTypePrecondition >::src_
mutableprivate

Source vector supported by the preconditioner.

Definition at line 172 of file fluid_dynamics_matrix_free.cc.


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