4 #ifndef DISABLE_GEOMETRYTYPEINDEX_DEPRECATION_WARNING
5 #warning #include <dune/common/geometrytypeindex.hh> is deprecated. Use
6 #warning #include <dune/geometry/typeindex.hh> instead. You may need the new
7 #warning Dune-Geometry core module.
8 #warning NOTE: <dune/common/geometrytypeindex.hh> was never part of a release,
9 #warning so this compatibility mechanism should be removed before the 2.2
11 #endif // DISABLE_GEOMETRYTYPEINDEX_DEPRECATION_WARNING
13 #ifndef DUNE_COMMON_GEOMETRYTYPEINDEX_HH
14 #define DUNE_COMMON_GEOMETRYTYPEINDEX_HH
23 #define DISABLE_GEOMETRYTYPE_DEPRECATION_WARNING
25 #undef DISABLE_GEOMETRYTYPE_DEPRECATION_WARNING
36 inline static std::size_t regular_size(std::size_t dim) {
55 return (1 << dim) - ((1 << dim) >> 1);
63 inline static std::size_t
size(std::size_t dim) {
65 return regular_size(dim) + 1;
76 return regular_size(gt.
dim());
90 inline static std::size_t regular_base(std::size_t dim) {
96 return (1 << dim) >> 1;
101 inline static std::size_t base(std::size_t dim) {
103 return regular_base(dim) + dim;
112 inline static std::size_t
size(std::size_t maxdim)
113 {
return base(maxdim+1); }
129 #endif // DUNE_COMMON_GEOMETRYTYPEINDEX_HH