Reference documentation for deal.II version 9.5.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
Static Public Member Functions | Static Public Attributes | List of all members
GeometryInfo< 0 > Struct Reference

#include <deal.II/base/geometry_info.h>

Static Public Member Functions

static std::array< unsigned int, 0 > face_indices ()
 
static unsigned int n_children (const RefinementCase< 0 > &refinement_case)
 
static std::array< unsigned int, vertices_per_cellvertex_indices ()
 
static unsigned int face_to_cell_vertices (const unsigned int face, const unsigned int vertex, const bool face_orientation=true, const bool face_flip=false, const bool face_rotation=false)
 
static unsigned int face_to_cell_lines (const unsigned int face, const unsigned int line, const bool face_orientation=true, const bool face_flip=false, const bool face_rotation=false)
 

Static Public Attributes

static constexpr unsigned int max_children_per_cell = 1
 
static constexpr unsigned int faces_per_cell = 0
 
static constexpr unsigned int max_children_per_face = 0
 
static constexpr unsigned int vertices_per_cell = 1
 
static constexpr unsigned int vertices_per_face = 0
 
static constexpr unsigned int lines_per_face = 0
 
static constexpr unsigned int quads_per_face = 0
 
static constexpr unsigned int lines_per_cell = 0
 
static constexpr unsigned int quads_per_cell = 0
 
static constexpr unsigned int hexes_per_cell = 0
 
static const std::array< unsigned int, vertices_per_cellucd_to_deal = {{0}}
 
static const std::array< unsigned int, vertices_per_celldx_to_deal = {{0}}
 

Detailed Description

This class provides a description of zero-dimensional cells. It has been superseded by the ReferenceCell class – see there for more information.

Topological description of zero dimensional cells, i.e. points. This class might not look too useful but often is if in a certain dimension we would like to enquire information about objects with dimension one lower than the present, e.g. about faces.

This class contains as static members information on vertices and faces of a dim-dimensional grid cell. The interface is the same for all dimensions. If a value is of no use in a low dimensional cell, it is (correctly) set to zero, e.g. max_children_per_face in 1d.

This information should always replace hard-coded numbers of vertices, neighbors and so on, since it can be used dimension independently.

Definition at line 1238 of file geometry_info.h.

Member Function Documentation

◆ face_indices()

static std::array< unsigned int, 0 > GeometryInfo< 0 >::face_indices ( )
static

Return an object that can be thought of as an array containing all indices from zero to faces_per_cell. This allows to write code using range-based for loops of the following kind:

for (auto &cell : triangulation.active_cell_iterators())
for (auto face_index : GeometryInfo<dim>::face_indices())
if (cell->face(face_index)->at_boundary())
... do something ...
const ::parallel::distributed::Triangulation< dim, spacedim > * triangulation
static std::array< unsigned int, 0 > face_indices()

Here, we are looping over all faces of all cells, with face_index taking on all valid indices.

Of course, since this class is for the case dim==0, the returned object is actually an empty array.

◆ n_children()

static unsigned int GeometryInfo< 0 >::n_children ( const RefinementCase< 0 > &  refinement_case)
static

Return the number of children of a cell (or face) refined with ref_case. Since we are concerned here with points, the number of children is equal to one.

◆ vertex_indices()

static std::array< unsigned int, vertices_per_cell > GeometryInfo< 0 >::vertex_indices ( )
static

Return an object that can be thought of as an array containing all indices from zero to vertices_per_cell. This allows to write code using range-based for loops of the following kind:

for (auto &cell : triangulation.active_cell_iterators())
for (auto vertex_index : GeometryInfo<dim>::vertex_indices())
if (cell->vertex(vertex_index) satisfies some condition)
... do something ...
static std::array< unsigned int, vertices_per_cell > vertex_indices()

Here, we are looping over all vertices of all cells, with vertex_index taking on all valid indices.

Of course, since this class is for the case dim==0, the returned object is a array with just one entry: zero. That's because an of dimension zero is really just a single point, corresponding to a vertex itself.

◆ face_to_cell_vertices()

static unsigned int GeometryInfo< 0 >::face_to_cell_vertices ( const unsigned int  face,
const unsigned int  vertex,
const bool  face_orientation = true,
const bool  face_flip = false,
const bool  face_rotation = false 
)
static

Map face vertex number to cell vertex number, i.e. give the cell vertex number of the vertexth vertex of face face, e.g. GeometryInfo<2>::face_to_cell_vertices(3,0)=2, see the image under point N4 in the 2d section of this class's documentation.

Through the face_orientation, face_flip and face_rotation arguments this function handles faces oriented in the standard and non-standard orientation. face_orientation defaults to true, face_flip and face_rotation default to false (standard orientation). In 2d only face_flip is considered. See this glossary article for more information.

As the children of a cell are ordered according to the vertices of the cell, this call is passed down to the child_cell_on_face() function. Hence this function is simply a wrapper of child_cell_on_face() giving it a suggestive name.

