From ac7ed0bf30a14e21e01da8b6a53510c5339a0a85 Mon Sep 17 00:00:00 2001 From: Martin Kronbichler Date: Mon, 19 Aug 2024 21:28:34 +0200 Subject: [PATCH] Allow to include FEFaceEvaluation in std::vector --- include/deal.II/matrix_free/fe_evaluation.h | 24 +++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/include/deal.II/matrix_free/fe_evaluation.h b/include/deal.II/matrix_free/fe_evaluation.h index fda4197cce..5246d5ac29 100644 --- a/include/deal.II/matrix_free/fe_evaluation.h +++ b/include/deal.II/matrix_free/fe_evaluation.h @@ -2517,8 +2517,16 @@ inline FEEvaluationBaseget_fe_values().get_mapping(), other.mapped_geometry->get_quadrature(), other.mapped_geometry->get_fe_values().get_update_flags()); - this->mapping_data = &this->mapped_geometry->get_data_storage(); - this->cell = 0; + + if constexpr (is_face == false) + this->mapping_data = &this->mapped_geometry->get_data_storage(); + else + Assert(false, + ExcNotImplemented("On-the-fly geometry evaluation with " + "face evaluators is not currently " + "implemented!")); + + this->cell = 0; this->jacobian = this->mapped_geometry->get_data_storage().jacobians[0].begin(); @@ -2585,8 +2593,16 @@ operator=(const FEEvaluationBaseget_fe_values().get_mapping(), other.mapped_geometry->get_quadrature(), other.mapped_geometry->get_fe_values().get_update_flags()); - this->cell = 0; - this->mapping_data = &this->mapped_geometry->get_data_storage(); + + if constexpr (is_face == false) + this->mapping_data = &this->mapped_geometry->get_data_storage(); + else + Assert(false, + ExcNotImplemented("On-the-fly geometry evaluation with " + "face evaluators is not currently " + "implemented!")); + this->cell = 0; + this->jacobian = this->mapped_geometry->get_data_storage().jacobians[0].begin(); this->J_value = -- 2.39.5