dune-geometry
2.9.0
|
Classes | |
struct | Dune::Geo::ReferenceElements< ctype_, dim > |
Class providing access to the singletons of the reference elements. More... | |
class | Dune::Geo::ReferenceElement< Implementation > |
This class provides access to geometric and topological properties of a reference element. More... | |
Typedefs | |
template<typename... T> | |
using | Dune::Transitional::ReferenceElement = unspecified-type |
Returns the type of reference element for the argument types T... More... | |
template<typename T , int dim> | |
using | Dune::ReferenceElement = unspecified-type |
Returns the type of reference element for the argument type T. More... | |
Functions | |
template<typename... T> | |
unspecified value type | Dune::referenceElement (T &&... t) |
Returns a reference element for the objects t.... More... | |
template<typename T , int dim> | |
auto | Dune::referenceElement (const Dune::GeometryType >, Dune::Dim< dim >={}) |
Returns a reference element of dimension dim for the given geometry type and coordinate field type. More... | |
template<typename T , int dim, std::enable_if_t< IsNumber< std::decay_t< T >>::value, int > = 0> | |
auto | Dune::referenceElement (const T &, const Dune::GeometryType >, Dune::Dim< dim >) |
Returns a reference element of dimension dim for the given geometry type and coordinate field type. More... | |
In the following we will give a definition of reference elements and subelement numbering. This is used to define geometries by prescribing a set of points in the space .
The basic building block for these elements is given by a recursion formula which assigns to each set either a prism element
or a pyramid element
with
and
. The recursion starts with a single point
.
For this leads to the following elements
In general if is a cube then
is also a cube and if
is a simplex then
is also a simplex.
Based on the recursion formula we can also define a numbering of the subentities and also of the sub-subentities of or
based on a numbering of
. For the subentities of codimension
we use the numbering
For the subentity of codimension in a codimension
subentity
we use the numbering induced by the numbering the reference element corresponding to
.
Here is a graphical representation of the reference elements:
![]()
Face Numbering | ![]()
Edge Numbering |
![]()
Face Numbering | ![]()
Edge Numbering |
![]()
Face Numbering | ![]()
Edge Numbering |
![]()
Face Numbering | ![]()
Edge Numbering |
In addition to the numbering and the corner coordinates of a reference element we also define the barycenters
, the volume
and the normals
to all codimension one subelements.
The recursion formula is also used to define mappings from reference elements to general polytop given by a set of coordinates for the corner points - together with the mapping
, the transpose of the Jacobian
is also defined where
is the dimension of the reference element and
the dimension of the coordinates. This suffices to define other necessary parts of a Dune geometry by LQ-decomposing
: let
be given with a lower diagonal matrix
and a matrix
which satisfies
:
The next sections describe the details of the construction.
We define the set of reference topologies by the following rules:
For each reference topology we define the following values:
Notice that the number of vertices (i.e., subtopologies of codimension ) of a topology
does not uniquely identify the topology. To see this, consider the topologies
and
. For these topologies we have
.
For each reference topology we associate the set of corners
defined through
The convex hall of the set of points defines the reference domain
for the reference topology
; it follows that
A pair of a topology
and a map
with
is called an element.
The reference element is the pair .
For a given set of points we define a mapping
through
for all
. This mapping can be expressed using the recursive definition of the reference topologies through:
Given a reference topology , a codimension
and a subtopology
we define a subset of the corner set
given by the subsequence
of
:
,
, and for
we define
through the recursion
Given these subsets we define subreference elements of
given by the following mapping
.
Furthermore we define a numbering of the subreference elements of each subreference element in . This is the number
for
,
, and
,
for which
using Dune::Transitional::ReferenceElement = typedef unspecified-type |
Returns the type of reference element for the argument types T...
This type alias can be used to get the type of a reference element if you want to store the element as a class member or need to access nested type information. Normally, it will return the type of reference element that a call to referenceElement(T...)
would return, for example for a geometry:
There is also a special shorthand signature for the default reference elements:
using Dune::ReferenceElement = typedef unspecified-type |
Returns the type of reference element for the argument type T.
This type alias can be used to get the type of a reference element if you want to store the element as a class member or need to access nested type information. Normally, it will return the type of reference element that a call to referenceElement(T)
would return, for example for a geometry:
In the long run, we want to support multiple types T here, but for now that does not work due to backwards compatibility reasons. You can also still obtain the type of a standard reference element using Dune::ReferenceElement<ctype,dim>, but this is deprecated in DUNE 2.6. If you need support for ReferenceElement with multiple type arguments, you can use Dune::Transitional::ReferenceElement for now, which supports multiple types, but not the backwards compatibility mode and will become the default after the release of DUNE 2.6. There is also a special shorthand signature for the default reference elements:
auto Dune::referenceElement | ( | const Dune::GeometryType & | gt, |
Dune::Dim< dim > | = {} |
||
) |
Returns a reference element of dimension dim for the given geometry type and coordinate field type.
This function allows you to obtain a reference element for a given coordinate type, dimension and GeometryType:
auto Dune::referenceElement | ( | const T & | , |
const Dune::GeometryType & | gt, | ||
Dune::Dim< dim > | |||
) |
Returns a reference element of dimension dim for the given geometry type and coordinate field type.
This function allows you to obtain a reference element for a given coordinate type, dimension and GeometryType:
unspecified value type Dune::referenceElement | ( | T &&... | t | ) |
Returns a reference element for the objects t....
The freestanding function referenceElement is a generic entry point for getting reference elements for arbitrary objects that support the operation. As it relies on argument-dependent lookup, the function should be called without any qualifying namespace. Note, however, that the versions of referenceElement() for a dimension and GeometryType with explicit template arguments cannot be found by ADL, so you have to explicitly pull them in or qualify the call using Dune::
:
The returned object is guaranteed to have value semantics, so you can copy it around and store it by value.
The grid geometries in dune-grid support this function, and thus most people will use this function as
This does of course also work for entities of other codimensions.