OGS
ElementTraitsLagrange.h
Go to the documentation of this file.
1
11#pragma once
12
13#include "BaseLib/TMP.h"
32
33namespace NumLib
34{
35namespace detail
36{
37template <typename ShapeFunction, typename Enabled = void>
39{
40 static_assert(ShapeFunction::ORDER < 2,
41 "Only shape functions of order 1 should use this fallback. "
42 "Order 0 is a special case for 0D elements.");
43 using type = ShapeFunction;
44};
45
46template <typename ShapeFunction>
48 ShapeFunction,
49 std::void_t<typename NumLib::LowerDim<ShapeFunction>::type>>
50{
52};
53
54template <typename ShapeFunction_>
56{
57 using ShapeFunction = ShapeFunction_;
60};
61} // namespace detail
62
63template <typename Element>
65
66#define OGS_SPECIALIZE_ELEMENT_TRAITS_LAGRANGE(ELEMENT, SHAPE_FUNCTION) \
67 template <> \
68 struct ElementTraitsLagrange<MeshLib::ELEMENT> \
69 : detail::ShapeFunctionTraits<NumLib::SHAPE_FUNCTION> \
70 { \
71 using Element = MeshLib::ELEMENT; \
72 static_assert( \
73 std::is_same_v<Element, typename ShapeFunction::MeshElement>); \
74 }
75
76// points and lines
80// quads and hexahedra
86// simplices
91// prisms
94// pyramids
97
98#undef OGS_SPECIALIZE_ELEMENT_TRAITS_LAGRANGE
99
102} // namespace NumLib
Shape function for a point element in natural coordinates.
Definition: ShapePoint1.h:19
typename Map< MapFromTypeToType, List >::type Map_t
Definition: TMP.h:101
TemplateElement< MeshLib::PyramidRule13 > Pyramid13
Definition: Pyramid.h:26
TemplateElement< MeshLib::QuadRule8 > Quad8
Definition: Quad.h:29
TemplateElement< MeshLib::TetRule4 > Tet
Definition: Tet.h:25
TemplateElement< MeshLib::LineRule3 > Line3
Definition: Line.h:26
TemplateElement< MeshLib::TriRule3 > Tri
Definition: Tri.h:26
TemplateElement< MeshLib::QuadRule9 > Quad9
Definition: Quad.h:30
TemplateElement< MeshLib::PrismRule6 > Prism
Definition: Prism.h:25
TemplateElement< MeshLib::PyramidRule5 > Pyramid
Definition: Pyramid.h:25
TemplateElement< PointRule1 > Point
Definition: Point.h:20
TemplateElement< MeshLib::HexRule20 > Hex20
Definition: Hex.h:26
TemplateElement< MeshLib::TriRule6 > Tri6
Definition: Tri.h:27
TemplateElement< MeshLib::TetRule10 > Tet10
Definition: Tet.h:26
TemplateElement< MeshLib::PrismRule15 > Prism15
Definition: Prism.h:26
TemplateElement< MeshLib::HexRule8 > Hex
Definition: Hex.h:25
TemplateElement< MeshLib::QuadRule4 > Quad
Definition: Quad.h:28
OGS_SPECIALIZE_ELEMENT_TRAITS_LAGRANGE(Point, ShapePoint1)
BaseLib::TMP::Map_t< ElementTraitsLagrange, MeshLib::AllElementTypes > AllElementTraitsLagrange
typename LowerOrderShapeFunctionOrSame< ShapeFunction >::type LowerOrderShapeFunction