From fae90c1fe9ff4454dbdded312bb5c5149c4aff23 Mon Sep 17 00:00:00 2001 From: Peter Munch Date: Tue, 17 Nov 2020 19:50:16 +0100 Subject: [PATCH] Actually use ShapeInfo for Simplex::FE_P and Simplex::QGauss --- include/deal.II/matrix_free/mapping_info.h | 8 ++ .../matrix_free/mapping_info.templates.h | 88 +++++++++++++++---- 2 files changed, 77 insertions(+), 19 deletions(-) diff --git a/include/deal.II/matrix_free/mapping_info.h b/include/deal.II/matrix_free/mapping_info.h index e4852ea9eb..d717e3fc17 100644 --- a/include/deal.II/matrix_free/mapping_info.h +++ b/include/deal.II/matrix_free/mapping_info.h @@ -125,6 +125,14 @@ namespace internal */ QuadratureDescriptor(); + /** + * Set up the lengths in the various members of this struct. + */ + template + void + initialize(const Quadrature &quadrature, + const UpdateFlags update_flags_inner_faces = update_default); + /** * Set up the lengths in the various members of this struct. */ diff --git a/include/deal.II/matrix_free/mapping_info.templates.h b/include/deal.II/matrix_free/mapping_info.templates.h index 1d89993cc5..e81fcb0fe8 100644 --- a/include/deal.II/matrix_free/mapping_info.templates.h +++ b/include/deal.II/matrix_free/mapping_info.templates.h @@ -51,6 +51,34 @@ namespace internal + template + template + void + MappingInfoStorage:: + QuadratureDescriptor::initialize( + const Quadrature &quadrature, + const UpdateFlags update_flags_inner_faces) + { + Assert(structdim + 1 <= spacedim || + update_flags_inner_faces == update_default, + ExcMessage("Volume cells do not allow for setting inner faces")); + this->quadrature = quadrature; + n_q_points = quadrature.size(); + quadrature_weights.resize(n_q_points); + for (unsigned int i = 0; i < n_q_points; ++i) + quadrature_weights[i] = quadrature.weight(i); + + // note: quadrature_1 and tensor_quadrature_weights are not set up + + // TODO: set up face_orientations + (void)update_flags_inner_faces; + } + + + template