3 #ifndef DUNE_PDELAB_COMMON_TOPOLOGYUTILITY_HH
4 #define DUNE_PDELAB_COMMON_TOPOLOGYUTILITY_HH
6 #include <dune/geometry/type.hh>
24 template<
int dimension,
unsigned int topologyId>
28 ((topologyId ^ ((1 << dimension)-1)) >> 1 == 0);
31 (topologyId | 1) == 1;
34 static const GeometryType::BasicType
value =
37 isCube ? GeometryType::cube
50 unsigned int topologyId(0);
55 case GeometryType::simplex :
58 case GeometryType::cube :
59 topologyId = ((1 <<
dim) - 1);
61 case GeometryType::pyramid :
65 DUNE_THROW( RangeError,
66 "Invalid basic geometry type: no pyramids for dimension " <<
dim <<
"." );
68 case GeometryType::prism :
72 DUNE_THROW( RangeError,
73 "Invalid basic geometry type: no prisms for dimension " <<
dim <<
"." );
75 case GeometryType::none :
78 DUNE_THROW( RangeError,
79 "Invalid basic geometry type: " << basicType <<
" for dimension " <<
dim <<
"." );
83 return Dune::GeometryType(topologyId,
dim);
static const int dim
Definition: adaptivity.hh:84
For backward compatibility – Do not use this!
Definition: adaptivity.hh:28
Dune::GeometryType geometryTypeFromBasicType(Dune::GeometryType::BasicType basicType, int dim)
Definition: topologyutility.hh:48
Utility TMP for determining the BasicType of a geometry from its dimension and topology id.
Definition: topologyutility.hh:26
static const bool isSimplex
Definition: topologyutility.hh:30
static const GeometryType::BasicType value
The BasicType of Topology.
Definition: topologyutility.hh:34
static const bool isCube
Definition: topologyutility.hh:27