3#ifndef DUNE_PDELAB_COMMON_TOPOLOGYUTILITY_HH
4#define DUNE_PDELAB_COMMON_TOPOLOGYUTILITY_HH
24 template<
int dimension,
unsigned int topologyId>
27 static const bool isCube =
28 ((topologyId ^ ((1 << dimension)-1)) >> 1 == 0);
30 static const bool isSimplex =
31 (topologyId | 1) == 1;
50 unsigned int topologyId(0);
59 topologyId = ((1 << dim) - 1);
66 "Invalid basic geometry type: no pyramids for dimension " << dim <<
"." );
73 "Invalid basic geometry type: no prisms for dimension " << dim <<
"." );
79 "Invalid basic geometry type: " << basicType <<
" for dimension " << dim <<
"." );
Unique label for each type of entities that can occur in DUNE grids.
Definition: type.hh:123
BasicType
Each entity can be tagged by one of these basic types plus its space dimension.
Definition: type.hh:129
@ cube
Cube element in any nonnegative dimension.
Definition: type.hh:131
@ simplex
Simplicial element in any nonnegative dimension.
Definition: type.hh:130
@ pyramid
Four sided pyramid in three dimensions.
Definition: type.hh:132
@ none
Even more general topology, cannot be specified by a topologyId. Two GeometryTypes with 'none' type a...
Definition: type.hh:135
@ prism
Prism element in three dimensions.
Definition: type.hh:133
Default exception class for range errors.
Definition: exceptions.hh:252
#define DUNE_THROW(E, m)
Definition: exceptions.hh:216
Dune namespace.
Definition: alignedallocator.hh:11
Utility TMP for determining the BasicType of a geometry from its dimension and topology id.
Definition: topologyutility.hh:26
static const GeometryType::BasicType value
The BasicType of Topology.
Definition: topologyutility.hh:34
A unique label for each type of element that can occur in a grid.