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>
20 namespace GenericGeometry
26 template<
class Topology,
class ctype >
37 template<
unsigned int codim >
43 template<
unsigned int codim,
unsigned int subcodim >
44 static unsigned int subNumbering (
unsigned int i,
unsigned int j )
49 template<
unsigned int codim,
unsigned int subcodim >
50 static unsigned int size (
unsigned int i )
55 template<
unsigned int codim >
56 static const FieldVector< ctype, dimension > &
59 integral_constant< int, codim > codimVariable;
60 return instance().baryCenters_[ codimVariable ][ i ];
94 class BaryCenterArray;
100 for(
unsigned int i = 0; i <
numNormals; ++i )
104 Dune::array< CoordinateType, numCorners > corners_;
105 CodimTable< BaryCenterArray, dimension > baryCenters_;
106 Dune::array< CoordinateType, numNormals > normals_;
111 template<
class Topology,
class ctype >
112 template<
int codim >
122 CoordinateType baryCenters_[
Size ];
127 ForLoop< Builder, 0, Size-1 > :: apply( baryCenters_ );
130 const CoordinateType &operator[] (
unsigned int i )
const
133 return baryCenters_[ i ];
142 template<
class Topology,
class ctype >
143 template<
int codim >
155 for(
unsigned int k = 0; k <
numCorners; ++k )
157 unsigned int j = Numbering :: number( i, k );
163 x *= ctype( 1 ) / ctype( numCorners );
171 #endif // DUNE_GEOMETRY_GENERICGEOMETRY_REFERENCEELEMENTS_HH