From: Martin Kronbichler Date: Tue, 7 Mar 2017 17:24:31 +0000 (+0100) Subject: Fix a bug in cell similarity detection after GridTools::transform X-Git-Tag: v8.5.0-rc1~51^2~3 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c48e15138bf1846b54bbba369cfe5f5167a4e735;p=dealii.git Fix a bug in cell similarity detection after GridTools::transform --- diff --git a/include/deal.II/grid/grid_tools.h b/include/deal.II/grid/grid_tools.h index a0feb09058..7b1f2e9369 100644 --- a/include/deal.II/grid/grid_tools.h +++ b/include/deal.II/grid/grid_tools.h @@ -1727,6 +1727,9 @@ namespace GridTools + cell->face(face)->vertex(2) + cell->face(face)->vertex(3)) / 4.0; } } + + // Make sure FEValues notices that the mesh has changed + triangulation.signals.post_refinement(); } diff --git a/tests/mappings/mapping_q_generic_cell_cache.cc b/tests/mappings/mapping_q_generic_cell_cache.cc index 436cdb0847..fe484c80b6 100644 --- a/tests/mappings/mapping_q_generic_cell_cache.cc +++ b/tests/mappings/mapping_q_generic_cell_cache.cc @@ -13,7 +13,7 @@ // // --------------------------------------------------------------------- -// Test high order MappingQ on a ChartManifold. +// Test cell similarity over GridTools::transform (here: scale) #include "../tests.h" @@ -34,6 +34,12 @@ int main() { initlog (); + // there used to be a bug in the cell similarity detection beyond the + // GridTools::transform method , but cell similarity is only enabled without + // threads. to make sure this test is effective, manually set the thread + // limit to 1. + MultithreadInfo::set_thread_limit(1); + Triangulation<2> triangulation; FE_DGQ<2> fe(0); QMidpoint<2> qf_cell;