From 8725d9c70479353db1fc3e4d15665afcd0d6b697 Mon Sep 17 00:00:00 2001
From: Dmitri Naumov <github@naumov.de>
Date: Thu, 10 Nov 2016 00:27:27 +0100
Subject: [PATCH] [NL] Add lookup table for lower order elements.

Used to derive shapefunctions of lower order for example
as needed for pressure given displacement shape functions
in HydroMechanics process.
---
 NumLib/Fem/FiniteElement/LowerDimShapeTable.h | 70 +++++++++++++++++++
 1 file changed, 70 insertions(+)
 create mode 100644 NumLib/Fem/FiniteElement/LowerDimShapeTable.h

diff --git a/NumLib/Fem/FiniteElement/LowerDimShapeTable.h b/NumLib/Fem/FiniteElement/LowerDimShapeTable.h
new file mode 100644
index 00000000000..a2bed78cb08
--- /dev/null
+++ b/NumLib/Fem/FiniteElement/LowerDimShapeTable.h
@@ -0,0 +1,70 @@
+/**
+ * \copyright
+ * Copyright (c) 2012-2016, OpenGeoSys Community (http://www.opengeosys.org)
+ *            Distributed under a Modified BSD License.
+ *              See accompanying file LICENSE.txt or
+ *              http://www.opengeosys.org/project/license
+ *
+ */
+
+#ifndef NUM_LIB_FEM_FINITE_ELEMENT_LOWERSHAPETABLE_H_
+#define NUM_LIB_FEM_FINITE_ELEMENT_LOWERSHAPETABLE_H_
+
+#include "NumLib/Fem/ShapeFunction/ShapeHex20.h"
+#include "NumLib/Fem/ShapeFunction/ShapeHex8.h"
+#include "NumLib/Fem/ShapeFunction/ShapePrism15.h"
+#include "NumLib/Fem/ShapeFunction/ShapePrism6.h"
+#include "NumLib/Fem/ShapeFunction/ShapePyra13.h"
+#include "NumLib/Fem/ShapeFunction/ShapePyra5.h"
+#include "NumLib/Fem/ShapeFunction/ShapeQuad4.h"
+#include "NumLib/Fem/ShapeFunction/ShapeQuad8.h"
+#include "NumLib/Fem/ShapeFunction/ShapeQuad9.h"
+#include "NumLib/Fem/ShapeFunction/ShapeTet10.h"
+#include "NumLib/Fem/ShapeFunction/ShapeTet4.h"
+#include "NumLib/Fem/ShapeFunction/ShapeTri3.h"
+#include "NumLib/Fem/ShapeFunction/ShapeTri6.h"
+
+namespace NumLib
+{
+template <typename SF>
+struct LowerDim;
+
+template <>
+struct LowerDim<NumLib::ShapeQuad8>
+{
+    using type = NumLib::ShapeQuad4;
+};
+template <>
+struct LowerDim<NumLib::ShapeQuad9>
+{
+    using type = NumLib::ShapeQuad4;
+};
+template <>
+struct LowerDim<NumLib::ShapeHex20>
+{
+    using type = NumLib::ShapeHex8;
+};
+template <>
+struct LowerDim<NumLib::ShapeTri6>
+{
+    using type = NumLib::ShapeTri3;
+};
+template <>
+struct LowerDim<NumLib::ShapeTet10>
+{
+    using type = NumLib::ShapeTet4;
+};
+template <>
+struct LowerDim<NumLib::ShapePrism15>
+{
+    using type = NumLib::ShapePrism6;
+};
+template <>
+struct LowerDim<NumLib::ShapePyra13>
+{
+    using type = NumLib::ShapePyra5;
+};
+
+}  // namespace NumLib
+
+#endif  // NUM_LIB_FEM_FINITE_ELEMENT_LOWERSHAPETABLE_H_
-- 
GitLab