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);
162 decltype(
auto) type()
const 164 return _impl->type();
181 decltype(
auto) position(
int i,
int c)
const 183 return _impl->position(i,c);
196 return _impl->checkInside(local);
214 return _impl->template geometry<codim>(i);
221 return _impl->volume();
236 decltype(
auto) integrationOuterNormal(
int face)
const 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;
298 friend class Impl::ReferenceElementContainer<ctype,dimension>;
305 void setImplementation(
const Implementation& impl)
310 const Implementation* _impl;
319 #endif // DUNE_GEOMETRY_REFERENCEELEMENT_HH ReferenceElement()
Constructs an empty reference element.
Definition: referenceelement.hh:249
Codim< codim >::Geometry geometry(int i) const
obtain the embedding of subentity (i,codim) into the reference element
Definition: referenceelement.hh:212
implementation-defined Geometry
type of geometry embedding a subentity into the reference element
Definition: referenceelement.hh:73
int size(int c) const
number of subentities of codimension c
Definition: referenceelement.hh:95
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
int size(int i, int c, int cc) const
number of subentities of codimension cc of subentity (i,c)
Definition: referenceelement.hh:112
const Implementation & impl() const
Returns a reference to the internal implementation object.
Definition: referenceelement.hh:258
ctype CoordinateField
The coordinate field type.
Definition: referenceelement.hh:82
bool operator!=(const ReferenceElement &r) const
Compares for inequality with another reference element.
Definition: referenceelement.hh:281
bool operator==(const ReferenceElement &r) const
Compares for equality with another reference element.
Definition: referenceelement.hh:275
Definition: referenceelement.hh:27
typename Geo::ReferenceElementImplementation< ctype, mydimension > ::ctype ctype
The coordinate field type.
Definition: referenceelement.hh:79
A unique label for each type of element that can occur in a grid.
This class provides access to geometric and topological properties of a reference element...
Definition: affinegeometry.hh:28
unspecified-type ReferenceElement
Returns the type of reference element for the argument type T.
Definition: referenceelements.hh:495
typename Geo::ReferenceElementImplementation< ctype, mydimension > ::Coordinate Coordinate
The coordinate type.
Definition: referenceelement.hh:85
Class providing access to the singletons of the reference elements.
Definition: affinegeometry.hh:34
bool checkInside(const Coordinate &local) const
check if a coordinate is in the reference element
Definition: referenceelement.hh:194
Definition: affinegeometry.hh:18
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
CoordinateField volume() const
obtain the volume of the reference element
Definition: referenceelement.hh:219