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
MappingQ< dim, spacedim >::InternalData Class Reference

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

Inheritance diagram for MappingQ< dim, spacedim >::InternalData:

Public Types

using VectorizedArrayType
 

Public Member Functions

 InternalData (const unsigned int polynomial_degree)
 
virtual void reinit (const UpdateFlags update_flags, const Quadrature< dim > &quadrature) override
 
void initialize_face (const UpdateFlags update_flags, const Quadrature< dim > &quadrature, const unsigned int n_original_q_points)
 
virtual std::size_t memory_consumption () const override
 

Public Attributes

std::vector< Point< dim > > quadrature_points
 
std::array< std::vector< Tensor< 1, dim > >, GeometryInfo< dim >::faces_per_cell *(dim - 1)> unit_tangentials
 
const unsigned int polynomial_degree
 
const unsigned int n_shape_functions
 
QGaussLobatto< 1 > line_support_points
 
internal::MatrixFreeFunctions::ShapeInfo< double > shape_info
 
AlignedVector< VectorizedArrayTypescratch
 
bool tensor_product_quadrature
 
std::vector< AlignedVector< Tensor< 1, spacedim > > > aux
 
std::vector< Point< spacedim > > mapping_support_points
 
Triangulation< dim, spacedim >::cell_iterator cell_of_current_support_points
 
AlignedVector< double > volume_elements
 
internal::FEValuesImplementation::MappingRelatedData< dim, spacedim > * output_data
 
UpdateFlags update_each
 

Detailed Description

template<int dim, int spacedim = dim>
class MappingQ< dim, spacedim >::InternalData

Storage for internal data of polynomial mappings. See Mapping::InternalDataBase for an extensive description.

For the current class, the InternalData class stores data that is computed once when the object is created (in get_data()) as well as data the class wants to store from between the call to fill_fe_values(), fill_fe_face_values(), or fill_fe_subface_values() until possible later calls from the finite element to functions such as transform(). The latter class of member variables are marked as 'mutable'.

Definition at line 303 of file mapping_q.h.

Member Typedef Documentation

◆ VectorizedArrayType

template<int dim, int spacedim = dim>
using MappingQ< dim, spacedim >::InternalData::VectorizedArrayType
Initial value:
(dim <= 2 ? 2 : 4))>
::VectorizedArray< Number, width > min(const ::VectorizedArray< Number, width > &, const ::VectorizedArray< Number, width > &)

For the fast tensor-product path of the MappingQ class, we choose SIMD vectors that are as wide as possible to minimize the number of arithmetic operations. However, we do not want to choose it wider than necessary, e.g., we avoid something like 8-wide AVX-512 when we only compute 3 components of a 3d computation. This is because the additional lanes would not do useful work, but a few operations on very wide vectors can already lead to a lower clock frequency of processors over long time spans (thousands of clock cycles). Hence, we choose 2-wide SIMD for 1D and 2d and 4-wide SIMD for 3d. Note that we do not immediately fall back to no SIMD for 1d because all architectures that support SIMD also support 128-bit vectors (and none is reported to reduce clock frequency for 128-bit SIMD).

Definition at line 398 of file mapping_q.h.

Constructor & Destructor Documentation

◆ InternalData()

template<int dim, int spacedim>
MappingQ< dim, spacedim >::InternalData::InternalData ( const unsigned int polynomial_degree)

Constructor. The argument denotes the polynomial degree of the mapping to which this object will correspond.

Definition at line 50 of file mapping_q.cc.

Member Function Documentation

◆ reinit()

template<int dim, int spacedim>
void MappingQ< dim, spacedim >::InternalData::reinit ( const UpdateFlags update_flags,
const Quadrature< dim > & quadrature )
overridevirtual

This function initializes the data fields related to evaluation of the mapping on cells, implemented by (derived) classes. This function is used both when setting up a field of this class for the first time or when a new Quadrature formula should be considered without creating an entirely new object. This is used when the number of evaluation points is different on each cell, e.g. when using FEPointEvaluation for handling particles or with certain non-matching problem settings.

Reimplemented from Mapping< dim, spacedim >::InternalDataBase.

Definition at line 81 of file mapping_q.cc.

◆ initialize_face()

template<int dim, int spacedim>
void MappingQ< dim, spacedim >::InternalData::initialize_face ( const UpdateFlags update_flags,
const Quadrature< dim > & quadrature,
const unsigned int n_original_q_points )

Initialize the object's member variables related to cell and face data based on the given arguments. In order to initialize cell data, this function calls initialize().

Definition at line 159 of file mapping_q.cc.

◆ memory_consumption()

template<int dim, int spacedim>
std::size_t MappingQ< dim, spacedim >::InternalData::memory_consumption ( ) const
overridevirtual

Return an estimate (in bytes) for the memory consumption of this object.

Reimplemented from Mapping< dim, spacedim >::InternalDataBase.

Definition at line 63 of file mapping_q.cc.

Member Data Documentation

◆ quadrature_points

template<int dim, int spacedim = dim>
std::vector<Point<dim> > MappingQ< dim, spacedim >::InternalData::quadrature_points

