]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Add hp capabilities to Simplex::FE_DGP 11257/head
authorPeter Munch <peterrmuench@gmail.com>
Thu, 26 Nov 2020 09:47:55 +0000 (10:47 +0100)
committerPeter Munch <peterrmuench@gmail.com>
Thu, 26 Nov 2020 09:47:55 +0000 (10:47 +0100)
include/deal.II/simplex/fe_lib.h
source/simplex/fe_lib.cc

index 4c8a01572bf9fab58c0a55137c738d5c7d5ddb49..f618ff8e5b3d90b95250a3261f8bafb6800fa5ca 100644 (file)
@@ -138,6 +138,27 @@ namespace Simplex
      */
     std::string
     get_name() const override;
+
+    /**
+     * @copydoc dealii::FiniteElement::compare_for_domination()
+     */
+    FiniteElementDomination::Domination
+    compare_for_domination(const FiniteElement<dim, spacedim> &fe_other,
+                           const unsigned int codim) const override;
+
+    /**
+     * @copydoc dealii::FiniteElement::hp_vertex_dof_identities()
+     */
+    std::vector<std::pair<unsigned int, unsigned int>>
+    hp_vertex_dof_identities(
+      const FiniteElement<dim, spacedim> &fe_other) const override;
+
+    /**
+     * @copydoc dealii::FiniteElement::hp_line_dof_identities()
+     */
+    std::vector<std::pair<unsigned int, unsigned int>>
+    hp_line_dof_identities(
+      const FiniteElement<dim, spacedim> &fe_other) const override;
   };
 
 } // namespace Simplex
index cf532af094fae8c8cd384b71f38796a3c86d56e1..a034abd2344513a7008fb0ec65a018003e29a097 100644 (file)
@@ -15,6 +15,7 @@
 
 #include <deal.II/base/config.h>
 
+#include <deal.II/fe/fe_dgq.h>
 #include <deal.II/fe/fe_q.h>
 
 #include <deal.II/simplex/fe_lib.h>
@@ -327,6 +328,48 @@ namespace Simplex
   }
 
 
+  template <int dim, int spacedim>
+  FiniteElementDomination::Domination
+  FE_DGP<dim, spacedim>::compare_for_domination(
+    const FiniteElement<dim, spacedim> &fe_other,
+    const unsigned int                  codim) const
+  {
+    (void)fe_other;
+    (void)codim;
+
+    Assert((dynamic_cast<const FE_DGQ<dim, spacedim> *>(&fe_other)),
+           ExcNotImplemented());
+    AssertDimension(dim, 2);
+    AssertDimension(this->degree, fe_other.tensor_degree());
+
+    return FiniteElementDomination::either_element_can_dominate;
+  }
+
+
+
+  template <int dim, int spacedim>
+  std::vector<std::pair<unsigned int, unsigned int>>
+  FE_DGP<dim, spacedim>::hp_vertex_dof_identities(
+    const FiniteElement<dim, spacedim> &fe_other) const
+  {
+    (void)fe_other;
+
+    return {};
+  }
+
+
+
+  template <int dim, int spacedim>
+  std::vector<std::pair<unsigned int, unsigned int>>
+  FE_DGP<dim, spacedim>::hp_line_dof_identities(
+    const FiniteElement<dim, spacedim> &fe_other) const
+  {
+    (void)fe_other;
+
+    return {};
+  }
+
+
 
 } // namespace Simplex
 

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.