OGS
ElementTraitsLagrange.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) OpenGeoSys Community (opengeosys.org)
2// SPDX-License-Identifier: BSD-3-Clause
3
4#pragma once
5
6#include "BaseLib/TMP.h"
25
26namespace NumLib
27{
28namespace detail
29{
30template <typename ShapeFunction, typename Enabled = void>
32{
33 static_assert(ShapeFunction::ORDER < 2,
34 "Only shape functions of order 1 should use this fallback. "
35 "Order 0 is a special case for 0D elements.");
37};
38
39template <typename ShapeFunction>
42 std::void_t<typename NumLib::LowerDim<ShapeFunction>::type>>
43{
45};
46
47template <typename ShapeFunction_>
54} // namespace detail
55
56template <typename Element>
58
59#define OGS_SPECIALIZE_ELEMENT_TRAITS_LAGRANGE(ELEMENT, SHAPE_FUNCTION) \
60 template <> \
61 struct ElementTraitsLagrange<MeshLib::ELEMENT> \
62 : detail::ShapeFunctionTraits<NumLib::SHAPE_FUNCTION> \
63 { \
64 using Element = MeshLib::ELEMENT; \
65 static_assert( \
66 std::is_same_v<Element, typename ShapeFunction::MeshElement>); \
67 }
68
69// points and lines
73// quads and hexahedra
79// simplices
84// prisms
87// pyramids
90
91#undef OGS_SPECIALIZE_ELEMENT_TRAITS_LAGRANGE
92
95} // namespace NumLib
#define OGS_SPECIALIZE_ELEMENT_TRAITS_LAGRANGE(ELEMENT, SHAPE_FUNCTION)
Shape function for a point element in natural coordinates.
Definition ShapePoint1.h:13
typename Map< MapFromTypeToType, List >::type Map_t
Definition TMP.h:95
BaseLib::TMP::Map_t< ElementTraitsLagrange, MeshLib::AllElementTypes > AllElementTraitsLagrange
typename LowerOrderShapeFunctionOrSame< ShapeFunction >::type LowerOrderShapeFunction