Of course, since this class is for the case dim==0, this function is not implemented.

◆ face_to_cell_lines()

static unsigned int GeometryInfo< 0 >::face_to_cell_lines ( const unsigned int  face,
const unsigned int  line,
const bool  face_orientation = true,
const bool  face_flip = false,
const bool  face_rotation = false 
)
static

Map face line number to cell line number, i.e. give the cell line number of the lineth line of face face, e.g. GeometryInfo<3>::face_to_cell_lines(5,0)=4.

Through the face_orientation, face_flip and face_rotation arguments this function handles faces oriented in the standard and non-standard orientation. face_orientation defaults to true, face_flip and face_rotation default to false (standard orientation) and has no effect in 2d.

Of course, since this class is for the case dim==0, this function is not implemented.

Member Data Documentation

◆ max_children_per_cell

constexpr unsigned int GeometryInfo< 0 >::max_children_per_cell = 1
staticconstexpr

Maximum number of children of a cell, i.e. the number of children of an isotropically refined cell.

If a cell is refined anisotropically, the actual number of children may be less than the value given here.

Definition at line 1247 of file geometry_info.h.

◆ faces_per_cell

constexpr unsigned int GeometryInfo< 0 >::faces_per_cell = 0
staticconstexpr

Number of faces a cell has.

Definition at line 1252 of file geometry_info.h.

◆ max_children_per_face

constexpr unsigned int GeometryInfo< 0 >::max_children_per_face = 0
staticconstexpr

Maximum number of children of a refined face, i.e. the number of children of an isotropically refined face.

If a cell is refined anisotropically, the actual number of children may be less than the value given here.

Definition at line 1280 of file geometry_info.h.

◆ vertices_per_cell

constexpr unsigned int GeometryInfo< 0 >::vertices_per_cell = 1
staticconstexpr

Number of vertices a cell has.

Definition at line 1293 of file geometry_info.h.

◆ vertices_per_face

constexpr unsigned int GeometryInfo< 0 >::vertices_per_face = 0
staticconstexpr

Number of vertices each face has. Since this is not useful in one dimension, we provide a useless number (in the hope that a compiler may warn when it sees constructs like for (i=0; i<vertices_per_face; ++i), at least if i is an unsigned int.

Definition at line 1373 of file geometry_info.h.

◆ lines_per_face

constexpr unsigned int GeometryInfo< 0 >::lines_per_face = 0
staticconstexpr

Number of lines each face has.

Definition at line 1378 of file geometry_info.h.

◆ quads_per_face

constexpr unsigned int GeometryInfo< 0 >::quads_per_face = 0
staticconstexpr

Number of quads on each face.

Definition at line 1383 of file geometry_info.h.

◆ lines_per_cell

constexpr unsigned int GeometryInfo< 0 >::lines_per_cell = 0
staticconstexpr

Number of lines of a cell.

Definition at line 1388 of file geometry_info.h.

◆ quads_per_cell

constexpr unsigned int GeometryInfo< 0 >::quads_per_cell = 0
staticconstexpr

Number of quadrilaterals of a cell.

Definition at line 1393 of file geometry_info.h.

◆ hexes_per_cell

constexpr unsigned int GeometryInfo< 0 >::hexes_per_cell = 0
staticconstexpr

Number of hexahedra of a cell.

Definition at line 1398 of file geometry_info.h.

◆ ucd_to_deal

const std::array< unsigned int, GeometryInfo< 0 >::vertices_per_cell > GeometryInfo< 0 >::ucd_to_deal = {{0}}
static

Rearrange vertices for UCD output. For a cell being written in UCD format, each entry in this field contains the number of a vertex in deal.II that corresponds to the UCD numbering at this location.

Typical example: write a cell and arrange the vertices, such that UCD understands them.

for (i=0; i< n_vertices; ++i)
out << cell->vertex(ucd_to_deal[i]);
static const std::array< unsigned int, vertices_per_cell > ucd_to_deal

As the vertex numbering in deal.II versions <= 5.1 happened to coincide with the UCD numbering, this field can also be used like a old_to_lexicographic mapping.

Definition at line 1417 of file geometry_info.h.

◆ dx_to_deal

const std::array< unsigned int, GeometryInfo< 0 >::vertices_per_cell > GeometryInfo< 0 >::dx_to_deal = {{0}}
static

Rearrange vertices for OpenDX output. For a cell being written in OpenDX format, each entry in this field contains the number of a vertex in deal.II that corresponds to the DX numbering at this location.

Typical example: write a cell and arrange the vertices, such that OpenDX understands them.

for (i=0; i< n_vertices; ++i)
out << cell->vertex(dx_to_deal[i]);
static const std::array< unsigned int, vertices_per_cell > dx_to_deal

Definition at line 1432 of file geometry_info.h.


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