From 3d1db6ceb4e4fd2d12ff7273d17d2ea202fccf37 Mon Sep 17 00:00:00 2001
From: Peter Munch <peterrmuench@gmail.com>
Date: Wed, 9 Dec 2020 10:07:58 +0100
Subject: [PATCH] Fix conformity of Simplex::FE_P and Simplex::FE_WedgeP

---
 include/deal.II/simplex/fe_lib.h |  5 +++--
 source/simplex/fe_lib.cc         | 18 ++++++++++++------
 2 files changed, 15 insertions(+), 8 deletions(-)

diff --git a/include/deal.II/simplex/fe_lib.h b/include/deal.II/simplex/fe_lib.h
index e7c45a8ed9..82be34ad4f 100644
--- a/include/deal.II/simplex/fe_lib.h
+++ b/include/deal.II/simplex/fe_lib.h
@@ -40,8 +40,9 @@ namespace Simplex
     /**
      * Constructor.
      */
-    FE_Poly(const unsigned int               degree,
-            const std::vector<unsigned int> &dpo_vector);
+    FE_Poly(const unsigned int                                degree,
+            const std::vector<unsigned int> &                 dpo_vector,
+            const typename FiniteElementData<dim>::Conformity conformity);
 
   private:
     /**
diff --git a/source/simplex/fe_lib.cc b/source/simplex/fe_lib.cc
index abd6e59042..82130045e3 100644
--- a/source/simplex/fe_lib.cc
+++ b/source/simplex/fe_lib.cc
@@ -120,8 +120,10 @@ namespace Simplex
 
 
   template <int dim, int spacedim>
-  FE_Poly<dim, spacedim>::FE_Poly(const unsigned int               degree,
-                                  const std::vector<unsigned int> &dpo_vector)
+  FE_Poly<dim, spacedim>::FE_Poly(
+    const unsigned int                                degree,
+    const std::vector<unsigned int> &                 dpo_vector,
+    const typename FiniteElementData<dim>::Conformity conformity)
     : dealii::FE_Poly<dim, spacedim>(
         Simplex::ScalarPolynomial<dim>(degree),
         FiniteElementData<dim>(dpo_vector,
@@ -129,7 +131,7 @@ namespace Simplex
                                           ReferenceCell::Type::Tet,
                                1,
                                degree,
-                               FiniteElementData<dim>::L2),
+                               conformity),
         std::vector<bool>(FiniteElementData<dim>(dpo_vector,
                                                  dim == 2 ?
                                                    ReferenceCell::Type::Tri :
@@ -252,7 +254,9 @@ namespace Simplex
 
   template <int dim, int spacedim>
   FE_P<dim, spacedim>::FE_P(const unsigned int degree)
-    : FE_Poly<dim, spacedim>(degree, get_dpo_vector_fe_p(dim, degree))
+    : FE_Poly<dim, spacedim>(degree,
+                             get_dpo_vector_fe_p(dim, degree),
+                             FiniteElementData<dim>::H1)
   {}
 
 
@@ -338,7 +342,9 @@ namespace Simplex
 
   template <int dim, int spacedim>
   FE_DGP<dim, spacedim>::FE_DGP(const unsigned int degree)
-    : FE_Poly<dim, spacedim>(degree, get_dpo_vector_fe_dgp(dim, degree))
+    : FE_Poly<dim, spacedim>(degree,
+                             get_dpo_vector_fe_dgp(dim, degree),
+                             FiniteElementData<dim>::L2)
   {}
 
 
@@ -414,7 +420,7 @@ namespace Simplex
                                ReferenceCell::Type::Wedge,
                                1,
                                degree,
-                               FiniteElementData<dim>::L2),
+                               FiniteElementData<dim>::H1),
         std::vector<bool>(FiniteElementData<dim>(get_dpo_vector_fe_wedge(
                                                    degree),
                                                  ReferenceCell::Type::Wedge,
-- 
2.39.5