Reference documentation for deal.II version 9.6.0
\(\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
FEValuesViews::RenumberingData Struct Reference

#include <deal.II/fe/fe_coupling_values.h>

Public Member Functions

 RenumberingData (const unsigned int n_inner_dofs=numbers::invalid_unsigned_int, const unsigned int n_inner_quadrature_points=numbers::invalid_unsigned_int, const std::vector< unsigned int > &dof_renumbering={}, const std::vector< unsigned int > &quadrature_renumbering={})
 
 RenumberingData (const RenumberingData &other)=delete
 

Public Attributes

const unsigned int n_inner_dofs
 
const unsigned int n_dofs
 
const unsigned int n_inner_quadrature_points
 
const unsigned int n_quadrature_points
 
const std::vector< unsigned intdof_renumbering
 
const std::vector< unsigned intquadrature_renumbering
 
Threads::ThreadLocalStorage< GeneralDataStoragedata_storage
 

Detailed Description

A class that stores the renumbering of degrees of freedom and quadrature points for the RenumberedView class. This class is common to all possible renumbered views, and therefore it can be shared between all views that use the same set of renumbering vectors.

The renumbering is stored in two vectors, one for the degrees of freedom and one for the quadrature points, and it is used by the FEValuesViews::RenumberedView class.

Definition at line 50 of file fe_coupling_values.h.

Constructor & Destructor Documentation

◆ RenumberingData() [1/2]

FEValuesViews::RenumberingData::RenumberingData ( const unsigned int n_inner_dofs = numbers::invalid_unsigned_int,
const unsigned int n_inner_quadrature_points = numbers::invalid_unsigned_int,
const std::vector< unsigned int > & dof_renumbering = {},
const std::vector< unsigned int > & quadrature_renumbering = {} )

Construct a new renumbering data object.

The dof_renumbering vector is used to renumber the degrees of freedom, while the quadrature_renumbering vector is used to renumber the quadrature points. An empty renumbering vector simply means that no renumbering is performed.

Note
The renumbering vectors are not required to match the dimensions of the underlying view, i.e., you could use this class to only run over half of the degrees of freedom, and integrating only over half of the current cell by selecting a subset of quadrature points, if you wish to do so, or to run over some of the degrees of freedom more than once with regard to the underlying view. The important part is that every entry of each renumbering vector is a legal index within the underlying view object. We allow the dof renumbering vector to contain numbers::invalid_unsigned_int values, which are ignored, and produce zero values, gradients, hessians, etc. for the corresponding shape function.

An example of the renumbering ordering is the following. Assume that you have an FE_Q(1) finite element in dimension two (i.e., four degrees of freedom), and that you are manually taking care of an additional degree of freedom (say, a custom shape function in the middle of the cell), which, for your own convenience, should be numbered locally in the middle of the others. You would like your loops on degrees of freedom to run over all degrees of freedom, and to have the same structure as if the additional degree of freedom was not there. Then the renumbering data object should look like this:

...
RenumberingData data({{0, 1, numbers::invalid_unsigned_int, 2, 3}});
static const unsigned int invalid_unsigned_int
Definition types.h:220

Using this RenumberingData object, the RenumberedView will return zero when we ask for values, gradients, etc., of the shape function with index two.

◆ RenumberingData() [2/2]

FEValuesViews::RenumberingData::RenumberingData ( const RenumberingData & other)
delete

Make sure we never copy this object, for performance reasons.

Member Data Documentation

◆ n_inner_dofs

const unsigned int FEValuesViews::RenumberingData::n_inner_dofs

The number of dofs in the underlying view (before any renumbering).

Definition at line 105 of file fe_coupling_values.h.

◆ n_dofs

const unsigned int FEValuesViews::RenumberingData::n_dofs

The number of dofs in the renumbered view.

Definition at line 110 of file fe_coupling_values.h.

◆ n_inner_quadrature_points

const unsigned int FEValuesViews::RenumberingData::n_inner_quadrature_points

The number of quadrature points in the underlying view (before any renumbering).

Definition at line 116 of file fe_coupling_values.h.

◆ n_quadrature_points

const unsigned int FEValuesViews::RenumberingData::n_quadrature_points

The number of quadrature points in the renumbered view.

Definition at line 121 of file fe_coupling_values.h.

◆ dof_renumbering

const std::vector<unsigned int> FEValuesViews::RenumberingData::dof_renumbering

The renumbering of degrees of freedom.

Definition at line 126 of file fe_coupling_values.h.

◆ quadrature_renumbering

const std::vector<unsigned int> FEValuesViews::RenumberingData::quadrature_renumbering

The renumbering of quadrature points.

Definition at line 131 of file fe_coupling_values.h.

◆ data_storage

Threads::ThreadLocalStorage<GeneralDataStorage> FEValuesViews::RenumberingData::data_storage
mutable

General data storage to store temporary vectors.

When the renumbering vectors are non empty, the RenumberedView class may need to construct temporary vectors to store the values of the solution and/or of its gradients with the sizes given by the underlying view object. Unfortunately, we don't know beforehand the Number types with which the vectors will be instantiated, so we cannot use a simple cache internally, and we use a GeneralDataStorage object to avoid allocating memory at each call.

Definition at line 144 of file fe_coupling_values.h.


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