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_>
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
#define OGS_SPECIALIZE_ELEMENT_TRAITS_LAGRANGE(ELEMENT, SHAPE_FUNCTION)
Shape function for a point element in natural coordinates.
Definition ShapePoint1.h:19
typename Map< MapFromTypeToType, List >::type Map_t
Definition TMP.h:102
BaseLib::TMP::Map_t< ElementTraitsLagrange, MeshLib::AllElementTypes > AllElementTraitsLagrange
typename LowerOrderShapeFunctionOrSame< ShapeFunction >::type LowerOrderShapeFunction