1 #ifndef DUNE_FEM_MISC_MAPGEOMTYPE_HH 2 #define DUNE_FEM_MISC_MAPGEOMTYPE_HH 8 #include <dune/geometry/type.hh> 9 #include <dune/geometry/typeindex.hh> 21 template<
int dim,
class T >
30 const size_t size = Dune::LocalGeometryTypeIndex::size( dimension - 1 );
31 data_.resize( size, 0 );
37 const size_t index = Dune::LocalGeometryTypeIndex::index( type );
38 return data_[ index ];
44 return const_cast< int &
>(
static_cast< const MapGeometryType &
>( *this ).operator[]( type ) );
48 std::vector< T > data_;
55 #endif // #ifndef DUNE_FEM_MISC_MAPGEOMTYPE_HH
Definition: mapgeomtype.hh:22
static const int dimension
dimension
Definition: mapgeomtype.hh:25
Definition: coordinate.hh:4
const int & operator[](const GeometryType &type) const
return const reference to data
Definition: mapgeomtype.hh:35
MapGeometryType(const T &value=T())
constructor
Definition: mapgeomtype.hh:28