Dune Core Modules (2.9.1)

Dune::Geo::ReferenceElement< Implementation > Class Template Reference

This class provides access to geometric and topological properties of a reference element. More...

#include <dune/geometry/referenceelement.hh>

Classes

struct  Codim
 Collection of types depending on the codimension. More...
 

Public Types

using ctype = typename Implementation::ctype
 The coordinate field type.
 
using CoordinateField = ctype
 The coordinate field type.
 
using Coordinate = typename Implementation::Coordinate
 The coordinate type.
 
typedef ctype Volume
 Type used for volume.
 

Public Member Functions

int size (int c) const
 number of subentities of codimension c More...
 
int size (int i, int c, int cc) const
 number of subentities of codimension cc of subentity (i,c) More...
 
int subEntity (int i, int c, int ii, int cc) const
 obtain number of ii-th subentity with codim cc of (i,c) More...
 
auto subEntities (int i, int c, int cc) const
 Obtain the range of numbers of subentities with codim cc of (i,c) More...
 
decltype(auto) type (int i, int c) const
 obtain the type of subentity (i,c) More...
 
decltype(auto) type () const
 obtain the type of this reference element More...
 
decltype(auto) position (int i, int c) const
 position of the barycenter of entity (i,c) More...
 
bool checkInside (const Coordinate &local) const
 check if a coordinate is in the reference element More...
 
template<int codim>
Codim< codim >::Geometry geometry (int i) const
 obtain the embedding of subentity (i,codim) into the reference element More...
 
CoordinateField volume () const
 obtain the volume of the reference element
 
decltype(auto) integrationOuterNormal (int face) const
 obtain the integration outer normal of the reference element More...
 
 ReferenceElement ()
 Constructs an empty reference element. More...
 
const Implementation & impl () const
 Returns a reference to the internal implementation object. More...
 
bool operator== (const ReferenceElement &r) const
 Compares for equality with another reference element.
 
bool operator!= (const ReferenceElement &r) const
 Compares for inequality with another reference element.
 

Static Public Attributes

static constexpr int dimension = Implementation::dimension
 The dimension of the reference element.
 

Detailed Description

template<typename Implementation>
class Dune::Geo::ReferenceElement< Implementation >

This class provides access to geometric and topological properties of a reference element.

This includes its type, the number of subentities, the volume, and a method for checking if a point is contained in the reference element. The embedding of each subentity into the reference element is also provided.

This class has value semantics, i.e. you can (and should) pass it around by value and not by reference and store a copy of it.

Instances of this object for a given geometry type can be retrieved from the ReferenceElements class.

Constructor & Destructor Documentation

◆ ReferenceElement()

template<typename Implementation >
Dune::Geo::ReferenceElement< Implementation >::ReferenceElement ( )
inline

Constructs an empty reference element.

This constructor creates an empty (invalid) reference element. This element may not be used in any way except for assigning other reference elements to it. After assigning a valid reference element (obtained from ReferenceElements), it may be used without restrictions.

Member Function Documentation

◆ checkInside()

template<typename Implementation >
bool Dune::Geo::ReferenceElement< Implementation >::checkInside ( const Coordinate local) const
inline

check if a coordinate is in the reference element

This method returns true if the given local coordinate is within this reference element.

Parameters
[in]localcoordinates of the point

◆ geometry()

template<typename Implementation >
template<int codim>
Codim< codim >::Geometry Dune::Geo::ReferenceElement< Implementation >::geometry ( int  i) const
inline

obtain the embedding of subentity (i,codim) into the reference element

Denote by E the i-th subentity of codimension codim of the current reference element. This method returns a Dune::AffineGeometry that maps the reference element of E into the current reference element.

Template Parameters
codimcodimension of subentity E
Parameters
[in]inumber of subentity E (0 <= i < size( codim ))

◆ impl()

template<typename Implementation >
const Implementation & Dune::Geo::ReferenceElement< Implementation >::impl ( ) const
inline

Returns a reference to the internal implementation object.

Warning
This method may only be called on valid reference elements.
This method exposes undocumented internals that may change without notice!

◆ integrationOuterNormal()

template<typename Implementation >
decltype(auto) Dune::Geo::ReferenceElement< Implementation >::integrationOuterNormal ( int  face) const
inline

obtain the integration outer normal of the reference element

The integration outer normal is the outer normal whose length coincides with the face's integration element.

