Go to the documentation of this file.
3 #ifndef DUNE_GEOMETRY_REFERENCEELEMENT_HH
4 #define DUNE_GEOMETRY_REFERENCEELEMENT_HH
6 #include <dune/common/deprecated.hh>
16 template<
typename ctype,
int dim>
17 class ReferenceElementContainer;
22 template<
typename ctype,
int dim>
23 class ReferenceElementImplementation;
26 template<
typename ctype,
int dim>
30 template<
typename ctype,
int dim>
54 template<
typename Implementation>
79 using ctype =
typename Implementation::ctype;
91 static constexpr
int dimension = Implementation::dimension;
100 return _impl->size(c);
115 int size(
int i,
int c,
int cc)
const
117 return _impl->size(i,c,cc);
136 return _impl->subEntity(i,c,ii,cc);
159 return _impl->subEntities(i,c,cc);
175 decltype(
auto)
type(
int i,
int c)
const
177 return _impl->type(i,c);
190 return _impl->type();
209 return _impl->position(i,c);
222 return _impl->checkInside(local);
240 return _impl->template geometry<codim>(i);
247 return _impl->volume();
264 return _impl->integrationOuterNormal(face);
284 const Implementation&
impl()
const
291 DUNE_DEPRECATED_MSG(
"Capturing reference elements by reference is deprecated in DUNE 2.6. Please store a copy instead.")
303 return _impl == r._impl;
309 return not (*
this == r);
315 return reinterpret_cast<std::size_t
>(r._impl);
321 friend Implementation;
331 void setImplementation(
const Implementation&
impl)
336 const Implementation* _impl;
345 #endif // DUNE_GEOMETRY_REFERENCEELEMENT_HH
int size(int i, int c, int cc) const
number of subentities of codimension cc of subentity (i,c)
Definition: referenceelement.hh:115
ctype Volume
Type used for volume.
Definition: referenceelement.hh:88
decltype(auto) position(int i, int c) const
position of the barycenter of entity (i,c)
Definition: referenceelement.hh:207
A unique label for each type of element that can occur in a grid.
Collection of types depending on the codimension.
Definition: referenceelement.hh:70
bool checkInside(const Coordinate &local) const
check if a coordinate is in the reference element
Definition: referenceelement.hh:220
typename Implementation::Coordinate Coordinate
The coordinate type.
Definition: referenceelement.hh:85
CoordinateField volume() const
obtain the volume of the reference element
Definition: referenceelement.hh:245
int subEntity(int i, int c, int ii, int cc) const
obtain number of ii-th subentity with codim cc of (i,c)
Definition: referenceelement.hh:134
Static tag representing a codimension.
Definition: dimension.hh:20
Codim< codim >::Geometry geometry(int i) const
obtain the embedding of subentity (i,codim) into the reference element
Definition: referenceelement.hh:238
const Implementation & impl() const
Returns a reference to the internal implementation object.
Definition: referenceelement.hh:284
ReferenceElement()
Constructs an empty reference element.
Definition: referenceelement.hh:275
Class providing access to the singletons of the reference elements.
Definition: affinegeometry.hh:34
friend std::size_t hash_value(const ReferenceElement &r)
Yields a hash value suitable for storing the reference element a in hash table.
Definition: referenceelement.hh:313
bool operator==(const ReferenceElement &r) const
Compares for equality with another reference element.
Definition: referenceelement.hh:301
This class provides access to geometric and topological properties of a reference element.
Definition: affinegeometry.hh:28
int size(int c) const
number of subentities of codimension c
Definition: referenceelement.hh:98
bool operator!=(const ReferenceElement &r) const
Compares for inequality with another reference element.
Definition: referenceelement.hh:307
auto subEntities(int i, int c, int cc) const
Obtain the range of numbers of subentities with codim cc of (i,c)
Definition: referenceelement.hh:157
static constexpr int dimension
The dimension of the reference element.
Definition: referenceelement.hh:91
decltype(auto) integrationOuterNormal(int face) const
obtain the integration outer normal of the reference element
Definition: referenceelement.hh:262
Definition: affinegeometry.hh:18
Definition: referenceelement.hh:27
typename Implementation::ctype ctype
The coordinate field type.
Definition: referenceelement.hh:79
ctype CoordinateField
The coordinate field type.
Definition: referenceelement.hh:82
implementation-defined Geometry
type of geometry embedding a subentity into the reference element
Definition: referenceelement.hh:73
decltype(auto) type() const
obtain the type of this reference element
Definition: referenceelement.hh:188