DealiiPreconditionerWrapper< dim, number, VectorType, DealiiPreconditionerType, OperatorType > Class Template Reference

Developer Documentation: MeltPoolDG::DealiiPreconditionerWrapper< dim, number, VectorType, DealiiPreconditionerType, OperatorType > Class Template Reference
Developer Documentation
MeltPoolDG::DealiiPreconditionerWrapper< dim, number, VectorType, DealiiPreconditionerType, OperatorType > Class Template Reference

#include <preconditioner_trilinos_wrapper.hpp>

Collaboration diagram for MeltPoolDG::DealiiPreconditionerWrapper< dim, number, VectorType, DealiiPreconditionerType, OperatorType >:
[legend]

Public Member Functions

 DealiiPreconditionerWrapper (const OperatorType *operator_in, const ScratchData< dim, dim, number > &scratch_data_in, const unsigned dof_idx_in, const bool do_matrix_free=true)
 
void vmult (VectorType &dst, const VectorType &src) const
 
void update (const std::any &external_preconditioner_matrix=std::any())
 
void reinit ()
 

Private Attributes

DealiiPreconditionerType preconditioner
 
dealii::TrilinosWrappers::SparseMatrix preconditioner_system_matrix
 
dealii::DynamicSparsityPattern dsp
 
const OperatorType * eq_operator
 
const ScratchData< dim, dim, number > & scratch_data
 
const unsigned int dof_idx
 
const bool do_matrix_free
 

Detailed Description

template<int dim, typename number, typename VectorType, typename DealiiPreconditionerType, typename OperatorType>
class MeltPoolDG::DealiiPreconditionerWrapper< dim, number, VectorType, DealiiPreconditionerType, OperatorType >

Wrapper class for deal.II matrix-based preconditioners.

Constructor & Destructor Documentation

◆ DealiiPreconditionerWrapper()

template<int dim, typename number , typename VectorType , typename DealiiPreconditionerType , typename OperatorType >
MeltPoolDG::DealiiPreconditionerWrapper< dim, number, VectorType, DealiiPreconditionerType, OperatorType >::DealiiPreconditionerWrapper ( const OperatorType *  operator_in,
const ScratchData< dim, dim, number > &  scratch_data_in,
const unsigned  dof_idx_in,
const bool  do_matrix_free = true 
)
inlineexplicit

Constructor.

Parameters
operator_inOperator object used to compute the system matrix representation (when computing matrix-free).
do_matrix_freeFlag indicating whether the operator is used for matrix-free computations.

Member Function Documentation

◆ reinit()

template<int dim, typename number , typename VectorType , typename DealiiPreconditionerType , typename OperatorType >
void MeltPoolDG::DealiiPreconditionerWrapper< dim, number, VectorType, DealiiPreconditionerType, OperatorType >::reinit ( )
inline

Initialize the internal data structures. In the matrix-based case this function does effectively do nothing. However, in the matrix-free case memory is allocated for the (sparse) preconditioner matrix.

◆ update()

template<int dim, typename number , typename VectorType , typename DealiiPreconditionerType , typename OperatorType >
void MeltPoolDG::DealiiPreconditionerWrapper< dim, number, VectorType, DealiiPreconditionerType, OperatorType >::update ( const std::any &  external_preconditioner_matrix = std::any())
inline

Update the preconditioner. For the matrix-free case this means to compute the matrix representation and store it internally while for the matrix-base case it is required to pass a pointer to the externally stored system matrix which is then used internally.

Parameters
external_preconditioner_matrixdealii::Pointer to the externally stored system matrix (only required when computing matrix-base)
Exceptions
Exceptionif the no pointer is provided AND the operator does not support to calculate a matrix-representaiton.

◆ vmult()

template<int dim, typename number , typename VectorType , typename DealiiPreconditionerType , typename OperatorType >
void MeltPoolDG::DealiiPreconditionerWrapper< dim, number, VectorType, DealiiPreconditionerType, OperatorType >::vmult ( VectorType &  dst,
const VectorType &  src 
) const
inline

Apply the preconditioner to the given src vector and store the result in the dst vector.

Parameters
dstVector in which the result is stored.
srcSource vector to which the preconditioner is applied.

Member Data Documentation

◆ do_matrix_free

template<int dim, typename number , typename VectorType , typename DealiiPreconditionerType , typename OperatorType >
const bool MeltPoolDG::DealiiPreconditionerWrapper< dim, number, VectorType, DealiiPreconditionerType, OperatorType >::do_matrix_free
private

◆ dof_idx

template<int dim, typename number , typename VectorType , typename DealiiPreconditionerType , typename OperatorType >
const unsigned int MeltPoolDG::DealiiPreconditionerWrapper< dim, number, VectorType, DealiiPreconditionerType, OperatorType >::dof_idx
private

◆ dsp

template<int dim, typename number , typename VectorType , typename DealiiPreconditionerType , typename OperatorType >
dealii::DynamicSparsityPattern MeltPoolDG::DealiiPreconditionerWrapper< dim, number, VectorType, DealiiPreconditionerType, OperatorType >::dsp
private

◆ eq_operator

template<int dim, typename number , typename VectorType , typename DealiiPreconditionerType , typename OperatorType >
const OperatorType* MeltPoolDG::DealiiPreconditionerWrapper< dim, number, VectorType, DealiiPreconditionerType, OperatorType >::eq_operator
private

◆ preconditioner

template<int dim, typename number , typename VectorType , typename DealiiPreconditionerType , typename OperatorType >
DealiiPreconditionerType MeltPoolDG::DealiiPreconditionerWrapper< dim, number, VectorType, DealiiPreconditionerType, OperatorType >::preconditioner
private

◆ preconditioner_system_matrix

template<int dim, typename number , typename VectorType , typename DealiiPreconditionerType , typename OperatorType >
dealii::TrilinosWrappers::SparseMatrix MeltPoolDG::DealiiPreconditionerWrapper< dim, number, VectorType, DealiiPreconditionerType, OperatorType >::preconditioner_system_matrix
private

◆ scratch_data

template<int dim, typename number , typename VectorType , typename DealiiPreconditionerType , typename OperatorType >
const ScratchData<dim, dim, number>& MeltPoolDG::DealiiPreconditionerWrapper< dim, number, VectorType, DealiiPreconditionerType, OperatorType >::scratch_data
private

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