From 4226ace5e58522b3994f800bcb0297b0da4ccdb7 Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Mon, 13 Feb 2017 10:00:23 +0100 Subject: [PATCH] FE_Enriched: add prolongation/restriction matrices --- include/deal.II/fe/fe_enriched.h | 26 ++++++++++++++++++++++++++ source/fe/fe_enriched.cc | 18 ++++++++++++++++++ 2 files changed, 44 insertions(+) diff --git a/include/deal.II/fe/fe_enriched.h b/include/deal.II/fe/fe_enriched.h index 5de44ece9f..d983feda8f 100644 --- a/include/deal.II/fe/fe_enriched.h +++ b/include/deal.II/fe/fe_enriched.h @@ -316,6 +316,32 @@ public: virtual double shape_value(const unsigned int i, const Point< dim > &p) const; + /** + * @name Transfer matrices + * @{ + */ + + /** + * Projection from a fine grid space onto a coarse grid space. + * + * This function only makes sense when all child elements are also enriched + * using the same function(s) as the parent element. + */ + virtual const FullMatrix & + get_restriction_matrix (const unsigned int child, + const RefinementCase &refinement_case=RefinementCase::isotropic_refinement) const; + + /** + * Embedding matrix between grids. + * + * This function only makes sense when all child elements are also enriched + * using the same function(s) as the parent element. + */ + virtual const FullMatrix & + get_prolongation_matrix (const unsigned int child, + const RefinementCase &refinement_case=RefinementCase::isotropic_refinement) const; + + //@} /** * @name Functions to support hp diff --git a/source/fe/fe_enriched.cc b/source/fe/fe_enriched.cc index 405a39d3a8..0962bb99cf 100644 --- a/source/fe/fe_enriched.cc +++ b/source/fe/fe_enriched.cc @@ -892,6 +892,24 @@ compare_for_face_domination (const FiniteElement &fe_other) const } } +template +const FullMatrix & +FE_Enriched::get_prolongation_matrix (const unsigned int child, + const RefinementCase &refinement_case) const +{ + return fe_system.get_prolongation_matrix(child, refinement_case); +} + + +template +const FullMatrix & +FE_Enriched::get_restriction_matrix (const unsigned int child, + const RefinementCase &refinement_case) const +{ + return fe_system.get_restriction_matrix(child, refinement_case); +} + + /* ----------------------- FESystem::InternalData ------------------- */ -- 2.39.5