3 #ifndef DUNE_GEOMETRY_GENERICGEOMETRY_CONVERSION_HH
4 #define DUNE_GEOMETRY_GENERICGEOMETRY_CONVERSION_HH
6 #include <dune/common/static_assert.hh>
7 #include <dune/common/visibility.hh>
16 namespace GenericGeometry
30 template<
class Topology, GeometryType::BasicType linetype >
33 template< GeometryType::BasicType linetype >
38 "Parameter linetype may only be a simplex or a cube." );
41 static const unsigned int dimension = 0;
45 template<
class BaseTopology, GeometryType::BasicType linetype >
52 "Parameter linetype may only be a simplex or a cube." );
56 "Only prisms over simplices or cubes can be converted." );
59 static const unsigned int dimension = DuneBaseGeometryType::dimension + 1;
68 template<
class BaseTopology, GeometryType::BasicType linetype >
75 "Parameter linetype may only be a simplex or a cube." );
79 "Only pyramids over simplices or cubes can be converted." );
82 static const unsigned int dimension = DuneBaseGeometryType::dimension + 1;
107 template<
unsigned int dim, GeometryType::BasicType linetype >
135 return instance().types_[ topologyId / 2 ];
143 template< GeometryType :: BasicType type,
unsigned int dim >
146 template<
unsigned int dim >
160 template<
unsigned int dim >
173 template<
unsigned int dim >
181 template<
unsigned int dim >
193 #endif // #ifndef DUNE_GEOMETRY_GENERICGEOMETRY_CONVERSION_HH
Prism element in three dimensions.
Definition: type.hh:33
static const GeometryType & type(unsigned int topologyId)
obtain a Geometry type from a topology id
Definition: conversion.hh:132
static const unsigned int numTopologies
number of possible topologies
Definition: conversion.hh:114
Definition: topologytypes.hh:57
A unique label for each type of element that can occur in a grid.
dynamically convert a generic topology type into a GeometryType
Definition: conversion.hh:108
Definition: conversion.hh:144
Simplicial element in any nonnegative dimension.
Definition: type.hh:30
static const unsigned int dimension
dimension of the topologies to be converted
Definition: conversion.hh:111
statically convert a generic topology type into a GeometryType
Definition: conversion.hh:31
Prism< typename Convert< GeometryType::cube, dim-1 >::type > type
Definition: conversion.hh:164
Definition: topologytypes.hh:41
Pyramid< typename Convert< GeometryType::simplex, dim-1 >::type > type
Definition: conversion.hh:151
Point type
Definition: conversion.hh:157
Cube element in any nonnegative dimension.
Definition: type.hh:31
Definition: topologytypes.hh:74
Definition: topologytypes.hh:26
Unique label for each type of entities that can occur in DUNE grids.
Definition: type.hh:24
Pyramid< typename Convert< GeometryType::cube, dim-1 >::type > type
Definition: conversion.hh:186
Four sided pyramid in three dimensions.
Definition: type.hh:32
Point type
Definition: conversion.hh:170
Prism< typename Convert< GeometryType::simplex, dim-1 >::type > type
Definition: conversion.hh:178
BasicType
Each entity can be tagged by one of these basic types plus its space dimension.
Definition: type.hh:29