Reference documentation for deal.II version 9.3.3
\(\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\}}\)
Classes | Public Member Functions | Public Attributes | List of all members
internal::MatrixFreeFunctions::MappingInfoStorage< structdim, spacedim, Number, VectorizedArrayType > Struct Template Reference

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

Inheritance diagram for internal::MatrixFreeFunctions::MappingInfoStorage< structdim, spacedim, Number, VectorizedArrayType >:
[legend]

Classes

struct  QuadratureDescriptor
 

Public Member Functions

void clear_data_fields ()
 
unsigned int quad_index_from_n_q_points (const unsigned int n_q_points) const
 
template<typename StreamType >
void print_memory_consumption (StreamType &out, const TaskInfo &task_info) const
 
std::size_t memory_consumption () const
 

Public Attributes

std::vector< QuadratureDescriptordescriptor
 
std::vector<::hp::QCollection< structdim > > q_collection
 
AlignedVector< unsigned intdata_index_offsets
 
AlignedVector< VectorizedArrayType > JxW_values
 
AlignedVector< Tensor< 1, spacedim, VectorizedArrayType > > normal_vectors
 
std::array< AlignedVector< Tensor< 2, spacedim, VectorizedArrayType > >, 2 > jacobians
 
std::array< AlignedVector< Tensor< 1, spacedim *(spacedim+1)/2, Tensor< 1, spacedim, VectorizedArrayType > > >, 2 > jacobian_gradients
 
std::array< AlignedVector< Tensor< 1, spacedim, VectorizedArrayType > >, 2 > normals_times_jacobians
 
AlignedVector< unsigned intquadrature_point_offsets
 
AlignedVector< Point< spacedim, VectorizedArrayType > > quadrature_points
 

Detailed Description

template<int structdim, int spacedim, typename Number, typename VectorizedArrayType>
struct internal::MatrixFreeFunctions::MappingInfoStorage< structdim, spacedim, Number, VectorizedArrayType >

Definition of a structure that stores all cached data related to the evaluated geometry from the mapping. In order to support hp-adaptivity and compressed storage (in particular for Jacobians, JxW values, and normals), storage length can be different for different rows. Thus, it allows to jump at the data of individual rows similar to compressed row storage in sparse matrices. We have two different start indices for fields with different sizes. The first category of offsets are the indices for Jacobians of the transformation from unit to real cell (we store the inverse Jacobian), second derivatives, JxW values, and normal vectors. We keep separate arrays for all these data structures because a user code might access only some of them. In such a case, one array will be gone through in a contiguous order with access to all entries, which makes it easy for the processor to prefetch data. Having all data in a single array would require some strides in the access pattern, which is much more complicated for the processor to predict (and indeed leads to prefetching of data that does not get used on Intel processors such as BroadwellEP).

The second category of indices are the offsets for the quadrature points. Quadrature points can be compressed less than the other fields and thus need longer fields. Quadrature point indices are often used in other contexts such as evaluation of right hand sides.

The third component is a descriptor of data from the unit cells, called QuadratureDescriptor, which contains the quadrature weights and permutations of how to go through quadrature points in case of face data. The latter comes in a vector for the support of hp-adaptivity, with several data fields for the individual quadrature formulas.

Definition at line 118 of file mapping_info.h.

Member Function Documentation

◆ clear_data_fields()

template<int structdim, int spacedim, typename Number , typename VectorizedArrayType >
void internal::MatrixFreeFunctions::MappingInfoStorage< structdim, spacedim, Number, VectorizedArrayType >::clear_data_fields ( )

Clears all data fields except the descriptor vector.

◆ quad_index_from_n_q_points()

template<int structdim, int spacedim, typename Number , typename VectorizedArrayType >
unsigned int internal::MatrixFreeFunctions::MappingInfoStorage< structdim, spacedim, Number, VectorizedArrayType >::quad_index_from_n_q_points ( const unsigned int  n_q_points) const
inline

Returns the quadrature index for a given number of quadrature points. If not in hp-mode or if the index is not found, this function always returns index 0. Hence, this function does not check whether the given degree is actually present.

Definition at line 659 of file mapping_info.h.

◆ print_memory_consumption()

template<int structdim, int spacedim, typename Number , typename VectorizedArrayType >
template<typename StreamType >
void internal::MatrixFreeFunctions::MappingInfoStorage< structdim, spacedim, Number, VectorizedArrayType >::print_memory_consumption ( StreamType &  out,
const TaskInfo task_info 
) const

Prints a detailed summary of memory consumption in the different structures of this class to the given output stream.

◆ memory_consumption()

template<int structdim, int spacedim, typename Number , typename VectorizedArrayType >
std::size_t internal::MatrixFreeFunctions::MappingInfoStorage< structdim, spacedim, Number, VectorizedArrayType >::memory_consumption ( ) const

Returns the memory consumption in bytes.

Member Data Documentation

◆ descriptor

template<int structdim, int spacedim, typename Number , typename VectorizedArrayType >
std::vector<QuadratureDescriptor> internal::MatrixFreeFunctions::MappingInfoStorage< structdim, spacedim, Number, VectorizedArrayType >::descriptor

A class describing the layout of the sections in the data_storage field and also includes some data that depends on the number of quadrature points in the hp-context such as the inner quadrature formula and re-indexing for faces that are not in the standard orientation.

