From 91bd4e08ca5364ab506489414758be425b7b51b4 Mon Sep 17 00:00:00 2001 From: Peter Munch Date: Thu, 26 Nov 2020 10:47:55 +0100 Subject: [PATCH] Add hp capabilities to Simplex::FE_DGP --- include/deal.II/simplex/fe_lib.h | 21 ++++++++++++++++ source/simplex/fe_lib.cc | 43 ++++++++++++++++++++++++++++++++ 2 files changed, 64 insertions(+) diff --git a/include/deal.II/simplex/fe_lib.h b/include/deal.II/simplex/fe_lib.h index 4c8a01572b..f618ff8e5b 100644 --- a/include/deal.II/simplex/fe_lib.h +++ b/include/deal.II/simplex/fe_lib.h @@ -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 &fe_other, + const unsigned int codim) const override; + + /** + * @copydoc dealii::FiniteElement::hp_vertex_dof_identities() + */ + std::vector> + hp_vertex_dof_identities( + const FiniteElement &fe_other) const override; + + /** + * @copydoc dealii::FiniteElement::hp_line_dof_identities() + */ + std::vector> + hp_line_dof_identities( + const FiniteElement &fe_other) const override; }; } // namespace Simplex diff --git a/source/simplex/fe_lib.cc b/source/simplex/fe_lib.cc index cf532af094..a034abd234 100644 --- a/source/simplex/fe_lib.cc +++ b/source/simplex/fe_lib.cc @@ -15,6 +15,7 @@ #include +#include #include #include @@ -327,6 +328,48 @@ namespace Simplex } + template + FiniteElementDomination::Domination + FE_DGP::compare_for_domination( + const FiniteElement &fe_other, + const unsigned int codim) const + { + (void)fe_other; + (void)codim; + + Assert((dynamic_cast *>(&fe_other)), + ExcNotImplemented()); + AssertDimension(dim, 2); + AssertDimension(this->degree, fe_other.tensor_degree()); + + return FiniteElementDomination::either_element_can_dominate; + } + + + + template + std::vector> + FE_DGP::hp_vertex_dof_identities( + const FiniteElement &fe_other) const + { + (void)fe_other; + + return {}; + } + + + + template + std::vector> + FE_DGP::hp_line_dof_identities( + const FiniteElement &fe_other) const + { + (void)fe_other; + + return {}; + } + + } // namespace Simplex -- 2.39.5