From e41ce6b30470c082352a4952f0e825042c80da73 Mon Sep 17 00:00:00 2001 From: Peter Munch Date: Thu, 15 Oct 2020 06:45:14 +0200 Subject: [PATCH] Add MatrixFree::get_active_fe_index and ::get_active_quadrature_index --- include/deal.II/matrix_free/fe_evaluation.h | 34 +++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/include/deal.II/matrix_free/fe_evaluation.h b/include/deal.II/matrix_free/fe_evaluation.h index a05f3db31b..0e86aa2209 100644 --- a/include/deal.II/matrix_free/fe_evaluation.h +++ b/include/deal.II/matrix_free/fe_evaluation.h @@ -245,6 +245,20 @@ public: unsigned int get_current_cell_index() const; + /** + * Return the active fe index for this class for efficient indexing in the hp + * case. + */ + unsigned int + get_active_fe_index() const; + + /** + * Return the active quadrature index for this class for efficient indexing in + * the hp case. + */ + unsigned int + get_active_quadrature_index() const; + protected: /** * Constructor. Made protected to prevent users from directly using this @@ -3837,6 +3851,26 @@ FEEvaluationBaseData:: } + +template +inline unsigned int +FEEvaluationBaseData:: + get_active_fe_index() const +{ + return active_fe_index; +} + + + +template +inline unsigned int +FEEvaluationBaseData:: + get_active_quadrature_index() const +{ + return active_quad_index; +} + + /*----------------------- FEEvaluationBase ----------------------------------*/ template