Commit 753adc27 authored by Jakub Klinkovský's avatar Jakub Klinkovský
Browse files

Mesh refactoring: replaced enum with static constexpr

parent 3af80eab
......@@ -108,72 +108,72 @@ struct Subtopology< Hexahedron, 2 >
*
*/
template<> struct SubentityVertexMap< Hexahedron, Edge, 0, 0> { enum { index = 0 }; };
template<> struct SubentityVertexMap< Hexahedron, Edge, 0, 1> { enum { index = 1 }; };
template<> struct SubentityVertexMap< Hexahedron, Edge, 0, 0> { static constexpr int index = 0; };
template<> struct SubentityVertexMap< Hexahedron, Edge, 0, 1> { static constexpr int index = 1; };
template<> struct SubentityVertexMap< Hexahedron, Edge, 1, 0> { enum { index = 1 }; };
template<> struct SubentityVertexMap< Hexahedron, Edge, 1, 1> { enum { index = 2 }; };
template<> struct SubentityVertexMap< Hexahedron, Edge, 1, 0> { static constexpr int index = 1; };
template<> struct SubentityVertexMap< Hexahedron, Edge, 1, 1> { static constexpr int index = 2; };
template<> struct SubentityVertexMap< Hexahedron, Edge, 2, 0> { enum { index = 2 }; };
template<> struct SubentityVertexMap< Hexahedron, Edge, 2, 1> { enum { index = 3 }; };
template<> struct SubentityVertexMap< Hexahedron, Edge, 2, 0> { static constexpr int index = 2; };
template<> struct SubentityVertexMap< Hexahedron, Edge, 2, 1> { static constexpr int index = 3; };
template<> struct SubentityVertexMap< Hexahedron, Edge, 3, 0> { enum { index = 3 }; };
template<> struct SubentityVertexMap< Hexahedron, Edge, 3, 1> { enum { index = 0 }; };
template<> struct SubentityVertexMap< Hexahedron, Edge, 3, 0> { static constexpr int index = 3; };
template<> struct SubentityVertexMap< Hexahedron, Edge, 3, 1> { static constexpr int index = 0; };
template<> struct SubentityVertexMap< Hexahedron, Edge, 4, 0> { enum { index = 0 }; };
template<> struct SubentityVertexMap< Hexahedron, Edge, 4, 1> { enum { index = 4 }; };
template<> struct SubentityVertexMap< Hexahedron, Edge, 4, 0> { static constexpr int index = 0; };
template<> struct SubentityVertexMap< Hexahedron, Edge, 4, 1> { static constexpr int index = 4; };
template<> struct SubentityVertexMap< Hexahedron, Edge, 5, 0> { enum { index = 1 }; };
template<> struct SubentityVertexMap< Hexahedron, Edge, 5, 1> { enum { index = 5 }; };
template<> struct SubentityVertexMap< Hexahedron, Edge, 5, 0> { static constexpr int index = 1; };
template<> struct SubentityVertexMap< Hexahedron, Edge, 5, 1> { static constexpr int index = 5; };
template<> struct SubentityVertexMap< Hexahedron, Edge, 6, 0> { enum { index = 2 }; };
template<> struct SubentityVertexMap< Hexahedron, Edge, 6, 1> { enum { index = 6 }; };
template<> struct SubentityVertexMap< Hexahedron, Edge, 6, 0> { static constexpr int index = 2; };
template<> struct SubentityVertexMap< Hexahedron, Edge, 6, 1> { static constexpr int index = 6; };
template<> struct SubentityVertexMap< Hexahedron, Edge, 7, 0> { enum { index = 3 }; };
template<> struct SubentityVertexMap< Hexahedron, Edge, 7, 1> { enum { index = 7 }; };
template<> struct SubentityVertexMap< Hexahedron, Edge, 7, 0> { static constexpr int index = 3; };
template<> struct SubentityVertexMap< Hexahedron, Edge, 7, 1> { static constexpr int index = 7; };
template<> struct SubentityVertexMap< Hexahedron, Edge, 8, 0> { enum { index = 4 }; };
template<> struct SubentityVertexMap< Hexahedron, Edge, 8, 1> { enum { index = 5 }; };
template<> struct SubentityVertexMap< Hexahedron, Edge, 8, 0> { static constexpr int index = 4; };
template<> struct SubentityVertexMap< Hexahedron, Edge, 8, 1> { static constexpr int index = 5; };
template<> struct SubentityVertexMap< Hexahedron, Edge, 9, 0> { enum { index = 5 }; };
template<> struct SubentityVertexMap< Hexahedron, Edge, 9, 1> { enum { index = 6 }; };
template<> struct SubentityVertexMap< Hexahedron, Edge, 9, 0> { static constexpr int index = 5; };
template<> struct SubentityVertexMap< Hexahedron, Edge, 9, 1> { static constexpr int index = 6; };
template<> struct SubentityVertexMap< Hexahedron, Edge, 10, 0> { enum { index = 6 }; };
template<> struct SubentityVertexMap< Hexahedron, Edge, 10, 1> { enum { index = 7 }; };
template<> struct SubentityVertexMap< Hexahedron, Edge, 10, 0> { static constexpr int index = 6; };
template<> struct SubentityVertexMap< Hexahedron, Edge, 10, 1> { static constexpr int index = 7; };
template<> struct SubentityVertexMap< Hexahedron, Edge, 11, 0> { enum { index = 7 }; };
template<> struct SubentityVertexMap< Hexahedron, Edge, 11, 1> { enum { index = 4 }; };
template<> struct SubentityVertexMap< Hexahedron, Edge, 11, 0> { static constexpr int index = 7; };
template<> struct SubentityVertexMap< Hexahedron, Edge, 11, 1> { static constexpr int index = 4; };
template<> struct SubentityVertexMap< Hexahedron, Quadrangle, 0, 0> { enum { index = 0 }; };
template<> struct SubentityVertexMap< Hexahedron, Quadrangle, 0, 1> { enum { index = 1 }; };
template<> struct SubentityVertexMap< Hexahedron, Quadrangle, 0, 2> { enum { index = 2 }; };
template<> struct SubentityVertexMap< Hexahedron, Quadrangle, 0, 3> { enum { index = 3 }; };
template<> struct SubentityVertexMap< Hexahedron, Quadrangle, 0, 0> { static constexpr int index = 0; };
template<> struct SubentityVertexMap< Hexahedron, Quadrangle, 0, 1> { static constexpr int index = 1; };
template<> struct SubentityVertexMap< Hexahedron, Quadrangle, 0, 2> { static constexpr int index = 2; };
template<> struct SubentityVertexMap< Hexahedron, Quadrangle, 0, 3> { static constexpr int index = 3; };
template<> struct SubentityVertexMap< Hexahedron, Quadrangle, 1, 0> { enum { index = 0 }; };
template<> struct SubentityVertexMap< Hexahedron, Quadrangle, 1, 1> { enum { index = 1 }; };
template<> struct SubentityVertexMap< Hexahedron, Quadrangle, 1, 2> { enum { index = 5 }; };
template<> struct SubentityVertexMap< Hexahedron, Quadrangle, 1, 3> { enum { index = 4 }; };
template<> struct SubentityVertexMap< Hexahedron, Quadrangle, 1, 0> { static constexpr int index = 0; };
template<> struct SubentityVertexMap< Hexahedron, Quadrangle, 1, 1> { static constexpr int index = 1; };
template<> struct SubentityVertexMap< Hexahedron, Quadrangle, 1, 2> { static constexpr int index = 5; };
template<> struct SubentityVertexMap< Hexahedron, Quadrangle, 1, 3> { static constexpr int index = 4; };
template<> struct SubentityVertexMap< Hexahedron, Quadrangle, 2, 0> { enum { index = 1 }; };
template<> struct SubentityVertexMap< Hexahedron, Quadrangle, 2, 1> { enum { index = 2 }; };
template<> struct SubentityVertexMap< Hexahedron, Quadrangle, 2, 2> { enum { index = 6 }; };
template<> struct SubentityVertexMap< Hexahedron, Quadrangle, 2, 3> { enum { index = 5 }; };
template<> struct SubentityVertexMap< Hexahedron, Quadrangle, 2, 0> { static constexpr int index = 1; };
template<> struct SubentityVertexMap< Hexahedron, Quadrangle, 2, 1> { static constexpr int index = 2; };
template<> struct SubentityVertexMap< Hexahedron, Quadrangle, 2, 2> { static constexpr int index = 6; };
template<> struct SubentityVertexMap< Hexahedron, Quadrangle, 2, 3> { static constexpr int index = 5; };
template<> struct SubentityVertexMap< Hexahedron, Quadrangle, 3, 0> { enum { index = 2 }; };
template<> struct SubentityVertexMap< Hexahedron, Quadrangle, 3, 1> { enum { index = 3 }; };
template<> struct SubentityVertexMap< Hexahedron, Quadrangle, 3, 2> { enum { index = 7 }; };
template<> struct SubentityVertexMap< Hexahedron, Quadrangle, 3, 3> { enum { index = 6 }; };
template<> struct SubentityVertexMap< Hexahedron, Quadrangle, 3, 0> { static constexpr int index = 2; };
template<> struct SubentityVertexMap< Hexahedron, Quadrangle, 3, 1> { static constexpr int index = 3; };
template<> struct SubentityVertexMap< Hexahedron, Quadrangle, 3, 2> { static constexpr int index = 7; };
template<> struct SubentityVertexMap< Hexahedron, Quadrangle, 3, 3> { static constexpr int index = 6; };
template<> struct SubentityVertexMap< Hexahedron, Quadrangle, 4, 0> { enum { index = 3 }; };
template<> struct SubentityVertexMap< Hexahedron, Quadrangle, 4, 1> { enum { index = 0 }; };
template<> struct SubentityVertexMap< Hexahedron, Quadrangle, 4, 2> { enum { index = 4 }; };
template<> struct SubentityVertexMap< Hexahedron, Quadrangle, 4, 3> { enum { index = 7 }; };
template<> struct SubentityVertexMap< Hexahedron, Quadrangle, 4, 0> { static constexpr int index = 3; };
template<> struct SubentityVertexMap< Hexahedron, Quadrangle, 4, 1> { static constexpr int index = 0; };
template<> struct SubentityVertexMap< Hexahedron, Quadrangle, 4, 2> { static constexpr int index = 4; };
template<> struct SubentityVertexMap< Hexahedron, Quadrangle, 4, 3> { static constexpr int index = 7; };
template<> struct SubentityVertexMap< Hexahedron, Quadrangle, 5, 0> { enum { index = 4 }; };
template<> struct SubentityVertexMap< Hexahedron, Quadrangle, 5, 1> { enum { index = 5 }; };
template<> struct SubentityVertexMap< Hexahedron, Quadrangle, 5, 2> { enum { index = 6 }; };
template<> struct SubentityVertexMap< Hexahedron, Quadrangle, 5, 3> { enum { index = 7 }; };
template<> struct SubentityVertexMap< Hexahedron, Quadrangle, 5, 0> { static constexpr int index = 4; };
template<> struct SubentityVertexMap< Hexahedron, Quadrangle, 5, 1> { static constexpr int index = 5; };
template<> struct SubentityVertexMap< Hexahedron, Quadrangle, 5, 2> { static constexpr int index = 6; };
template<> struct SubentityVertexMap< Hexahedron, Quadrangle, 5, 3> { static constexpr int index = 7; };
} // namespace Topologies
} // namespace Meshes
......
......@@ -14,8 +14,8 @@ namespace Topologies {
template< typename Topology, int D = Topology::dimension >
struct IsDynamicTopology
{
enum : bool { value = !HasCountMember< Subtopology< Topology, D - 1 > >::value ||
IsDynamicTopology< Topology, D - 1 >::value };
static constexpr bool value = ! HasCountMember< Subtopology< Topology, D - 1 > >::value ||
IsDynamicTopology< Topology, D - 1 >::value;
};
/**
......@@ -31,9 +31,9 @@ struct IsDynamicTopology< Vertex, 0 > : std::false_type
template< typename Topology >
struct IsDynamicTopology< Topology, 1 >
{
enum : bool { value = !HasCountMember< Subtopology< Topology, 0 > >::value };
static constexpr bool value = ! HasCountMember< Subtopology< Topology, 0 > >::value;
};
} // namespace Topologies
} // namespace Meshes
} // namespace TNL
\ No newline at end of file
} // namespace TNL
......@@ -38,29 +38,29 @@ struct Subtopology< Pyramid, 2 >
};
template<> struct SubentityVertexMap< Pyramid, Edge, 0, 0> { enum { index = 0 }; };
template<> struct SubentityVertexMap< Pyramid, Edge, 0, 1> { enum { index = 1 }; };
template<> struct SubentityVertexMap< Pyramid, Edge, 0, 0> { static constexpr int index = 0; };
template<> struct SubentityVertexMap< Pyramid, Edge, 0, 1> { static constexpr int index = 1; };
template<> struct SubentityVertexMap< Pyramid, Edge, 1, 0> { enum { index = 1 }; };
template<> struct SubentityVertexMap< Pyramid, Edge, 1, 1> { enum { index = 2 }; };
template<> struct SubentityVertexMap< Pyramid, Edge, 1, 0> { static constexpr int index = 1; };
template<> struct SubentityVertexMap< Pyramid, Edge, 1, 1> { static constexpr int index = 2; };
template<> struct SubentityVertexMap< Pyramid, Edge, 2, 0> { enum { index = 2 }; };
template<> struct SubentityVertexMap< Pyramid, Edge, 2, 1> { enum { index = 3 }; };
template<> struct SubentityVertexMap< Pyramid, Edge, 2, 0> { static constexpr int index = 2; };
template<> struct SubentityVertexMap< Pyramid, Edge, 2, 1> { static constexpr int index = 3; };
template<> struct SubentityVertexMap< Pyramid, Edge, 3, 0> { enum { index = 3 }; };
template<> struct SubentityVertexMap< Pyramid, Edge, 3, 1> { enum { index = 0 }; };
template<> struct SubentityVertexMap< Pyramid, Edge, 3, 0> { static constexpr int index = 3; };
template<> struct SubentityVertexMap< Pyramid, Edge, 3, 1> { static constexpr int index = 0; };
template<> struct SubentityVertexMap< Pyramid, Edge, 4, 0> { enum { index = 0 }; };
template<> struct SubentityVertexMap< Pyramid, Edge, 4, 1> { enum { index = 4 }; };
template<> struct SubentityVertexMap< Pyramid, Edge, 4, 0> { static constexpr int index = 0; };
template<> struct SubentityVertexMap< Pyramid, Edge, 4, 1> { static constexpr int index = 4; };
template<> struct SubentityVertexMap< Pyramid, Edge, 5, 0> { enum { index = 1 }; };
template<> struct SubentityVertexMap< Pyramid, Edge, 5, 1> { enum { index = 4 }; };
template<> struct SubentityVertexMap< Pyramid, Edge, 5, 0> { static constexpr int index = 1; };
template<> struct SubentityVertexMap< Pyramid, Edge, 5, 1> { static constexpr int index = 4; };
template<> struct SubentityVertexMap< Pyramid, Edge, 6, 0> { enum { index = 2 }; };
template<> struct SubentityVertexMap< Pyramid, Edge, 6, 1> { enum { index = 4 }; };
template<> struct SubentityVertexMap< Pyramid, Edge, 6, 0> { static constexpr int index = 2; };
template<> struct SubentityVertexMap< Pyramid, Edge, 6, 1> { static constexpr int index = 4; };
template<> struct SubentityVertexMap< Pyramid, Edge, 7, 0> { enum { index = 3 }; };
template<> struct SubentityVertexMap< Pyramid, Edge, 7, 1> { enum { index = 4 }; };
template<> struct SubentityVertexMap< Pyramid, Edge, 7, 0> { static constexpr int index = 3; };
template<> struct SubentityVertexMap< Pyramid, Edge, 7, 1> { static constexpr int index = 4; };
template <>
struct SubentityVertexCount< Pyramid, Polygon, 0 >
......@@ -68,10 +68,10 @@ struct SubentityVertexCount< Pyramid, Polygon, 0 >
static constexpr int count = 4;
};
template<> struct SubentityVertexMap< Pyramid, Polygon, 0, 0> { enum { index = 0 }; };
template<> struct SubentityVertexMap< Pyramid, Polygon, 0, 1> { enum { index = 1 }; };
template<> struct SubentityVertexMap< Pyramid, Polygon, 0, 2> { enum { index = 2 }; };
template<> struct SubentityVertexMap< Pyramid, Polygon, 0, 3> { enum { index = 3 }; };
template<> struct SubentityVertexMap< Pyramid, Polygon, 0, 0> { static constexpr int index = 0; };
template<> struct SubentityVertexMap< Pyramid, Polygon, 0, 1> { static constexpr int index = 1; };
template<> struct SubentityVertexMap< Pyramid, Polygon, 0, 2> { static constexpr int index = 2; };
template<> struct SubentityVertexMap< Pyramid, Polygon, 0, 3> { static constexpr int index = 3; };
template <>
struct SubentityVertexCount< Pyramid, Polygon, 1 >
......@@ -79,9 +79,9 @@ struct SubentityVertexCount< Pyramid, Polygon, 1 >
static constexpr int count = 3;
};
template<> struct SubentityVertexMap< Pyramid, Polygon, 1, 0> { enum { index = 0 }; };
template<> struct SubentityVertexMap< Pyramid, Polygon, 1, 1> { enum { index = 1 }; };
template<> struct SubentityVertexMap< Pyramid, Polygon, 1, 2> { enum { index = 4 }; };
template<> struct SubentityVertexMap< Pyramid, Polygon, 1, 0> { static constexpr int index = 0; };
template<> struct SubentityVertexMap< Pyramid, Polygon, 1, 1> { static constexpr int index = 1; };
template<> struct SubentityVertexMap< Pyramid, Polygon, 1, 2> { static constexpr int index = 4; };
template <>
struct SubentityVertexCount< Pyramid, Polygon, 2 >
......@@ -89,9 +89,9 @@ struct SubentityVertexCount< Pyramid, Polygon, 2 >
static constexpr int count = 3;
};
template<> struct SubentityVertexMap< Pyramid, Polygon, 2, 0> { enum { index = 1 }; };
template<> struct SubentityVertexMap< Pyramid, Polygon, 2, 1> { enum { index = 2 }; };
template<> struct SubentityVertexMap< Pyramid, Polygon, 2, 2> { enum { index = 4 }; };
template<> struct SubentityVertexMap< Pyramid, Polygon, 2, 0> { static constexpr int index = 1; };
template<> struct SubentityVertexMap< Pyramid, Polygon, 2, 1> { static constexpr int index = 2; };
template<> struct SubentityVertexMap< Pyramid, Polygon, 2, 2> { static constexpr int index = 4; };
template <>
struct SubentityVertexCount< Pyramid, Polygon, 3 >
......@@ -99,9 +99,9 @@ struct SubentityVertexCount< Pyramid, Polygon, 3 >
static constexpr int count = 3;
};
template<> struct SubentityVertexMap< Pyramid, Polygon, 3, 0> { enum { index = 2 }; };
template<> struct SubentityVertexMap< Pyramid, Polygon, 3, 1> { enum { index = 3 }; };
template<> struct SubentityVertexMap< Pyramid, Polygon, 3, 2> { enum { index = 4 }; };
template<> struct SubentityVertexMap< Pyramid, Polygon, 3, 0> { static constexpr int index = 2; };
template<> struct SubentityVertexMap< Pyramid, Polygon, 3, 1> { static constexpr int index = 3; };
template<> struct SubentityVertexMap< Pyramid, Polygon, 3, 2> { static constexpr int index = 4; };
template <>
struct SubentityVertexCount< Pyramid, Polygon, 4 >
......@@ -109,10 +109,10 @@ struct SubentityVertexCount< Pyramid, Polygon, 4 >
static constexpr int count = 3;
};
template<> struct SubentityVertexMap< Pyramid, Polygon, 4, 0> { enum { index = 3 }; };
template<> struct SubentityVertexMap< Pyramid, Polygon, 4, 1> { enum { index = 0 }; };
template<> struct SubentityVertexMap< Pyramid, Polygon, 4, 2> { enum { index = 4 }; };
template<> struct SubentityVertexMap< Pyramid, Polygon, 4, 0> { static constexpr int index = 3; };
template<> struct SubentityVertexMap< Pyramid, Polygon, 4, 1> { static constexpr int index = 0; };
template<> struct SubentityVertexMap< Pyramid, Polygon, 4, 2> { static constexpr int index = 4; };
} // namespace Topologies
} // namespace Meshes
} // namespace TNL
\ No newline at end of file
} // namespace TNL
......@@ -72,17 +72,17 @@ struct Subtopology< Quadrangle, 1 >
*
*/
template<> struct SubentityVertexMap< Quadrangle, Edge, 0, 0> { enum { index = 0 }; };
template<> struct SubentityVertexMap< Quadrangle, Edge, 0, 1> { enum { index = 1 }; };
template<> struct SubentityVertexMap< Quadrangle, Edge, 0, 0> { static constexpr int index = 0; };
template<> struct SubentityVertexMap< Quadrangle, Edge, 0, 1> { static constexpr int index = 1; };
template<> struct SubentityVertexMap< Quadrangle, Edge, 1, 0> { enum { index = 1 }; };
template<> struct SubentityVertexMap< Quadrangle, Edge, 1, 1> { enum { index = 2 }; };
template<> struct SubentityVertexMap< Quadrangle, Edge, 1, 0> { static constexpr int index = 1; };
template<> struct SubentityVertexMap< Quadrangle, Edge, 1, 1> { static constexpr int index = 2; };
template<> struct SubentityVertexMap< Quadrangle, Edge, 2, 0> { enum { index = 2 }; };
template<> struct SubentityVertexMap< Quadrangle, Edge, 2, 1> { enum { index = 3 }; };
template<> struct SubentityVertexMap< Quadrangle, Edge, 2, 0> { static constexpr int index = 2; };
template<> struct SubentityVertexMap< Quadrangle, Edge, 2, 1> { static constexpr int index = 3; };
template<> struct SubentityVertexMap< Quadrangle, Edge, 3, 0> { enum { index = 3 }; };
template<> struct SubentityVertexMap< Quadrangle, Edge, 3, 1> { enum { index = 0 }; };
template<> struct SubentityVertexMap< Quadrangle, Edge, 3, 0> { static constexpr int index = 3; };
template<> struct SubentityVertexMap< Quadrangle, Edge, 3, 1> { static constexpr int index = 0; };
} // namespace Topologies
} // namespace Meshes
......
......@@ -52,41 +52,41 @@ struct Subtopology< Tetrahedron, 2 >
};
template<> struct SubentityVertexMap< Tetrahedron, Edge, 0, 0> { enum { index = 1 }; };
template<> struct SubentityVertexMap< Tetrahedron, Edge, 0, 1> { enum { index = 2 }; };
template<> struct SubentityVertexMap< Tetrahedron, Edge, 0, 0> { static constexpr int index = 1; };
template<> struct SubentityVertexMap< Tetrahedron, Edge, 0, 1> { static constexpr int index = 2; };
template<> struct SubentityVertexMap< Tetrahedron, Edge, 1, 0> { enum { index = 2 }; };
template<> struct SubentityVertexMap< Tetrahedron, Edge, 1, 1> { enum { index = 0 }; };
template<> struct SubentityVertexMap< Tetrahedron, Edge, 1, 0> { static constexpr int index = 2; };
template<> struct SubentityVertexMap< Tetrahedron, Edge, 1, 1> { static constexpr int index = 0; };
template<> struct SubentityVertexMap< Tetrahedron, Edge, 2, 0> { enum { index = 0 }; };
template<> struct SubentityVertexMap< Tetrahedron, Edge, 2, 1> { enum { index = 1 }; };
template<> struct SubentityVertexMap< Tetrahedron, Edge, 2, 0> { static constexpr int index = 0; };
template<> struct SubentityVertexMap< Tetrahedron, Edge, 2, 1> { static constexpr int index = 1; };
template<> struct SubentityVertexMap< Tetrahedron, Edge, 3, 0> { enum { index = 0 }; };
template<> struct SubentityVertexMap< Tetrahedron, Edge, 3, 1> { enum { index = 3 }; };
template<> struct SubentityVertexMap< Tetrahedron, Edge, 3, 0> { static constexpr int index = 0; };
template<> struct SubentityVertexMap< Tetrahedron, Edge, 3, 1> { static constexpr int index = 3; };
template<> struct SubentityVertexMap< Tetrahedron, Edge, 4, 0> { enum { index = 1 }; };
template<> struct SubentityVertexMap< Tetrahedron, Edge, 4, 1> { enum { index = 3 }; };
template<> struct SubentityVertexMap< Tetrahedron, Edge, 4, 0> { static constexpr int index = 1; };
template<> struct SubentityVertexMap< Tetrahedron, Edge, 4, 1> { static constexpr int index = 3; };
template<> struct SubentityVertexMap< Tetrahedron, Edge, 5, 0> { enum { index = 2 }; };
template<> struct SubentityVertexMap< Tetrahedron, Edge, 5, 1> { enum { index = 3 }; };
template<> struct SubentityVertexMap< Tetrahedron, Edge, 5, 0> { static constexpr int index = 2; };
template<> struct SubentityVertexMap< Tetrahedron, Edge, 5, 1> { static constexpr int index = 3; };
// i-th subvertex is the opposite vertex of i-th subface
template<> struct SubentityVertexMap< Tetrahedron, Triangle, 0, 0> { enum { index = 1 }; };
template<> struct SubentityVertexMap< Tetrahedron, Triangle, 0, 1> { enum { index = 2 }; };
template<> struct SubentityVertexMap< Tetrahedron, Triangle, 0, 2> { enum { index = 3 }; };
template<> struct SubentityVertexMap< Tetrahedron, Triangle, 0, 0> { static constexpr int index = 1; };
template<> struct SubentityVertexMap< Tetrahedron, Triangle, 0, 1> { static constexpr int index = 2; };
template<> struct SubentityVertexMap< Tetrahedron, Triangle, 0, 2> { static constexpr int index = 3; };
template<> struct SubentityVertexMap< Tetrahedron, Triangle, 1, 0> { enum { index = 2 }; };
template<> struct SubentityVertexMap< Tetrahedron, Triangle, 1, 1> { enum { index = 0 }; };
template<> struct SubentityVertexMap< Tetrahedron, Triangle, 1, 2> { enum { index = 3 }; };
template<> struct SubentityVertexMap< Tetrahedron, Triangle, 1, 0> { static constexpr int index = 2; };
template<> struct SubentityVertexMap< Tetrahedron, Triangle, 1, 1> { static constexpr int index = 0; };
template<> struct SubentityVertexMap< Tetrahedron, Triangle, 1, 2> { static constexpr int index = 3; };
template<> struct SubentityVertexMap< Tetrahedron, Triangle, 2, 0> { enum { index = 0 }; };
template<> struct SubentityVertexMap< Tetrahedron, Triangle, 2, 1> { enum { index = 1 }; };
template<> struct SubentityVertexMap< Tetrahedron, Triangle, 2, 2> { enum { index = 3 }; };
template<> struct SubentityVertexMap< Tetrahedron, Triangle, 2, 0> { static constexpr int index = 0; };
template<> struct SubentityVertexMap< Tetrahedron, Triangle, 2, 1> { static constexpr int index = 1; };
template<> struct SubentityVertexMap< Tetrahedron, Triangle, 2, 2> { static constexpr int index = 3; };
template<> struct SubentityVertexMap< Tetrahedron, Triangle, 3, 0> { enum { index = 0 }; };
template<> struct SubentityVertexMap< Tetrahedron, Triangle, 3, 1> { enum { index = 1 }; };
template<> struct SubentityVertexMap< Tetrahedron, Triangle, 3, 2> { enum { index = 2 }; };
template<> struct SubentityVertexMap< Tetrahedron, Triangle, 3, 0> { static constexpr int index = 0; };
template<> struct SubentityVertexMap< Tetrahedron, Triangle, 3, 1> { static constexpr int index = 1; };
template<> struct SubentityVertexMap< Tetrahedron, Triangle, 3, 2> { static constexpr int index = 2; };
} // namespace Topologies
} // namespace Meshes
......
......@@ -45,14 +45,14 @@ struct Subtopology< Triangle, 1 >
};
template<> struct SubentityVertexMap< Triangle, Edge, 0, 0> { enum { index = 1 }; };
template<> struct SubentityVertexMap< Triangle, Edge, 0, 1> { enum { index = 2 }; };
template<> struct SubentityVertexMap< Triangle, Edge, 0, 0> { static constexpr int index = 1; };
template<> struct SubentityVertexMap< Triangle, Edge, 0, 1> { static constexpr int index = 2; };
template<> struct SubentityVertexMap< Triangle, Edge, 1, 0> { enum { index = 2 }; };
template<> struct SubentityVertexMap< Triangle, Edge, 1, 1> { enum { index = 0 }; };
template<> struct SubentityVertexMap< Triangle, Edge, 1, 0> { static constexpr int index = 2; };
template<> struct SubentityVertexMap< Triangle, Edge, 1, 1> { static constexpr int index = 0; };
template<> struct SubentityVertexMap< Triangle, Edge, 2, 0> { enum { index = 0 }; };
template<> struct SubentityVertexMap< Triangle, Edge, 2, 1> { enum { index = 1 }; };
template<> struct SubentityVertexMap< Triangle, Edge, 2, 0> { static constexpr int index = 0; };
template<> struct SubentityVertexMap< Triangle, Edge, 2, 1> { static constexpr int index = 1; };
} // namespace Topologies
} // namespace Meshes
......
......@@ -37,32 +37,32 @@ struct Subtopology< Wedge, 2 >
static constexpr int count = 5;
};
template<> struct SubentityVertexMap< Wedge, Edge, 0, 0> { enum { index = 0 }; };
template<> struct SubentityVertexMap< Wedge, Edge, 0, 1> { enum { index = 1 }; };
template<> struct SubentityVertexMap< Wedge, Edge, 0, 0> { static constexpr int index = 0; };
template<> struct SubentityVertexMap< Wedge, Edge, 0, 1> { static constexpr int index = 1; };
template<> struct SubentityVertexMap< Wedge, Edge, 1, 0> { enum { index = 1 }; };
template<> struct SubentityVertexMap< Wedge, Edge, 1, 1> { enum { index = 2 }; };
template<> struct SubentityVertexMap< Wedge, Edge, 1, 0> { static constexpr int index = 1; };
template<> struct SubentityVertexMap< Wedge, Edge, 1, 1> { static constexpr int index = 2; };
template<> struct SubentityVertexMap< Wedge, Edge, 2, 0> { enum { index = 2 }; };
template<> struct SubentityVertexMap< Wedge, Edge, 2, 1> { enum { index = 0 }; };
template<> struct SubentityVertexMap< Wedge, Edge, 2, 0> { static constexpr int index = 2; };
template<> struct SubentityVertexMap< Wedge, Edge, 2, 1> { static constexpr int index = 0; };
template<> struct SubentityVertexMap< Wedge, Edge, 3, 0> { enum { index = 3 }; };
template<> struct SubentityVertexMap< Wedge, Edge, 3, 1> { enum { index = 4 }; };
template<> struct SubentityVertexMap< Wedge, Edge, 3, 0> { static constexpr int index = 3; };
template<> struct SubentityVertexMap< Wedge, Edge, 3, 1> { static constexpr int index = 4; };
template<> struct SubentityVertexMap< Wedge, Edge, 4, 0> { enum { index = 4 }; };
template<> struct SubentityVertexMap< Wedge, Edge, 4, 1> { enum { index = 5 }; };
template<> struct SubentityVertexMap< Wedge, Edge, 4, 0> { static constexpr int index = 4; };
template<> struct SubentityVertexMap< Wedge, Edge, 4, 1> { static constexpr int index = 5; };
template<> struct SubentityVertexMap< Wedge, Edge, 5, 0> { enum { index = 5 }; };
template<> struct SubentityVertexMap< Wedge, Edge, 5, 1> { enum { index = 3 }; };
template<> struct SubentityVertexMap< Wedge, Edge, 5, 0> { static constexpr int index = 5; };
template<> struct SubentityVertexMap< Wedge, Edge, 5, 1> { static constexpr int index = 3; };
template<> struct SubentityVertexMap< Wedge, Edge, 6, 0> { enum { index = 3 }; };
template<> struct SubentityVertexMap< Wedge, Edge, 6, 1> { enum { index = 0 }; };
template<> struct SubentityVertexMap< Wedge, Edge, 6, 0> { static constexpr int index = 3; };
template<> struct SubentityVertexMap< Wedge, Edge, 6, 1> { static constexpr int index = 0; };
template<> struct SubentityVertexMap< Wedge, Edge, 7, 0> { enum { index = 5 }; };
template<> struct SubentityVertexMap< Wedge, Edge, 7, 1> { enum { index = 2 }; };
template<> struct SubentityVertexMap< Wedge, Edge, 7, 0> { static constexpr int index = 5; };
template<> struct SubentityVertexMap< Wedge, Edge, 7, 1> { static constexpr int index = 2; };
template<> struct SubentityVertexMap< Wedge, Edge, 8, 0> { enum { index = 4 }; };
template<> struct SubentityVertexMap< Wedge, Edge, 8, 1> { enum { index = 1 }; };
template<> struct SubentityVertexMap< Wedge, Edge, 8, 0> { static constexpr int index = 4; };
template<> struct SubentityVertexMap< Wedge, Edge, 8, 1> { static constexpr int index = 1; };
template <>
......@@ -71,9 +71,9 @@ struct SubentityVertexCount< Wedge, Polygon, 0 >
static constexpr int count = 3;
};
template<> struct SubentityVertexMap< Wedge, Polygon, 0, 0> { enum { index = 0 }; };
template<> struct SubentityVertexMap< Wedge, Polygon, 0, 1> { enum { index = 1 }; };
template<> struct SubentityVertexMap< Wedge, Polygon, 0, 2> { enum { index = 2 }; };
template<> struct SubentityVertexMap< Wedge, Polygon, 0, 0> { static constexpr int index = 0; };
template<> struct SubentityVertexMap< Wedge, Polygon, 0, 1> { static constexpr int index = 1; };
template<> struct SubentityVertexMap< Wedge, Polygon, 0, 2> { static constexpr int index = 2; };
template <>
struct SubentityVertexCount< Wedge, Polygon, 1 >
......@@ -81,9 +81,9 @@ struct SubentityVertexCount< Wedge, Polygon, 1 >
static constexpr int count = 3;
};
template<> struct SubentityVertexMap< Wedge, Polygon, 1, 0> { enum { index = 3 }; };
template<> struct SubentityVertexMap< Wedge, Polygon, 1, 1> { enum { index = 4 }; };
template<> struct SubentityVertexMap< Wedge, Polygon, 1, 2> { enum { index = 5 }; };
template<> struct SubentityVertexMap< Wedge, Polygon, 1, 0> { static constexpr int index = 3; };
template<> struct SubentityVertexMap< Wedge, Polygon, 1, 1> { static constexpr int index = 4; };
template<> struct SubentityVertexMap< Wedge, Polygon, 1, 2> { static constexpr int index = 5; };
template <>
struct SubentityVertexCount< Wedge, Polygon, 2 >
......@@ -91,10 +91,10 @@ struct SubentityVertexCount< Wedge, Polygon, 2 >
static constexpr int count = 4;
};
template<> struct SubentityVertexMap< Wedge, Polygon, 2, 0> { enum { index = 3 }; };
template<> struct SubentityVertexMap< Wedge, Polygon, 2, 1> { enum { index = 0 }; };
template<> struct SubentityVertexMap< Wedge, Polygon, 2, 2> { enum { index = 2 }; };
template<> struct SubentityVertexMap< Wedge, Polygon, 2, 3> { enum { index = 5 }; };
template<> struct SubentityVertexMap< Wedge, Polygon, 2, 0> { static constexpr int index = 3; };
template<> struct SubentityVertexMap< Wedge, Polygon, 2, 1> { static constexpr int index = 0; };
template<> struct SubentityVertexMap< Wedge, Polygon, 2, 2> { static constexpr int index = 2; };
template<> struct SubentityVertexMap< Wedge, Polygon, 2, 3> { static constexpr int index = 5; };
template <>
struct SubentityVertexCount< Wedge, Polygon, 3 >
......@@ -102,10 +102,10 @@ struct SubentityVertexCount< Wedge, Polygon, 3 >
static constexpr int count = 4;
};
template<> struct SubentityVertexMap< Wedge, Polygon, 3, 0> { enum { index = 4 }; };
template<> struct SubentityVertexMap< Wedge, Polygon, 3, 1> { enum { index = 1 }; };
template<> struct SubentityVertexMap< Wedge, Polygon, 3, 2> { enum { index = 2 }; };
template<> struct SubentityVertexMap< Wedge, Polygon, 3, 3> { enum { index = 5 }; };
template<> struct SubentityVertexMap< Wedge, Polygon, 3, 0> { static constexpr int index = 4; };
template<> struct SubentityVertexMap< Wedge, Polygon, 3, 1> { static constexpr int index = 1; };
template<> struct SubentityVertexMap< Wedge, Polygon, 3, 2> { static constexpr int index = 2; };
template<> struct SubentityVertexMap< Wedge, Polygon, 3, 3> { static constexpr int index = 5; };
template <>
struct SubentityVertexCount< Wedge, Polygon, 4 >
......@@ -113,11 +113,11 @@ struct SubentityVertexCount< Wedge, Polygon, 4 >
static constexpr int count = 4;
};
template<> struct SubentityVertexMap< Wedge, Polygon, 4, 0> { enum { index = 3 }; };