From 548bc523b8f0e670ed23318ecf0b501653908356 Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Thu, 14 Jan 2021 09:11:33 -0700 Subject: [PATCH] Use the correct mapping for a finite element. --- source/fe/fe_values.cc | 12 +++------- source/meshworker/scratch_data.cc | 38 +++++++++++++------------------ 2 files changed, 19 insertions(+), 31 deletions(-) diff --git a/source/fe/fe_values.cc b/source/fe/fe_values.cc index 234dc9f9e6..4f5348d568 100644 --- a/source/fe/fe_values.cc +++ b/source/fe/fe_values.cc @@ -4388,10 +4388,8 @@ FEValues::FEValues(const FiniteElement &fe, q.size(), fe.n_dofs_per_cell(), update_default, - // TODO: We should query the default mapping for the kind of cell - // represented by 'fe' and 'q': ReferenceCell::get_default_linear_mapping( - ReferenceCell::get_hypercube(dim)), + fe.reference_cell_type()), fe) , quadrature(q) { @@ -4716,10 +4714,8 @@ FEFaceValues::FEFaceValues( : FEFaceValuesBase( fe.n_dofs_per_cell(), update_flags, - // TODO: We should query the default mapping for the kind of cell - // represented by 'fe' and 'q': ReferenceCell::get_default_linear_mapping( - ReferenceCell::get_hypercube(dim)), + fe.reference_cell_type()), fe, quadrature) { @@ -4950,10 +4946,8 @@ FESubfaceValues::FESubfaceValues( : FEFaceValuesBase( fe.n_dofs_per_cell(), update_flags, - // TODO: We should query the default mapping for the kind of cell - // represented by 'fe' and 'q': ReferenceCell::get_default_linear_mapping( - ReferenceCell::get_hypercube(dim)), + fe.reference_cell_type()), fe, quadrature) { diff --git a/source/meshworker/scratch_data.cc b/source/meshworker/scratch_data.cc index 17772fee13..5fbd2d2077 100644 --- a/source/meshworker/scratch_data.cc +++ b/source/meshworker/scratch_data.cc @@ -74,16 +74,13 @@ namespace MeshWorker const UpdateFlags & update_flags, const Quadrature & face_quadrature, const UpdateFlags & face_update_flags) - : ScratchData( - // TODO: We should query the default mapping for the kind of cell - // represented by 'fe' and 'q': - ReferenceCell::get_default_linear_mapping( - ReferenceCell::get_hypercube(dim)), - fe, - quadrature, - update_flags, - face_quadrature, - face_update_flags) + : ScratchData(ReferenceCell::get_default_linear_mapping( + fe.reference_cell_type()), + fe, + quadrature, + update_flags, + face_quadrature, + face_update_flags) {} @@ -97,18 +94,15 @@ namespace MeshWorker const Quadrature & face_quadrature, const UpdateFlags & face_update_flags, const UpdateFlags & neighbor_face_update_flags) - : ScratchData( - // TODO: We should query the default mapping for the kind of cell - // represented by 'fe' and 'q': - ReferenceCell::get_default_linear_mapping( - ReferenceCell::get_hypercube(dim)), - fe, - quadrature, - update_flags, - neighbor_update_flags, - face_quadrature, - face_update_flags, - neighbor_face_update_flags) + : ScratchData(ReferenceCell::get_default_linear_mapping( + fe.reference_cell_type()), + fe, + quadrature, + update_flags, + neighbor_update_flags, + face_quadrature, + face_update_flags, + neighbor_face_update_flags) {} -- 2.39.5