From f0ad332c0959b94c767a12c3b1b65a91ed6e7a50 Mon Sep 17 00:00:00 2001 From: Niklas Wik Date: Fri, 17 Jun 2022 14:25:32 +0200 Subject: [PATCH] Also accept update_piola --- include/deal.II/matrix_free/mapping_info.templates.h | 2 +- .../deal.II/matrix_free/mapping_info_storage.templates.h | 4 +++- tests/matrix_free/matrix_vector_rt_common.h | 2 +- tests/matrix_free/matrix_vector_rt_face_common.h | 8 ++------ 4 files changed, 7 insertions(+), 9 deletions(-) diff --git a/include/deal.II/matrix_free/mapping_info.templates.h b/include/deal.II/matrix_free/mapping_info.templates.h index e514424152..c63f563e41 100644 --- a/include/deal.II/matrix_free/mapping_info.templates.h +++ b/include/deal.II/matrix_free/mapping_info.templates.h @@ -97,7 +97,7 @@ namespace internal (update_jacobian_grads | update_hessians)) != 0u || (piola_transform && ((update_flags_inner_faces | update_flags_boundary_faces) & - update_gradients) != 0u)) ? + (update_gradients | update_contravariant_transformation)) != 0u)) ? update_jacobian_grads : update_default) | update_normal_vectors | update_JxW_values | update_jacobians; diff --git a/include/deal.II/matrix_free/mapping_info_storage.templates.h b/include/deal.II/matrix_free/mapping_info_storage.templates.h index 62aa471fb8..e34d09d4e4 100644 --- a/include/deal.II/matrix_free/mapping_info_storage.templates.h +++ b/include/deal.II/matrix_free/mapping_info_storage.templates.h @@ -137,7 +137,9 @@ namespace internal // inverse Jacobians, which is what we need) if ((update_flags & update_hessians) != 0u || (update_flags & update_jacobian_grads) != 0u || - (piola_transform && (update_flags & update_gradients) != 0u)) + (piola_transform && + ((update_flags & + (update_gradients | update_contravariant_transformation)) != 0u))) new_flags |= update_jacobian_grads; if ((update_flags & update_quadrature_points) != 0u) diff --git a/tests/matrix_free/matrix_vector_rt_common.h b/tests/matrix_free/matrix_vector_rt_common.h index 40d7022da1..64798807ae 100644 --- a/tests/matrix_free/matrix_vector_rt_common.h +++ b/tests/matrix_free/matrix_vector_rt_common.h @@ -176,7 +176,7 @@ do_test(const DoFHandler & dof, const MappingQ mapping(fe_degree + 2); typename MatrixFree::AdditionalData data; data.tasks_parallel_scheme = MatrixFree::AdditionalData::none; - data.mapping_update_flags = update_gradients | update_hessians; + data.mapping_update_flags = update_gradients; mf_data.reinit(mapping, dof, constraints, quad, data); } diff --git a/tests/matrix_free/matrix_vector_rt_face_common.h b/tests/matrix_free/matrix_vector_rt_face_common.h index 39a3ffa46d..8a75ea7415 100644 --- a/tests/matrix_free/matrix_vector_rt_face_common.h +++ b/tests/matrix_free/matrix_vector_rt_face_common.h @@ -234,12 +234,8 @@ do_test(const DoFHandler & dof, const QGaussLobatto<1> quad(n_q_points); typename MatrixFree::AdditionalData data; data.tasks_parallel_scheme = MatrixFree::AdditionalData::none; - data.mapping_update_flags = - (update_gradients | update_JxW_values | update_hessians); - data.mapping_update_flags_inner_faces = - (update_gradients | update_JxW_values | update_hessians); - data.mapping_update_flags_boundary_faces = - (update_gradients | update_JxW_values | update_hessians); + data.mapping_update_flags = update_piola; + data.mapping_update_flags_inner_faces = update_contravariant_transformation; mf_data.reinit(mapping, dof, constraints, quad, data); } -- 2.39.5