deal.II version GIT relicensing-6809-ge913b9bb34 2026-09-25 17:20:01+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
Functions | Variables
ReferenceCells Namespace Reference

Functions

template<int dim>
constexpr const std::vector< ReferenceCell< dim > > get_reference_cells_in_dim ()
 
template<int dim>
constexpr const ReferenceCell< dim > & get_simplex ()
 
template<int dim>
constexpr const ReferenceCell< dim > & get_hypercube ()
 
template<int dim>
constexpr unsigned int n_reference_cells_in_dim ()
 
template<int dim>
ReferenceCell< dim > n_vertices_to_reference_cell (const unsigned int n_vertices)
 
template<int dim>
constexpr unsigned int max_n_vertices ()
 
template<int dim>
constexpr unsigned int max_n_lines ()
 
template<int dim>
constexpr unsigned int max_n_faces ()
 
template<int dim>
constexpr unsigned int max_n_children ()
 

Variables

constexpr ReferenceCell< 0 > Vertex
 
constexpr ReferenceCell< 1 > Line
 
constexpr ReferenceCell< 2 > Triangle
 
constexpr ReferenceCell< 2 > Quadrilateral
 
constexpr ReferenceCell< 3 > Tetrahedron
 
constexpr ReferenceCell< 3 > Pyramid
 
constexpr ReferenceCell< 3 > Wedge
 
constexpr ReferenceCell< 3 > Hexahedron
 
template<int dim>
constexpr ReferenceCell< dim > Invalid
 

Detailed Description

A namespace in which we define objects that correspond to specific reference cells. The objects defined here are a complete enumeration of all possible reference cells that can be used in deal.II.

Function Documentation

◆ get_reference_cells_in_dim()

template<int dim>
constexpr const std::vector< ReferenceCell< dim > > ReferenceCells::get_reference_cells_in_dim ( )
constexprprivate

Returns a vector containing all available reference cells of dimension dim.

Definition at line 3554 of file reference_cell.h.

◆ get_simplex()

template<int dim>
constexpr const ReferenceCell< dim > & ReferenceCells::get_simplex ( )
inlineconstexprprivate

Return the correct simplex reference cell type for the given dimension dim. Depending on the template argument dim, this function returns a reference to either Vertex, Line, Triangle, or Tetrahedron.

Definition at line 3577 of file reference_cell.h.

◆ get_hypercube()

template<int dim>
constexpr const ReferenceCell< dim > & ReferenceCells::get_hypercube ( )
inlineconstexprprivate

Return the correct hypercube reference cell type for the given dimension dim. Depending on the template argument dim, this function returns a reference to either Vertex, Quadrilateral, or Hexahedron.

Definition at line 3597 of file reference_cell.h.

◆ n_reference_cells_in_dim()

template<int dim>
constexpr unsigned int ReferenceCells::n_reference_cells_in_dim ( )
inlineconstexprprivate

Return the number of different Reference Cells that are available for dimension dim.

Definition at line 3617 of file reference_cell.h.

◆ n_vertices_to_reference_cell()

template<int dim>
ReferenceCell< dim > ReferenceCells::n_vertices_to_reference_cell ( const unsigned int  n_vertices)
inlineprivate

Given the number of vertices a reference cell has (provided as a function argument), and the dimension the reference cell lives in (provided as a template argument), return the ReferenceCell object that corresponds to this input. For example, if you call ReferenceCells::n_vertices_to_reference_cell<2>(4), you will get ReferenceCells::Quadrilateral because the only 2d reference cell with four vertices is a quadrilateral. On the other hand, if you call ReferenceCells::n_vertices_to_reference_cell<3>(4), you will get ReferenceCells::Tetrahedron because the only 3d reference cell with four vertices is a tetrahedron.

Definition at line 3635 of file reference_cell.h.

◆ max_n_vertices()

template<int dim>
constexpr unsigned int ReferenceCells::max_n_vertices ( )
inlineconstexprprivate

Return the maximum number of vertices an object of dimension dim can have. This is always the number of vertices of a dim-dimensional hypercube.

See also
ReferenceCells::max_n_faces()

Definition at line 3676 of file reference_cell.h.

◆ max_n_lines()

template<int dim>
constexpr unsigned int ReferenceCells::max_n_lines ( )
inlineconstexprprivate

Return the maximum number of lines an object of dimension dim can have. This is always the number of lines of a dim-dimensional hypercube.

See also
ReferenceCells::max_n_faces()

Definition at line 3685 of file reference_cell.h.

◆ max_n_faces()

template<int dim>
constexpr unsigned int ReferenceCells::max_n_faces ( )
inlineconstexprprivate

Return the maximum number of faces an object of dimension dim can have. This is always the number of faces of a dim-dimensional hypercube.

Note
The primary use case of this and the other maxima functions is to enable simple array indexing to per-face data by cell index and face number, e.g.,
cell->index() * ReferenceCells::max_n_faces<dim>() + face_no;

is a unique index to the face_noth face of the current cell.

Definition at line 3694 of file reference_cell.h.

◆ max_n_children()

template<int dim>
constexpr unsigned int ReferenceCells::max_n_children ( )
inlineconstexprprivate

Return the maximum number of children an object of dimension dim can have.

Note
If a cell is refined anisotropically, the actual number of children may be less than the value given here.
See also
ReferenceCells::max_n_faces()

Definition at line 3703 of file reference_cell.h.

Variable Documentation

◆ Vertex

constexpr ReferenceCell<0> ReferenceCells::Vertex
constexprprivate
Initial value:
=
internal::make_reference_cell_from_int<0>(0)

Definition at line 1344 of file reference_cell.h.

◆ Line

constexpr ReferenceCell<1> ReferenceCells::Line
constexprprivate
Initial value:
=
internal::make_reference_cell_from_int<1>(1)

Definition at line 1346 of file reference_cell.h.

◆ Triangle

constexpr ReferenceCell<2> ReferenceCells::Triangle
constexprprivate
Initial value:
=
internal::make_reference_cell_from_int<2>(2)

Definition at line 1348 of file reference_cell.h.

◆ Quadrilateral

constexpr ReferenceCell<2> ReferenceCells::Quadrilateral
constexprprivate
Initial value:
=
internal::make_reference_cell_from_int<2>(3)

Definition at line 1350 of file reference_cell.h.

◆ Tetrahedron

constexpr ReferenceCell<3> ReferenceCells::Tetrahedron
constexprprivate
Initial value:
=
internal::make_reference_cell_from_int<3>(4)

Definition at line 1352 of file reference_cell.h.

◆ Pyramid

constexpr ReferenceCell<3> ReferenceCells::Pyramid
constexprprivate
Initial value:
=
internal::make_reference_cell_from_int<3>(5)

Definition at line 1354 of file reference_cell.h.

◆ Wedge

constexpr ReferenceCell<3> ReferenceCells::Wedge
constexprprivate
Initial value:
=
internal::make_reference_cell_from_int<3>(6)

Definition at line 1356 of file reference_cell.h.

◆ Hexahedron

constexpr ReferenceCell<3> ReferenceCells::Hexahedron
constexprprivate
Initial value:
=
internal::make_reference_cell_from_int<3>(7)

Definition at line 1358 of file reference_cell.h.

◆ Invalid

template<int dim>
constexpr ReferenceCell<dim> ReferenceCells::Invalid
constexprprivate
Initial value:
=
internal::make_reference_cell_from_int<dim>(
std::numeric_limits<std::uint8_t>::max())

Definition at line 1362 of file reference_cell.h.