5 #ifndef DUNE_GEOMETRY_REFERENCEELEMENT_HH 6 #define DUNE_GEOMETRY_REFERENCEELEMENT_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>
27 struct ReferenceElements;
50 template<
typename Implementation>
60 using Codim =
typename Implementation::template Codim<codim>;
75 using ctype =
typename Implementation::ctype;
87 static constexpr
int dimension = Implementation::dimension;
96 return _impl->size(c);
111 int size(
int i,
int c,
int cc)
const 113 return _impl->size(i,c,cc);
132 return _impl->subEntity(i,c,ii,cc);
155 return _impl->subEntities(i,c,cc);
169 return _impl->type(i,c);
177 return _impl->type();
192 return _impl->position(i,c);
205 return _impl->checkInside(local);
223 return _impl->template geometry<codim>(i);
230 return _impl->volume();
243 return _impl->integrationOuterNormal(face);
263 const Implementation&
impl()
const 271 return _impl == r._impl;
277 return not (*
this == r);
283 return reinterpret_cast<std::size_t
>(r._impl);
289 friend Implementation;
299 void setImplementation(
const Implementation&
impl)
304 const Implementation* _impl;
313 #endif // DUNE_GEOMETRY_REFERENCEELEMENT_HH decltype(referenceElement(std::declval< T >()...)) ReferenceElement
Definition: referenceelements.hh:291
This class provides access to geometric and topological properties of a reference element...
Definition: affinegeometry.hh:31
int size(int i, int c, int cc) const
number of subentities of codimension cc of subentity (i,c)
Definition: referenceelement.hh:111
Collection of types depending on the codimension.
Definition: referenceelement.hh:66
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:153
A unique label for each type of element that can occur in a grid.
const Implementation & impl() const
Returns a reference to the internal implementation object.
Definition: referenceelement.hh:263
bool checkInside(const Coordinate &local) const
check if a coordinate is in the reference element
Definition: referenceelement.hh:203
typename Geo::ReferenceElementImplementation< ctype, mydimension > ::Coordinate Coordinate
The coordinate type.
Definition: referenceelement.hh:81
Unique label for each type of entities that can occur in DUNE grids.
Definition: type.hh:113
GeometryType type() const
obtain the type of this reference element
Definition: referenceelement.hh:175
implementation-defined Geometry
type of geometry embedding a subentity into the reference element
Definition: referenceelement.hh:69
CoordinateField volume() const
obtain the volume of the reference element
Definition: referenceelement.hh:228
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:281
Coordinate position(int i, int c) const
position of the barycenter of entity (i,c)
Definition: referenceelement.hh:190
bool operator==(const ReferenceElement &r) const
Compares for equality with another reference element.
Definition: referenceelement.hh:269
ReferenceElement()
Constructs an empty reference element.
Definition: referenceelement.hh:254
ctype Volume
Type used for volume.
Definition: referenceelement.hh:84
Coordinate integrationOuterNormal(int face) const
obtain the integration outer normal of the reference element
Definition: referenceelement.hh:241
Codim< codim >::Geometry geometry(int i) const
obtain the embedding of subentity (i,codim) into the reference element
Definition: referenceelement.hh:221
ctype CoordinateField
The coordinate field type.
Definition: referenceelement.hh:78
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:130
GeometryType type(int i, int c) const
obtain the type of subentity (i,c)
Definition: referenceelement.hh:167
Definition: affinegeometry.hh:21
typename Geo::ReferenceElementImplementation< ctype, mydimension > ::ctype ctype
The coordinate field type.
Definition: referenceelement.hh:75
static constexpr int dimension
The dimension of the reference element.
Definition: referenceelement.hh:87
bool operator!=(const ReferenceElement &r) const
Compares for inequality with another reference element.
Definition: referenceelement.hh:275
Static tag representing a codimension.
Definition: dimension.hh:22
int size(int c) const
number of subentities of codimension c
Definition: referenceelement.hh:94