1 #ifndef DUNE_GEOMETRY_GENERICGEOMETRY_TOPOLOGYTYPES_HH
2 #define DUNE_GEOMETRY_GENERICGEOMETRY_TOPOLOGYTYPES_HH
6 #include <dune/common/static_assert.hh>
7 #include <dune/common/typetraits.hh>
12 namespace GenericGeometry
20 static const unsigned int id = 0;
22 static std :: string
name ()
29 template<
class BaseTopology >
32 static const unsigned int dimension = BaseTopology :: dimension + 1;
35 static const unsigned int id = BaseTopology :: id + (1 << (
dimension-1));
37 static std :: string
name ()
45 template<
class BaseTopology >
48 static const unsigned int dimension = BaseTopology :: dimension + 1;
49 static const unsigned int numCorners = BaseTopology :: numCorners + 1;
53 static std :: string
name ()
62 template<
class Topology >
65 template<
class Base >
66 struct BaseTopology<
Prism< Base > >
71 template<
class Base >
79 template<
class Topology >
82 static const bool value = ((Topology::id >> 1) == 0);
85 template<
class Topology >
88 static const bool value = ((Topology::id | 1) == (1 << Topology::dimension) - 1);
91 template<
class Topology >
94 static const bool value
98 template<
class Topology >
104 template<
class BaseTopology >
107 static const bool value
116 template<
unsigned int dim >
133 template<
unsigned int dim >
150 template<
unsigned int dim >
161 template<
unsigned int dim >
172 template<
unsigned int id,
unsigned int dim >
175 static const unsigned int dimension = dim;
177 dune_static_assert( (
id < (1 << dimension)),
"id too large." );
179 static const bool isPrism = ((
id >> (dimension-1)) != 0);
181 typedef typename Topology< (
id & ~(1 << (dimension-1))), dimension-1 >::
type
197 typedef typename SelectType< isPrism, Prism<true>, Pyramid<false> >::Type::type
type;
200 template<
unsigned int id >
203 static const unsigned int dimension = 0;
205 dune_static_assert( (
id < (1 << dimension)),
"id too large." );
216 template<
template<
class >
class Operation,
int dim,
class Topology =
Point >
240 template<
class T1,
class T2 >
249 template<
class T1,
class T2,
class T3 >
258 template<
class T1,
class T2,
class T3,
class T4 >
268 template<
template<
class >
class Operation,
class Topology >
283 template<
class T1,
class T2 >
289 template<
class T1,
class T2,
class T3 >
295 template<
class T1,
class T2,
class T3,
class T4 >
306 #endif // DUNE_GEOMETRY_GENERICGEOMETRY_TOPOLOGYTYPES_HH