DUNE PDELab (2.7)

topologyutility.hh
1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
2// vi: set et ts=4 sw=2 sts=2:
3#ifndef DUNE_PDELAB_COMMON_TOPOLOGYUTILITY_HH
4#define DUNE_PDELAB_COMMON_TOPOLOGYUTILITY_HH
5
7
8namespace Dune {
9
10 namespace PDELab {
11
12
14
24 template<int dimension, unsigned int topologyId>
26 {
27 static const bool isCube =
28 ((topologyId ^ ((1 << dimension)-1)) >> 1 == 0);
29
30 static const bool isSimplex =
31 (topologyId | 1) == 1;
32
35 isSimplex ? GeometryType::simplex
36 : (
37 isCube ? GeometryType::cube
39 );
40 };
41
42
43 } // namespace PDELab
44} // namespace Dune
45
46
47#endif // DUNE_PDELAB_COMMON_TOPOLOGYUTILITY_HH
BasicType
Each entity can be tagged by one of these basic types plus its space dimension.
Definition: type.hh:286
@ cube
Cube element in any nonnegative dimension.
Definition: type.hh:288
@ simplex
Simplicial element in any nonnegative dimension.
Definition: type.hh:287
@ none
Even more general topology, cannot be specified by a topologyId. Two GeometryTypes with 'none' type a...
Definition: type.hh:292
Dune namespace.
Definition: alignedallocator.hh:14
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.
Creative Commons License   |  Legal Statements / Impressum  |  Hosted by TU Dresden  |  generated with Hugo v0.111.3 (Jul 15, 22:36, 2024)