Location of quadrature points of faces or subfaces in 3d with all possible orientations. Can be accessed with the correct offset provided via QProjector::DataSetDescriptor. Not needed/used for cells.

Definition at line 338 of file mapping_q.h.

◆ unit_tangentials

template<int dim, int spacedim = dim>
std::array<std::vector<Tensor<1, dim> >, GeometryInfo<dim>::faces_per_cell *(dim - 1)> MappingQ< dim, spacedim >::InternalData::unit_tangentials

Unit tangential vectors. Used for the computation of boundary forms and normal vectors.

This array has (dim-1) * GeometryInfo::faces_per_cell entries. The first GeometryInfo::faces_per_cell contain the vectors in the first tangential direction for each face; the second set of GeometryInfo::faces_per_cell entries contain the vectors in the second tangential direction (only in 3d, since there we have 2 tangential directions per face), etc.

Filled once.

Definition at line 355 of file mapping_q.h.

◆ polynomial_degree

template<int dim, int spacedim = dim>
const unsigned int MappingQ< dim, spacedim >::InternalData::polynomial_degree

The polynomial degree of the mapping. Since the objects here are also used (with minor adjustments) by MappingQ, we need to store this.

Definition at line 361 of file mapping_q.h.

◆ n_shape_functions

template<int dim, int spacedim = dim>
const unsigned int MappingQ< dim, spacedim >::InternalData::n_shape_functions

Number of shape functions. If this is a Q1 mapping, then it is simply the number of vertices per cell. However, since also derived classes use this class (e.g. the Mapping_Q() class), the number of shape functions may also be different.

In general, it is \((p+1)^\text{dim}\), where \(p\) is the polynomial degree of the mapping.

Definition at line 372 of file mapping_q.h.

◆ line_support_points

template<int dim, int spacedim = dim>
QGaussLobatto<1> MappingQ< dim, spacedim >::InternalData::line_support_points

Definition at line 382 of file mapping_q.h.

◆ shape_info

template<int dim, int spacedim = dim>
internal::MatrixFreeFunctions::ShapeInfo<double> MappingQ< dim, spacedim >::InternalData::shape_info

In case the quadrature rule given represents a tensor product we need to store the evaluations of the 1d polynomials at the 1d quadrature points. That is what this variable is for.

Definition at line 408 of file mapping_q.h.

◆ scratch

template<int dim, int spacedim = dim>
AlignedVector<VectorizedArrayType> MappingQ< dim, spacedim >::InternalData::scratch
mutable

In case the quadrature rule given represents a tensor product we need to store temporary data in this object.

Definition at line 414 of file mapping_q.h.

◆ tensor_product_quadrature

template<int dim, int spacedim = dim>
bool MappingQ< dim, spacedim >::InternalData::tensor_product_quadrature

Indicates whether the given Quadrature object is a tensor product.

Definition at line 419 of file mapping_q.h.

◆ aux

template<int dim, int spacedim = dim>
std::vector<AlignedVector<Tensor<1, spacedim> > > MappingQ< dim, spacedim >::InternalData::aux
mutable

Auxiliary vectors for internal use.

Definition at line 424 of file mapping_q.h.

◆ mapping_support_points

template<int dim, int spacedim = dim>
std::vector<Point<spacedim> > MappingQ< dim, spacedim >::InternalData::mapping_support_points
mutable

Stores the support points of the mapping shape functions on the cell_of_current_support_points.

Definition at line 430 of file mapping_q.h.

◆ cell_of_current_support_points

template<int dim, int spacedim = dim>
Triangulation<dim,spacedim>::cell_iterator MappingQ< dim, spacedim >::InternalData::cell_of_current_support_points
mutable

Stores the cell of which the mapping_support_points are stored.

Definition at line 436 of file mapping_q.h.

◆ volume_elements

template<int dim, int spacedim = dim>
AlignedVector<double> MappingQ< dim, spacedim >::InternalData::volume_elements
mutable

The determinant of the Jacobian in each quadrature point. Filled if update_volume_elements.

Definition at line 442 of file mapping_q.h.

◆ output_data

template<int dim, int spacedim = dim>
internal::FEValuesImplementation::MappingRelatedData<dim, spacedim>* MappingQ< dim, spacedim >::InternalData::output_data
mutable

Pointer to the mapping output data that holds most of the arrays, including the Jacobians representing the covariant and contravariant transformations.

Definition at line 450 of file mapping_q.h.

◆ update_each

template<int dim, int spacedim = dim>
UpdateFlags Mapping< dim, spacedim >::InternalDataBase::update_each
inherited

A set of update flags specifying the kind of information that an implementation of the Mapping interface needs to compute on each cell or face, i.e., in Mapping::fill_fe_values() and friends.

This set of flags is stored here by implementations of Mapping::get_data(), Mapping::get_face_data(), or Mapping::get_subface_data(), and is that subset of the update flags passed to those functions that require re-computation on every cell. (The subset of the flags corresponding to information that can be computed once and for all already at the time of the call to Mapping::get_data() – or an implementation of that interface – need not be stored here because it has already been taken care of.)

Definition at line 691 of file mapping.h.


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