Deprecated:
After dune-2.6 the return value will no longer be a reference but a copy. Code storing pointers or references to the result must be adjusted.
Parameters
[in]faceindex of the face, whose normal is desired

◆ position()

template<typename Implementation >
decltype(auto) Dune::Geo::ReferenceElement< Implementation >::position ( int  i,
int  c 
) const
inline

position of the barycenter of entity (i,c)

Denote by E the i-th subentity of codimension c of the current reference element. This method returns the coordinates of the center of gravity of E within the current reference element.

Deprecated:
After dune-2.6 the return value will no longer be a reference but a copy. Code storing pointers or references to the result must be adjusted.
Parameters
[in]inumber of subentity E (0 <= i < size( c ))
[in]ccodimension of subentity E

Referenced by Dune::AffineGeometry< ct, mydim, cdim >::center(), and Dune::AffineGeometry< ct, mydim, cdim >::corner().

◆ size() [1/2]

template<typename Implementation >
int Dune::Geo::ReferenceElement< Implementation >::size ( int  c) const
inline

number of subentities of codimension c

Parameters
[in]ccodimension whose size is desired

Referenced by Dune::AffineGeometry< ct, mydim, cdim >::corners().

◆ size() [2/2]

template<typename Implementation >
int Dune::Geo::ReferenceElement< Implementation >::size ( int  i,
int  c,
int  cc 
) const
inline

number of subentities of codimension cc of subentity (i,c)

Denote by E the i-th subentity of codimension c of the current reference element. This method returns the number of subentities of codimension cc of the current reference element, that are also a subentity of E. If cc<c this number is zero.

Parameters
[in]inumber of subentity E (0 <= i < size( c ))
[in]ccodimension of subentity E (0 <= c <= dim)
[in]cccodimension whose size is desired (0 <= cc <= dim)

◆ subEntities()

template<typename Implementation >
auto Dune::Geo::ReferenceElement< Implementation >::subEntities ( int  i,
int  c,
int  cc 
) const
inline

Obtain the range of numbers of subentities with codim cc of (i,c)

Denote by E the i-th subentity of codimension c of the current reference element. This method returns a range of numbers of all subentities of E with codimension cc. Notice that the sub-subentity codimension as well as the numbers in the returned range are given with respect to the reference element itself and not with respect to E. For 0<=cc<c this will return an empty range. The returned range r provide the methods r.begin(), r.end(), r.contains(std::size_t) and r.size() mimicking an immutable iterable set.

Parameters
[in]inumber of subentity E (0 <= i < size( c ))
[in]ccodimension of subentity E
[in]cccodimension of subentity S (0 <= cc <= dim)
Returns
An iterable range of numbers of the sub-subentities.

◆ subEntity()

template<typename Implementation >
int Dune::Geo::ReferenceElement< Implementation >::subEntity ( int  i,
int  c,
int  ii,
int  cc 
) const
inline

obtain number of ii-th subentity with codim cc of (i,c)

Denote by E the i-th subentity of codimension c of the current reference element. And denote by S the ii-th subentity of codimension (cc-c) of E. Then, S is a also a subentity of codimension cc of the current reference element. This method returns the number of S with respect to the current reference element.

Parameters
[in]inumber of subentity E (0 <= i < size( c ))
[in]ccodimension of subentity E
[in]iinumber of subentity S (with respect to E)
[in]cccodimension of subentity S (c <= cc <= dim)

◆ type() [1/2]

template<typename Implementation >
decltype(auto) Dune::Geo::ReferenceElement< Implementation >::type ( ) const
inline

obtain the type of this reference element

Deprecated:
After dune-2.6 the return value will no longer be a reference but a copy. Code storing pointers or references to the result must be adjusted.

◆ type() [2/2]

template<typename Implementation >
decltype(auto) Dune::Geo::ReferenceElement< Implementation >::type ( int  i,
int  c 
) const
inline

obtain the type of subentity (i,c)

Denote by E the i-th subentity of codimension c of the current reference element. This method returns the GeometryType of E.

Deprecated:
After dune-2.6 the return value will no longer be a reference but a copy. Code storing pointers or references to the result must be adjusted.
Parameters
[in]inumber of subentity E (0 <= i < size( c ))
[in]ccodimension of subentity E

Referenced by Dune::AffineGeometry< ct, mydim, cdim >::type().


The documentation for this class was generated from the following files:
Creative Commons License   |  Legal Statements / Impressum  |  Hosted by TU Dresden  |  generated with Hugo v0.111.3 (Nov 21, 23:30, 2024)