dune-pdelab
2.5-dev
dune
pdelab
common
topologyutility.hh
Go to the documentation of this file.
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
6
#include <dune/geometry/type.hh>
7
8
namespace
Dune
{
9
10
namespace
PDELab {
11
12
14
24
template
<
int
dimension,
unsigned
int
topologyId>
25
struct
BasicTypeFromDimensionAndTopologyId
26
{
27
static
const
bool
isCube
=
28
((topologyId ^ ((1 << dimension)-1)) >> 1 == 0);
29
30
static
const
bool
isSimplex
=
31
(topologyId | 1) == 1;
32
34
static
const
GeometryType::BasicType
value
=
35
isSimplex
? GeometryType::simplex
36
: (
37
isCube
? GeometryType::cube
38
: GeometryType::none
39
);
40
};
41
42
43
}
// namespace PDELab
44
}
// namespace Dune
45
46
47
#endif // DUNE_PDELAB_COMMON_TOPOLOGYUTILITY_HH
Dune
For backward compatibility – Do not use this!
Definition:
adaptivity.hh:28
Dune::PDELab::BasicTypeFromDimensionAndTopologyId::isSimplex
static const bool isSimplex
Definition:
topologyutility.hh:30
Dune::PDELab::BasicTypeFromDimensionAndTopologyId::isCube
static const bool isCube
Definition:
topologyutility.hh:27
Dune::PDELab::BasicTypeFromDimensionAndTopologyId
Utility TMP for determining the BasicType of a geometry from its dimension and topology id.
Definition:
topologyutility.hh:25
Dune::PDELab::BasicTypeFromDimensionAndTopologyId::value
static const GeometryType::BasicType value
The BasicType of Topology.
Definition:
topologyutility.hh:34
Generated by
1.8.17