Definition at line 197 of file mapping_info.h.

◆ q_collection

template<int structdim, int spacedim, typename Number , typename VectorizedArrayType >
std::vector<::hp::QCollection<structdim> > internal::MatrixFreeFunctions::MappingInfoStorage< structdim, spacedim, Number, VectorizedArrayType >::q_collection

Collection of quadrature formulae applied on the given face.

Note
Only filled for faces, since faces might be quadrilateral or triangle shaped.

Definition at line 205 of file mapping_info.h.

◆ data_index_offsets

template<int structdim, int spacedim, typename Number , typename VectorizedArrayType >
AlignedVector<unsigned int> internal::MatrixFreeFunctions::MappingInfoStorage< structdim, spacedim, Number, VectorizedArrayType >::data_index_offsets

Stores the index offset into the arrays jxw_values, jacobians, normal_vectors and the second derivatives. Note that affine cells have shorter fields of length 1, where the others have lengths equal to the number of quadrature points of the given cell.

Definition at line 213 of file mapping_info.h.

◆ JxW_values

template<int structdim, int spacedim, typename Number , typename VectorizedArrayType >
AlignedVector<VectorizedArrayType> internal::MatrixFreeFunctions::MappingInfoStorage< structdim, spacedim, Number, VectorizedArrayType >::JxW_values

The storage of the Jacobian determinant (times the quadrature weight in case the transformation is non-affine) on quadrature points.

Indexed by data_index_offsets.

Definition at line 222 of file mapping_info.h.

◆ normal_vectors

template<int structdim, int spacedim, typename Number , typename VectorizedArrayType >
AlignedVector<Tensor<1, spacedim, VectorizedArrayType> > internal::MatrixFreeFunctions::MappingInfoStorage< structdim, spacedim, Number, VectorizedArrayType >::normal_vectors

Stores the normal vectors.

Indexed by data_index_offsets.

Definition at line 229 of file mapping_info.h.

◆ jacobians

template<int structdim, int spacedim, typename Number , typename VectorizedArrayType >
std::array<AlignedVector<Tensor<2, spacedim, VectorizedArrayType> >, 2> internal::MatrixFreeFunctions::MappingInfoStorage< structdim, spacedim, Number, VectorizedArrayType >::jacobians

The storage of covariant transformation on quadrature points, i.e., the inverse and transposed Jacobians of the transformation from the unit to the real cell.

Indexed by data_index_offsets.

Contains two fields for access from both sides for interior faces, but the default case (cell integrals or boundary integrals) only fills the zeroth component and ignores the first one.

Definition at line 243 of file mapping_info.h.

◆ jacobian_gradients

template<int structdim, int spacedim, typename Number , typename VectorizedArrayType >
std::array< AlignedVector<Tensor<1, spacedim *(spacedim + 1) / 2, Tensor<1, spacedim, VectorizedArrayType> > >, 2> internal::MatrixFreeFunctions::MappingInfoStorage< structdim, spacedim, Number, VectorizedArrayType >::jacobian_gradients

The storage of the gradients of the inverse Jacobian transformation. Because of symmetry, only the upper diagonal and diagonal part are needed. The first index runs through the derivatives, starting with the diagonal and then continuing row-wise, i.e., \(\partial^2/\partial x_1 \partial x_2\) first, then \(\partial^2/\partial x_1 \partial x_3\), and so on. The second index is the spatial coordinate.

Indexed by data_index_offsets.

Contains two fields for access from both sides for interior faces, but the default case (cell integrals or boundary integrals) only fills the zeroth component and ignores the first one.

Definition at line 265 of file mapping_info.h.

◆ normals_times_jacobians

template<int structdim, int spacedim, typename Number , typename VectorizedArrayType >
std::array<AlignedVector<Tensor<1, spacedim, VectorizedArrayType> >, 2> internal::MatrixFreeFunctions::MappingInfoStorage< structdim, spacedim, Number, VectorizedArrayType >::normals_times_jacobians

Stores the Jacobian transformations times the normal vector (this represents a shortcut that is accessed often and can thus get higher performance).

Indexed by data_index_offsets.

Definition at line 275 of file mapping_info.h.

◆ quadrature_point_offsets

template<int structdim, int spacedim, typename Number , typename VectorizedArrayType >
AlignedVector<unsigned int> internal::MatrixFreeFunctions::MappingInfoStorage< structdim, spacedim, Number, VectorizedArrayType >::quadrature_point_offsets

Stores the index offset of a particular cell into the quadrature points array in real coordinates. Note that Cartesian cells have shorter fields (length is n_q_points_1d) than non-Cartesian cells (length is n_q_points) or faces.

Definition at line 283 of file mapping_info.h.

◆ quadrature_points

template<int structdim, int spacedim, typename Number , typename VectorizedArrayType >
AlignedVector<Point<spacedim, VectorizedArrayType> > internal::MatrixFreeFunctions::MappingInfoStorage< structdim, spacedim, Number, VectorizedArrayType >::quadrature_points

Stores the quadrature points in real coordinates, including a compression scheme for Cartesian cells where we do not need to store the full data on all points.

Indexed by quadrature_point_offsets.

Definition at line 292 of file mapping_info.h.


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