From 0252331e0622ed759cbf1b3eb485a1acb1e1f290 Mon Sep 17 00:00:00 2001 From: Doug Shi-Dong Date: Sat, 21 Sep 2019 12:35:04 -0400 Subject: [PATCH] Fix the assertion of MappingFEField's Jacobian determinant. Also add update flag to tests/mapping/mapping_fe_field_01.cc to check this assertion. --- source/fe/mapping_fe_field.cc | 3 ++- tests/mappings/mapping_fe_field_01.cc | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/source/fe/mapping_fe_field.cc b/source/fe/mapping_fe_field.cc index dae76e0614..356f519d76 100644 --- a/source/fe/mapping_fe_field.cc +++ b/source/fe/mapping_fe_field.cc @@ -838,7 +838,8 @@ namespace internal if (update_flags & update_volume_elements) { - AssertDimension(data.covariant.size(), data.volume_elements.size()); + AssertDimension(data.contravariant.size(), + data.volume_elements.size()); if (cell_similarity != CellSimilarity::translation) for (unsigned int point = 0; point < data.contravariant.size(); ++point) diff --git a/tests/mappings/mapping_fe_field_01.cc b/tests/mappings/mapping_fe_field_01.cc index 4e82d95c12..c9e1a80428 100644 --- a/tests/mappings/mapping_fe_field_01.cc +++ b/tests/mappings/mapping_fe_field_01.cc @@ -77,7 +77,8 @@ test(const unsigned int degree) FEValues fe_values(map_fe, fe_sys, quadrature_formula, - update_values | update_JxW_values); + update_values | update_JxW_values | + update_volume_elements); typename DoFHandler::active_cell_iterator cell = dof_sys -- 2.39.5