deal.II version GIT relicensing-2206-gaa53ff9447 2024-12-02 09:10:00+00:00
\(\newcommand{\dealvcentcolon}{\mathrel{\mathop{:}}}\) \(\newcommand{\dealcoloneq}{\dealvcentcolon\mathrel{\mkern-1.2mu}=}\) \(\newcommand{\jump}[1]{\left[\!\left[ #1 \right]\!\right]}\) \(\newcommand{\average}[1]{\left\{\!\left\{ #1 \right\}\!\right\}}\)
Loading...
Searching...
No Matches
Classes | Public Member Functions | Private Attributes | List of all members
MatrixFreeTools::ElementActivationAndDeactivationMatrixFree< dim, Number, VectorizedArrayType > Class Template Reference

#include <deal.II/matrix_free/tools.h>

Classes

struct  AdditionalData
 

Public Member Functions

void reinit (const MatrixFree< dim, Number, VectorizedArrayType > &matrix_free, const AdditionalData &additional_data=AdditionalData())
 
template<typename VectorTypeOut , typename VectorTypeIn >
void cell_loop (const std::function< void(const MatrixFree< dim, Number, VectorizedArrayType > &, VectorTypeOut &, const VectorTypeIn &, const std::pair< unsigned int, unsigned int > &)> &cell_operation, VectorTypeOut &dst, const VectorTypeIn &src, const bool zero_dst_vector=false) const
 
template<typename VectorTypeOut , typename VectorTypeIn >
void loop (const std::function< void(const MatrixFree< dim, Number, VectorizedArrayType > &, VectorTypeOut &, const VectorTypeIn &, const std::pair< unsigned int, unsigned int > &)> &cell_operation, const std::function< void(const MatrixFree< dim, Number, VectorizedArrayType > &, VectorTypeOut &, const VectorTypeIn &, const std::pair< unsigned int, unsigned int > &)> &face_operation, const std::function< void(const MatrixFree< dim, Number, VectorizedArrayType > &, VectorTypeOut &, const VectorTypeIn &, const std::pair< unsigned int, unsigned int > &, const bool)> &boundary_operation, VectorTypeOut &dst, const VectorTypeIn &src, const bool zero_dst_vector=false) const
 

Private Attributes

ObserverPointer< const MatrixFree< dim, Number, VectorizedArrayType > > matrix_free
 
unsigned int fe_index_valid
 

Detailed Description

template<int dim, typename Number, typename VectorizedArrayType = VectorizedArray<Number>>
class MatrixFreeTools::ElementActivationAndDeactivationMatrixFree< dim, Number, VectorizedArrayType >

A wrapper around MatrixFree to help users to deal with DoFHandler objects involving cells without degrees of freedom, i.e., cells using FE_Nothing as element type. In the following we call such cells deactivated. All other cells are activated. In contrast to MatrixFree, this class skips deactivated cells and faces between activated and deactivated cells are treated as boundary faces.

Definition at line 485 of file tools.h.

Member Function Documentation

◆ reinit()

template<int dim, typename Number , typename VectorizedArrayType = VectorizedArray<Number>>
void MatrixFreeTools::ElementActivationAndDeactivationMatrixFree< dim, Number, VectorizedArrayType >::reinit ( const MatrixFree< dim, Number, VectorizedArrayType > &  matrix_free,
const AdditionalData additional_data = AdditionalData() 
)
inline

Reinitialize class based on a given MatrixFree instance. Particularly, the index of the valid FE is determined.

Note
At the moment, only DoFHandler objects are accepted that are initialized with FECollection objects with at most two finite elements (i.e., FE_Nothing and another finite element).

Definition at line 517 of file tools.h.

◆ cell_loop()

template<int dim, typename Number , typename VectorizedArrayType = VectorizedArray<Number>>
template<typename VectorTypeOut , typename VectorTypeIn >
void MatrixFreeTools::ElementActivationAndDeactivationMatrixFree< dim, Number, VectorizedArrayType >::cell_loop ( const std::function< void(const MatrixFree< dim, Number, VectorizedArrayType > &, VectorTypeOut &, const VectorTypeIn &, const std::pair< unsigned int, unsigned int > &)> &  cell_operation,
VectorTypeOut &  dst,
const VectorTypeIn &  src,
const bool  zero_dst_vector = false 
) const
inline

Loop over all activated cells.

For the meaning of the parameters see MatrixFree::cell_loop().

Definition at line 546 of file tools.h.

◆ loop()

template<int dim, typename Number , typename VectorizedArrayType = VectorizedArray<Number>>
template<typename VectorTypeOut , typename VectorTypeIn >
void MatrixFreeTools::ElementActivationAndDeactivationMatrixFree< dim, Number, VectorizedArrayType >::loop ( const std::function< void(const MatrixFree< dim, Number, VectorizedArrayType > &, VectorTypeOut &, const VectorTypeIn &, const std::pair< unsigned int, unsigned int > &)> &  cell_operation,
const std::function< void(const MatrixFree< dim, Number, VectorizedArrayType > &, VectorTypeOut &, const VectorTypeIn &, const std::pair< unsigned int, unsigned int > &)> &  face_operation,
const std::function< void(const MatrixFree< dim, Number, VectorizedArrayType > &, VectorTypeOut &, const VectorTypeIn &, const std::pair< unsigned int, unsigned int > &, const bool)> &  boundary_operation,
VectorTypeOut &  dst,
const VectorTypeIn &  src,
const bool  zero_dst_vector = false 
) const
inline

Loop over all activated cells and faces. Faces between activated and deactivated cells are treated as boundary faces with the boundary ID numbers::internal_face_boundary_id.

For the meaning of the parameters see MatrixFree::cell_loop().

Definition at line 580 of file tools.h.

Member Data Documentation

◆ matrix_free

template<int dim, typename Number , typename VectorizedArrayType = VectorizedArray<Number>>
ObserverPointer<const MatrixFree<dim, Number, VectorizedArrayType> > MatrixFreeTools::ElementActivationAndDeactivationMatrixFree< dim, Number, VectorizedArrayType >::matrix_free
private

Reference to the underlying MatrixFree object.

Definition at line 647 of file tools.h.

◆ fe_index_valid

template<int dim, typename Number , typename VectorizedArrayType = VectorizedArray<Number>>
unsigned int MatrixFreeTools::ElementActivationAndDeactivationMatrixFree< dim, Number, VectorizedArrayType >::fe_index_valid
private

Index of the valid FE. Currently, only a single one is supported.

Definition at line 652 of file tools.h.


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