5#ifndef DUNE_DEPRECATED_TOPOLOGY_HH
6#define DUNE_DEPRECATED_TOPOLOGY_HH
15 struct PointDeprecationHelper
17 static const unsigned int dimension = 0;
18 static const unsigned int numCorners = 1;
20 static const unsigned int id = 0;
22 static std::string name () {
return "p"; }
25 using Point [[deprecated(
"Use GeometryTypes::vertex instead.")]] = PointDeprecationHelper;
28 template<
class BaseTopology >
29 struct [[deprecated("Use GeometryTypes::
prismaticExtension(GeometryType gt) instead.")]] Prism
31 static const unsigned int dimension = BaseTopology::dimension + 1;
32 static const unsigned int numCorners = 2 * BaseTopology::numCorners;
34 static const unsigned int id = BaseTopology::id | ((
unsigned int)prismConstruction << (dimension-1));
36 static std::string name () {
return BaseTopology::name() +
"l"; }
40 template<
class BaseTopology >
41 struct [[deprecated("Use GeometryTypes::
conicalExtension(GeometryType gt) instead.")]] Pyramid
43 static const unsigned int dimension = BaseTopology::dimension + 1;
44 static const unsigned int numCorners = BaseTopology::numCorners + 1;
46 static const unsigned int id = BaseTopology::id | ((
unsigned int)pyramidConstruction << (dimension-1));
48 static std::string name () {
return BaseTopology::name() +
"o"; }
56 template<
class Topology >
57 struct [[deprecated("Use
GeometryType::isSimplex() instead.")]] IsSimplex
58 :
public std::integral_constant< bool, (Topology::id >> 1) == 0 >
61 template<
class Topology >
62 struct [[deprecated("Use
GeometryType::isCube() instead.")]] IsCube
63 :
public std::integral_constant< bool, (Topology::id | 1) == (1 << Topology::dimension) - 1 >
78 [[deprecated("Use GeometryType::isPrismatic() or GeometryType::isConical() instead.")]]
79 inline static bool isTopology ( TopologyConstruction construction, unsigned int topologyId, int dim, int codim = 0 ) noexcept
81 assert( (dim > 0) && (topologyId < numTopologies( dim )) );
82 assert( (0 <= codim) && (codim <= dim) );
83 return (codim >= (dim-1)) || (((topologyId >> (dim-codim-1)) & 1) == (unsigned int)construction);
90 template< unsigned int dim >
91 struct [[deprecated("Use GeometryTypes::simplex(dim) instead.")]] SimplexTopology
93 typedef Pyramid< typename SimplexTopology< dim-1 >::type > type;
97 struct [[deprecated("Use GeometryTypes::simplex(dim) instead.")]] SimplexTopology< 0 >
107 template< unsigned int dim >
108 struct [[deprecated("Use GeometryTypes::cube(dim) instead.")]] CubeTopology
110 typedef Prism< typename CubeTopology< dim-1 >::type > type;
114 struct [[deprecated("Use GeometryTypes::simplex(dim) instead.")]] CubeTopology< 0 >
124 template< unsigned int dim >
125 struct [[deprecated]] PyramidTopology
127 typedef Pyramid< typename CubeTopology< dim-1 >::type > type;
135 template< unsigned int dim >
136 struct [[deprecated]] PrismTopology
138 typedef Prism< typename SimplexTopology< dim-1 >::type > type;
147 template< template< class > class Operation, int dim, class Topology = PointDeprecationHelper >
148 struct [[deprecated("Use IfGeometryType instead.")]] IfTopology
150 template< class... Args >
151 static auto apply ( unsigned int topologyId, Args &&... args )
154 return IfTopology< Operation, dim-1, Prism< Topology > >::apply( topologyId >> 1, std::forward< Args >( args )... );
156 return IfTopology< Operation, dim-1, Pyramid< Topology > >::apply( topologyId >> 1, std::forward< Args >( args )... );
160 template< template< class > class Operation, class Topology >
161 struct [[deprecated("Use IfGeometryType instead.")]] IfTopology< Operation, 0, Topology >
163 template<
class... Args >
164 static auto apply ([[maybe_unused]]
unsigned int topologyId, Args &&... args)
166 return Operation< Topology >::apply( std::forward< Args >( args )... );
GeometryType
Type representing VTK's entity geometry types.
Definition: common.hh:132
constexpr GeometryType prismaticExtension(const GeometryType >)
Return GeometryType of a prismatic construction with gt as base
Definition: type.hh:494
constexpr GeometryType conicalExtension(const GeometryType >)
Return GeometryType of a conical construction with gt as base
Definition: type.hh:488