]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Fix a bug in cell similarity detection after GridTools::transform
authorMartin Kronbichler <kronbichler@lnm.mw.tum.de>
Tue, 7 Mar 2017 17:24:31 +0000 (18:24 +0100)
committerMartin Kronbichler <kronbichler@lnm.mw.tum.de>
Tue, 7 Mar 2017 17:24:31 +0000 (18:24 +0100)
include/deal.II/grid/grid_tools.h
tests/mappings/mapping_q_generic_cell_cache.cc

index a0feb090583f1d3156cca53e08f7ac0900ee73dc..7b1f2e9369961b0fe1d16e1c46696ca9b47c908e 100644 (file)
@@ -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();
   }
 
 
index 436cdb08473a3b30007d666cda51e5b8a65e007c..fe484c80b6d017af855e02eaff8311041a09fc39 100644 (file)
@@ -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;

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.