deal.II version 9.8.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
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 structdim>
constexpr unsigned int max_n_vertices ()
template<int structdim>
constexpr unsigned int max_n_lines ()
template<int structdim>
constexpr unsigned int max_n_faces ()
template<int structdim>
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>
const std::vector< ReferenceCell< dim > > ReferenceCells::get_reference_cells_in_dim ( )
constexpr

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

Definition at line 3485 of file reference_cell.h.

◆ get_simplex()

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

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 3508 of file reference_cell.h.

◆ get_hypercube()

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

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 3528 of file reference_cell.h.

◆ n_reference_cells_in_dim()

template<int dim>
unsigned int ReferenceCells::n_reference_cells_in_dim ( )
inlineconstexpr

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

Definition at line 3547 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)
inline

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 3564 of file reference_cell.h.

◆ max_n_vertices()

template<int structdim>
unsigned int ReferenceCells::max_n_vertices ( )
inlineconstexpr

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

See also
ReferenceCells::max_n_faces()

Definition at line 3607 of file reference_cell.h.

◆ max_n_lines()

template<int structdim>
unsigned int ReferenceCells::max_n_lines ( )
inlineconstexpr

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

See also
ReferenceCells::max_n_faces()

Definition at line 3616 of file reference_cell.h.

◆ max_n_faces()

template<int structdim>
unsigned int ReferenceCells::max_n_faces ( )
inlineconstexpr

Return the maximum number of faces an object of dimension structdim can have. This is always the number of faces of a structdim-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;
constexpr unsigned int max_n_faces()

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

Definition at line 3625 of file reference_cell.h.

◆ max_n_children()

template<int structdim>
unsigned int ReferenceCells::max_n_children ( )
inlineconstexpr

Return the maximum number of children an object of dimension structdim 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 3634 of file reference_cell.h.

Variable Documentation

◆ Vertex

ReferenceCell<0> ReferenceCells::Vertex
constexpr
Initial value:
=
constexpr ReferenceCell< dim > make_reference_cell_from_int(const std::uint8_t kind)

Definition at line 1391 of file reference_cell.h.

◆ Line

ReferenceCell<1> ReferenceCells::Line
constexpr
Initial value:

Definition at line 1393 of file reference_cell.h.

◆ Triangle

ReferenceCell<2> ReferenceCells::Triangle
constexpr
Initial value:

Definition at line 1395 of file reference_cell.h.

◆ Quadrilateral

ReferenceCell<2> ReferenceCells::Quadrilateral
constexpr
Initial value:

Definition at line 1397 of file reference_cell.h.

◆ Tetrahedron

ReferenceCell<3> ReferenceCells::Tetrahedron
constexpr
Initial value:

Definition at line 1399 of file reference_cell.h.

◆ Pyramid

ReferenceCell<3> ReferenceCells::Pyramid
constexpr
Initial value:

Definition at line 1401 of file reference_cell.h.

◆ Wedge

ReferenceCell<3> ReferenceCells::Wedge
constexpr
Initial value:

Definition at line 1403 of file reference_cell.h.

◆ Hexahedron

ReferenceCell<3> ReferenceCells::Hexahedron
constexpr
Initial value:

Definition at line 1405 of file reference_cell.h.

◆ Invalid

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

Definition at line 1409 of file reference_cell.h.