4 #ifndef DUNE_GEOMETRY_GENERICGEOMETRY_REFERENCEELEMENTS_HH
5 #define DUNE_GEOMETRY_GENERICGEOMETRY_REFERENCEELEMENTS_HH
11 #include <dune/common/array.hh>
12 #include <dune/common/fvector.hh>
13 #include <dune/common/typetraits.hh>
14 #include <dune/common/visibility.hh>
21 namespace GenericGeometry
27 template<
class Topology,
class ctype >
31 static const unsigned int dimension = Topology :: dimension;
33 static const unsigned int numCorners = Topology :: numCorners;
38 template<
unsigned int codim >
44 template<
unsigned int codim,
unsigned int subcodim >
45 static unsigned int subNumbering (
unsigned int i,
unsigned int j )
50 template<
unsigned int codim,
unsigned int subcodim >
51 static unsigned int size (
unsigned int i )
58 static const FieldVector< ctype, dimension > &
64 static const CoordinateType &
corner (
unsigned int i )
66 assert( i < numCorners );
75 static const CoordinateType &
78 assert( i < numNormals );
94 class BaryCenterArray;
100 for(
unsigned int i = 0; i <
numNormals; ++i )
109 for(
unsigned int k = 0; k <
numCorners; ++k )
111 unsigned int j = Numbering :: number( 0, k );
117 baryCenter_ *= ctype( 1 ) / ctype( numCorners );
120 Dune::array< CoordinateType, numCorners > corners_;
121 CoordinateType baryCenter_;
122 Dune::array< CoordinateType, numNormals > normals_;
129 #endif // DUNE_GEOMETRY_GENERICGEOMETRY_REFERENCEELEMENTS_HH
Definition: quadraturerules.hh:88
static unsigned int size(unsigned int i)
Definition: genericgeometry/referenceelements.hh:51
static bool checkInside(const FieldVector< ctype, dimension > &x)
Definition: referencedomain.hh:257
Definition: referencedomain.hh:27
static bool checkInside(const CoordinateType &x)
Definition: genericgeometry/referenceelements.hh:70
Definition: affinegeometry.hh:18
static unsigned int number(unsigned int i, unsigned int j)
Definition: subtopologies.hh:533
static const CoordinateType & integrationOuterNormal(unsigned int i)
Definition: genericgeometry/referenceelements.hh:76
static ctype volume()
Definition: genericgeometry/referenceelements.hh:82
static DUNE_EXPORT const ReferenceElement & instance()
Definition: genericgeometry/referenceelements.hh:87
Definition: subtopologies.hh:35
static const unsigned int dimension
Definition: genericgeometry/referenceelements.hh:31
Definition: genericgeometry/referenceelements.hh:39
Definition: genericgeometry/referenceelements.hh:41
static const FieldVector< ctype, dimension > & baryCenter()
Return the element barycenter.
Definition: genericgeometry/referenceelements.hh:59
Statically compute the number of subentities of a given codimension.
Definition: subtopologies.hh:23
static unsigned int subNumbering(unsigned int i, unsigned int j)
Definition: genericgeometry/referenceelements.hh:45
static const unsigned int topologyId
Definition: genericgeometry/referenceelements.hh:30
static const unsigned int numNormals
Definition: genericgeometry/referenceelements.hh:34
Definition: genericgeometry/referenceelements.hh:28
static const CoordinateType & corner(unsigned int i)
Definition: genericgeometry/referenceelements.hh:64
static const unsigned int numCorners
Definition: genericgeometry/referenceelements.hh:33
FieldVector< ctype, dimension > CoordinateType
Definition: genericgeometry/referenceelements.hh:36
Definition: subtopologies.hh:29
static unsigned int size(unsigned int i)
Definition: subtopologies.hh:303
static void corner(unsigned int i, FieldVector< ctype, dimension > &x)
Definition: referencedomain.hh:250