![]() |
Reference documentation for deal.II version 9.6.2
|
#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_cell > | vertex_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 unsigned int | n_subfaces (const internal::SubfaceCase< dim > &subface_case) |
static double | subface_ratio (const internal::SubfaceCase< dim > &subface_case, const unsigned int subface_no) |
static RefinementCase< dim - 1 > | face_refinement_case (const RefinementCase< dim > &cell_refinement_case, const unsigned int face_no, const bool face_orientation=true, const bool face_flip=false, const bool face_rotation=false) |
static RefinementCase< dim > | min_cell_refinement_case_for_face_refinement (const RefinementCase< dim - 1 > &face_refinement_case, const unsigned int face_no, const bool face_orientation=true, const bool face_flip=false, const bool face_rotation=false) |
static RefinementCase< 1 > | line_refinement_case (const RefinementCase< dim > &cell_refinement_case, const unsigned int line_no) |
static RefinementCase< dim > | min_cell_refinement_case_for_line_refinement (const unsigned int line_no) |
static unsigned int | child_cell_on_face (const RefinementCase< dim > &ref_case, const unsigned int face, const unsigned int subface, const bool face_orientation=true, const bool face_flip=false, const bool face_rotation=false, const RefinementCase< dim - 1 > &face_refinement_case=RefinementCase< dim - 1 >::isotropic_refinement) |
static unsigned int | line_to_cell_vertices (const unsigned int line, const unsigned int vertex) |
static unsigned int | standard_to_real_face_vertex (const unsigned int vertex, const bool face_orientation=true, const bool face_flip=false, const bool face_rotation=false) |
static unsigned int | real_to_standard_face_vertex (const unsigned int vertex, const bool face_orientation=true, const bool face_flip=false, const bool face_rotation=false) |
static unsigned int | standard_to_real_face_line (const unsigned int line, const bool face_orientation=true, const bool face_flip=false, const bool face_rotation=false) |
static unsigned int | standard_to_real_line_vertex (const unsigned int vertex, const bool line_orientation=true) |
static std::array< unsigned int, 2 > | standard_quad_vertex_to_line_vertex_index (const unsigned int vertex) |
static std::array< unsigned int, 2 > | standard_hex_vertex_to_quad_vertex_index (const unsigned int vertex) |
static std::array< unsigned int, 2 > | standard_hex_line_to_quad_line_index (const unsigned int line) |
static unsigned int | real_to_standard_face_line (const unsigned int line, const bool face_orientation=true, const bool face_flip=false, const bool face_rotation=false) |
static Point< dim > | unit_cell_vertex (const unsigned int vertex) |
static unsigned int | child_cell_from_point (const Point< dim > &p) |
static Point< dim > | cell_to_child_coordinates (const Point< dim > &p, const unsigned int child_index, const RefinementCase< dim > refine_case=RefinementCase< dim >::isotropic_refinement) |
static Point< dim > | child_to_cell_coordinates (const Point< dim > &p, const unsigned int child_index, const RefinementCase< dim > refine_case=RefinementCase< dim >::isotropic_refinement) |
static bool | is_inside_unit_cell (const Point< dim > &p) |
static Point< dim, Number > | project_to_unit_cell (const Point< dim, Number > &p) |
static double | distance_to_unit_cell (const Point< dim > &p) |
static double | d_linear_shape_function (const Point< dim > &xi, const unsigned int i) |
static Tensor< 1, dim > | d_linear_shape_function_gradient (const Point< dim > &xi, const unsigned int i) |
static void | alternating_form_at_vertices (const Point< spacedim >(&vertices)[vertices_per_cell], Tensor< spacedim - dim, spacedim >(&forms)[vertices_per_cell]) |
static ::ExceptionBase & | ExcInvalidCoordinate (double arg1) |
static ::ExceptionBase & | ExcInvalidSubface (int arg1, int arg2, int arg3) |
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_cell > | ucd_to_deal |
static const std::array< unsigned int, vertices_per_cell > | dx_to_deal |
static constexpr ndarray< unsigned int, vertices_per_cell, dim > | vertex_to_face |
static constexpr std::array< unsigned int, faces_per_cell > | unit_normal_direction |
static constexpr std::array< int, faces_per_cell > | unit_normal_orientation |
static constexpr std::array< Tensor< 1, dim >, faces_per_cell > | unit_normal_vector |
static constexpr ndarray< Tensor< 1, dim >, faces_per_cell, dim - 1 > | unit_tangential_vectors |
static constexpr std::array< unsigned int, faces_per_cell > | opposite_face |
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 1232 of file geometry_info.h.
|
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:
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.
|
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.
|
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:
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.
|
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.
|
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.
|
static |
Return the number of subfaces of a face refined according to internal::SubfaceCase face_ref_case
.
|
static |
Given a face on the reference element with a internal::SubfaceCase<dim>
face_refinement_case
this function returns the ratio between the area of the subface_no
th subface and the area(=1) of the face.
E.g. for internal::SubfaceCase::cut_xy the ratio is 1/4 for each of the subfaces.
|
static |
Given a cell refined with the RefinementCase
cell_refinement_case
return the SubfaceCase
of the face_no
th face.
|
static |
Given the SubfaceCase face_refinement_case
of the face_no
th face, return the smallest RefinementCase of the cell, which corresponds to that refinement of the face.
|
static |
Given a cell refined with the RefinementCase cell_refinement_case
return the RefinementCase of the line_no
th face.
|
static |
Return the minimal / smallest RefinementCase of the cell, which ensures refinement of line line_no
.
|
static |
This field stores which child cells are adjacent to a certain face of the mother cell.
For example, in 2d the layout of a cell is as follows:
* . 3 * . 2-->--3 * . | | * . 0 ^ ^ 1 * . | | * . 0-->--1 * . 2 *
Vertices and faces are indicated with their numbers, faces also with their directions.
Now, when refined, the layout is like this:
* *--*--* * | 2|3 | * *--*--* * | 0|1 | * *--*--* *
Thus, the child cells on face 0 are (ordered in the direction of the face) 0 and 2, on face 3 they are 2 and 3, etc.
For three spatial dimensions, the exact order of the children is laid down in the general documentation of this class.
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. The concept of face orientations is explained in this glossary entry.
In the case of anisotropically refined cells and faces, the RefinementCase
of the face, face_ref_case, might have an influence on which child is behind which given subface, thus this is an additional argument, defaulting to isotropic refinement of the face.
|
static |
Map line vertex number to cell vertex number, i.e. give the cell vertex number of the vertexth vertex of line line, e.g. GeometryInfo<2>::line_to_cell_vertices(3,0)=2.
The order of the lines, as well as their direction (which in turn determines which is the first and which the second vertex on a line) is the canonical one in deal.II, as described in the general documentation of this class.
For dim=2 this call is simply passed down to the face_to_cell_vertices() function.
|
static |
Map the vertex index vertex
of a face in standard orientation to one of a face with arbitrary face_orientation
, face_flip
and face_rotation
. The values of these three flags default to true, false and false, respectively. this combination describes a face in standard orientation.
This function is only implemented in 3d.
|
static |
Map the vertex index vertex
of a face with arbitrary face_orientation
, face_flip
and face_rotation
to a face in standard orientation. The values of these three flags default to true, false and false, respectively. this combination describes a face in standard orientation.
This function is only implemented in 3d.
|
static |
Map the line index line
of a face in standard orientation to one of a face with arbitrary face_orientation
, face_flip
and face_rotation
. The values of these three flags default to true, false and false, respectively. this combination describes a face in standard orientation.
This function is only implemented in 3d.
|
static |
Map the vertex index vertex
of a line in standard orientation to one of a face with arbitrary line_orientation
. The value of this flag default to true.
|
static |
Decompose the vertex index in a quad into a pair of a line index and a vertex index within this line.
|
static |
Decompose the vertex index in a hex into a pair of a quad index and a vertex index within this quad.
|
static |
Decompose the line index in a hex into a pair of a quad index and a line index within this quad.
|
static |
Map the line index line
of a face with arbitrary face_orientation
, face_flip
and face_rotation
to a face in standard orientation. The values of these three flags default to true, false and false, respectively. this combination describes a face in standard orientation.
This function is only implemented in 3d.
|
static |
Return the position of the ith
vertex on the unit cell. The order of vertices is the canonical one in deal.II, as described in the general documentation of this class.
|
static |
Given a point p
in unit coordinates, return the number of the child cell in which it would lie in. If the point lies on the interface of two children, return any one of their indices. The result is always less than GeometryInfo<dimension>::max_children_per_cell.
The order of child cells is described the general documentation of this class.
|
static |
Given coordinates p
on the unit cell, return the values of the coordinates of this point in the coordinate system of the given child. Neither original nor returned coordinates need actually be inside the cell, we simply perform a scale-and-shift operation with a shift that depends on the number of the child.
|
static |
The reverse function to the one above: take a point in the coordinate system of the child, and transform it to the coordinate system of the mother cell.
|
static |
Return true if the given point is inside the unit cell of the present space dimension.
|
static |
Projects a given point onto the unit cell, i.e. each coordinate outside [0..1] is modified to lie within that interval.
|
static |
Return the infinity norm of the vector between a given point p
outside the unit cell to the closest unit cell boundary. For points inside the cell, this is defined as zero.
|
static |
Compute the value of the
|
static |
Compute the gradient of the
|
static |
For a (bi-, tri-)linear mapping from the reference cell, face, or edge to the object specified by the given vertices, compute the alternating form of the transformed unit vectors vertices. For an object of dimensionality dim
, there are dim
vectors with spacedim
components each, and the alternating form is a tensor of rank spacedim-dim that corresponds to the wedge product of the dim
unit vectors, and it corresponds to the volume and normal vectors of the mapping from reference element to the element described by the vertices.
For example, if dim==spacedim==2, then the alternating form is a scalar (because spacedim-dim=0) and its value equals
Likewise, if we have dim==spacedim-1 (e.g. we have a quad in 3d space, or a line in 2d), then the alternating product denotes the normal vector (i.e. a rank-1 tensor, since spacedim-dim=1) to the object at each vertex, where the normal vector's magnitude denotes the area element of the transformation from the reference object to the object given by the vertices. In particular, if again the mapping from reference object to the object under consideration here is linear (not bi- or trilinear), then the returned vectors are all parallel, perpendicular to the mapped object described by the vertices, and have a magnitude equal to the area/volume of the mapped object. If dim=1, spacedim=2, then the returned value is
This function is used in order to determine how distorted a cell is (see the entry on distorted cells in the glossary).
|
static |
Exception
|
static |
Exception
|
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 1241 of file geometry_info.h.
|
staticconstexpr |
Number of faces a cell has.
Definition at line 1246 of file geometry_info.h.
|
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 1274 of file geometry_info.h.
|
staticconstexpr |
Number of vertices a cell has.
Definition at line 1287 of file geometry_info.h.
|
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 1367 of file geometry_info.h.
|
staticconstexpr |
Number of lines each face has.
Definition at line 1372 of file geometry_info.h.
|
staticconstexpr |
Number of quads on each face.
Definition at line 1377 of file geometry_info.h.
|
staticconstexpr |
Number of lines of a cell.
Definition at line 1382 of file geometry_info.h.
|
staticconstexpr |
Number of quadrilaterals of a cell.
Definition at line 1387 of file geometry_info.h.
|
staticconstexpr |
Number of hexahedra of a cell.
Definition at line 1392 of file geometry_info.h.
|
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.
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 1411 of file geometry_info.h.
|
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.
Definition at line 1426 of file geometry_info.h.
|
staticconstexpr |
This field stores for each vertex to which faces it belongs. In any given dimension, the number of faces is equal to the dimension. The first index in this 2d-array runs over all vertices, the second index over dim
faces to which the vertex belongs.
The order of the faces for each vertex is such that the first listed face bounds the reference cell in x direction, the second in y direction, and so on.
Definition at line 2127 of file geometry_info.h.
|
staticconstexpr |
For each face of the reference cell, this field stores the coordinate direction in which its normal vector points. In dim dimension these are the 2*dim first entries of {0,0,1,1,2,2,3,3}.
Note that this is only the coordinate number. The actual direction of the normal vector is obtained by multiplying the unit vector in this direction with unit_normal_orientation.
Definition at line 2579 of file geometry_info.h.
|
staticconstexpr |
Orientation of the unit normal vector of a face of the reference cell. In dim dimension these are the 2*dim first entries of {-1,1,-1,1,-1,1,-1,1}.
Each value is either 1 or -1, corresponding to a normal vector pointing in the positive or negative coordinate direction, respectively.
Note that this is only the standard orientation of faces. At least in 3d, actual faces of cells in a triangulation can also have the opposite orientation, depending on a flag that one can query from the cell it belongs to. For more information, see the glossary entry on face orientation.
Definition at line 2598 of file geometry_info.h.
|
staticconstexpr |
Unit normal vector (Point<dim>) of a face of the reference cell.
Note that this is only the standard orientation of faces. At least in 3d, actual faces of cells in a triangulation can also have the opposite orientation, depending on a flag that one can query from the cell it belongs to. For more information, see the glossary entry on face orientation.
Definition at line 2612 of file geometry_info.h.
|
staticconstexpr |
Unit tangential vectors (array of dim-1 elements of Point<dim>) of a face of the reference cell, arranged in a right-hand coordinate system such that the cross product between the two vectors return the unit normal vector.
Note that this is only the standard orientation of faces. At least in 3d, actual faces of cells in a triangulation can also have the opposite orientation, depending on a flag that one can query from the cell it belongs to. For more information, see the glossary entry on face orientation.
Definition at line 2629 of file geometry_info.h.
|
staticconstexpr |
List of numbers which denotes which face is opposite to a given face. Its entries are the first 2*dim entries of { 1, 0, 3, 2, 5, 4, 7, 6}.
Definition at line 2637 of file geometry_info.h.