]> https://gitweb.dealii.org/ - dealii.git/commitdiff
reset the CopyData object
authorTimo Heister <timo.heister@gmail.com>
Sun, 13 Aug 2017 22:13:34 +0000 (16:13 -0600)
committerTimo Heister <timo.heister@gmail.com>
Sun, 13 Aug 2017 22:13:34 +0000 (16:13 -0600)
include/deal.II/meshworker/mesh_loop.h

index d53249613ec0690b16b0c8192f41df2c366f8294..51a7f756a9c3e9249aea86a5e8e60010aa08e61c 100644 (file)
@@ -158,9 +158,11 @@ namespace MeshWorker
     Assert((!boundary_worker) == !(flags & assemble_boundary_faces),
            ExcMessage("If you specify a boundary_worker, assemble_boundary_faces needs to be set."));
 
-
     auto cell_action = [&] (const CellIteratorType &cell, ScratchData &scratch, CopyData &copy)
     {
+      // First reset the CopyData class to the empty copy_data given by the user.
+      copy = copy_data;
+
       const bool ignore_subdomain = (cell->get_triangulation().locally_owned_subdomain()
                                      == numbers::invalid_subdomain_id);
 

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.