From: Peter Munch Date: Wed, 24 Feb 2021 20:56:20 +0000 (+0100) Subject: Introduce three new FEEvaluation functions X-Git-Tag: v9.3.0-rc1~414^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1e29c93b903ea4e7b7f9c505ce647dc65c5261a0;p=dealii.git Introduce three new FEEvaluation functions --- diff --git a/include/deal.II/matrix_free/fe_evaluation.h b/include/deal.II/matrix_free/fe_evaluation.h index 113096fedb..d5c312b6fc 100644 --- a/include/deal.II/matrix_free/fe_evaluation.h +++ b/include/deal.II/matrix_free/fe_evaluation.h @@ -138,6 +138,12 @@ public: const internal::MatrixFreeFunctions::ShapeInfo & get_shape_info() const; + /** + * Return a reference to the DoFInfo object currently in use. + */ + const internal::MatrixFreeFunctions::DoFInfo & + get_dof_info() const; + /** * Return the determinant of the Jacobian from the unit to the real cell * times the quadrature weight. @@ -270,6 +276,12 @@ public: unsigned int get_active_quadrature_index() const; + /** + * Return the underlying MatrixFree object. + */ + const MatrixFree & + get_matrix_free() const; + protected: /** * Constructor. Made protected to prevent users from directly using this @@ -1107,6 +1119,12 @@ public: //@} + /** + * Return the first selected component. + */ + unsigned int + get_first_selected_component() const; + protected: /** * Constructor. Made protected to prevent users from directly using this @@ -3610,6 +3628,19 @@ FEEvaluationBaseData:: +template +inline const internal::MatrixFreeFunctions::DoFInfo & +FEEvaluationBaseData::get_dof_info() + const +{ + Assert(dof_info != nullptr, + ExcMessage( + "FEEvaluation was not initialized with a MatrixFree object!")); + return *dof_info; +} + + + template inline DEAL_II_ALWAYS_INLINE Tensor<1, dim, VectorizedArrayType> FEEvaluationBaseData:: @@ -3955,6 +3986,19 @@ FEEvaluationBaseData:: } + +template +inline const MatrixFree & +FEEvaluationBaseData:: + get_matrix_free() const +{ + Assert(matrix_info != nullptr, + ExcMessage( + "FEEvaluation was not initialized with a MatrixFree object!")); + return *matrix_info; +} + + /*----------------------- FEEvaluationBase ----------------------------------*/ template :: +template +inline unsigned int +FEEvaluationBase:: + get_first_selected_component() const +{ + return first_selected_component; +} + + + template