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;
88 static constexpr
int dimension = Implementation::dimension;
97 return _impl->size(c);
112 int size(
int i,
int c,
int cc)
const
114 return _impl->size(i,c,cc);
133 return _impl->subEntity(i,c,ii,cc);
149 decltype(
auto)
type(
int i,
int c)
const
151 return _impl->type(i,c);
164 return _impl->type();
183 return _impl->position(i,c);
196 return _impl->checkInside(local);
214 return _impl->template geometry<codim>(i);
221 return _impl->volume();
238 return _impl->integrationOuterNormal(face);
258 const Implementation&
impl()
const
265 DUNE_DEPRECATED_MSG(
"Capturing reference elements by reference is deprecated in DUNE 2.6. Please store a copy instead.")
277 return _impl == r._impl;
283 return not (*
this == r);
289 return reinterpret_cast<std::size_t
>(r._impl);
295 friend Implementation;
305 void setImplementation(
const Implementation&
impl)
310 const Implementation* _impl;
319 #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:112
decltype(auto) position(int i, int c) const
position of the barycenter of entity (i,c)
Definition: referenceelement.hh:181
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:194
typename Implementation::Coordinate Coordinate
The coordinate type.
Definition: referenceelement.hh:85
CoordinateField volume() const
obtain the volume of the reference element
Definition: referenceelement.hh:219
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:131
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:212
const Implementation & impl() const
Returns a reference to the internal implementation object.
Definition: referenceelement.hh:258
ReferenceElement()
Constructs an empty reference element.
Definition: referenceelement.hh:249
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:287
bool operator==(const ReferenceElement &r) const
Compares for equality with another reference element.
Definition: referenceelement.hh:275
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:95
bool operator!=(const ReferenceElement &r) const
Compares for inequality with another reference element.
Definition: referenceelement.hh:281
static constexpr int dimension
The dimension of the reference element.
Definition: referenceelement.hh:88
decltype(auto) integrationOuterNormal(int face) const
obtain the integration outer normal of the reference element
Definition: referenceelement.hh:236
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:162