3#ifndef DUNE_DEPRECATED_TOPOLOGY_HH
4#define DUNE_DEPRECATED_TOPOLOGY_HH
13 struct PointDeprecationHelper
15 static const unsigned int dimension = 0;
16 static const unsigned int numCorners = 1;
18 static const unsigned int id = 0;
20 static std::string name () {
return "p"; }
23 using Point [[deprecated(
"Use GeometryTypes::vertex instead.")]] = PointDeprecationHelper;
26 template<
class BaseTopology >
27 struct [[deprecated("Use GeometryTypes::
prismaticExtension(GeometryType gt) instead.")]] Prism
29 static const unsigned int dimension = BaseTopology::dimension + 1;
30 static const unsigned int numCorners = 2 * BaseTopology::numCorners;
32 static const unsigned int id = BaseTopology::id | ((
unsigned int)prismConstruction << (dimension-1));
34 static std::string name () {
return BaseTopology::name() +
"l"; }
38 template<
class BaseTopology >
39 struct [[deprecated("Use GeometryTypes::
conicalExtension(GeometryType gt) instead.")]] Pyramid
41 static const unsigned int dimension = BaseTopology::dimension + 1;
42 static const unsigned int numCorners = BaseTopology::numCorners + 1;
44 static const unsigned int id = BaseTopology::id | ((
unsigned int)pyramidConstruction << (dimension-1));
46 static std::string name () {
return BaseTopology::name() +
"o"; }
54 template<
class Topology >
55 struct [[deprecated("Use
GeometryType::isSimplex() instead.")]] IsSimplex
56 :
public std::integral_constant< bool, (Topology::id >> 1) == 0 >
59 template<
class Topology >
60 struct [[deprecated("Use
GeometryType::isCube() instead.")]] IsCube
61 :
public std::integral_constant< bool, (Topology::id | 1) == (1 << Topology::dimension) - 1 >
76 [[deprecated("Use GeometryType::isPrismatic() or GeometryType::isConical() instead.")]]
77 inline static bool isTopology ( TopologyConstruction construction, unsigned int topologyId, int dim, int codim = 0 ) noexcept
79 assert( (dim > 0) && (topologyId < numTopologies( dim )) );
80 assert( (0 <= codim) && (codim <= dim) );
81 return (codim >= (dim-1)) || (((topologyId >> (dim-codim-1)) & 1) == (unsigned int)construction);
88 template< unsigned int dim >
89 struct [[deprecated("Use GeometryTypes::simplex(dim) instead.")]] SimplexTopology
91 typedef Pyramid< typename SimplexTopology< dim-1 >::type > type;
95 struct [[deprecated("Use GeometryTypes::simplex(dim) instead.")]] SimplexTopology< 0 >
105 template< unsigned int dim >
106 struct [[deprecated("Use GeometryTypes::cube(dim) instead.")]] CubeTopology
108 typedef Prism< typename CubeTopology< dim-1 >::type > type;
112 struct [[deprecated("Use GeometryTypes::simplex(dim) instead.")]] CubeTopology< 0 >
122 template< unsigned int dim >
123 struct [[deprecated]] PyramidTopology
125 typedef Pyramid< typename CubeTopology< dim-1 >::type > type;
133 template< unsigned int dim >
134 struct [[deprecated]] PrismTopology
136 typedef Prism< typename SimplexTopology< dim-1 >::type > type;
145 template< template< class > class Operation, int dim, class Topology = PointDeprecationHelper >
146 struct [[deprecated("Use IfGeometryType instead.")]] IfTopology
148 template< class... Args >
149 static auto apply ( unsigned int topologyId, Args &&... args )
152 return IfTopology< Operation, dim-1, Prism< Topology > >::apply( topologyId >> 1, std::forward< Args >( args )... );
154 return IfTopology< Operation, dim-1, Pyramid< Topology > >::apply( topologyId >> 1, std::forward< Args >( args )... );
158 template< template< class > class Operation, class Topology >
159 struct [[deprecated("Use IfGeometryType instead.")]] IfTopology< Operation, 0, Topology >
161 template<
class... Args >
162 static auto apply ([[maybe_unused]]
unsigned int topologyId, Args &&... args)
164 return Operation< Topology >::apply( std::forward< Args >( args )... );
GeometryType
Type representing VTK's entity geometry types.
Definition: common.hh:130
constexpr GeometryType prismaticExtension(const GeometryType >)
Return GeometryType of a prismatic construction with gt as base
Definition: type.hh:491
constexpr GeometryType conicalExtension(const GeometryType >)
Return GeometryType of a conical construction with gt as base
Definition: type.hh:485