]> https://gitweb.dealii.org/ - dealii.git/commitdiff
do not rely on cell::operator< comparing subdomain ids in meshworker::loop for ghost...
authorTimo Heister <timo.heister@gmail.com>
Tue, 8 Apr 2014 13:19:50 +0000 (13:19 +0000)
committerTimo Heister <timo.heister@gmail.com>
Tue, 8 Apr 2014 13:19:50 +0000 (13:19 +0000)
git-svn-id: https://svn.dealii.org/trunk@32733 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/include/deal.II/meshworker/loop.h

index 22110233a2c0d1c9891742a42f1d26ca7c31bc8c..cebc7916aee44db2cf2d6ef0509a0bc16fb3324c 100644 (file)
@@ -308,8 +308,9 @@ namespace MeshWorker
                   // Now neighbor is on same level, double-check this:
                   Assert(cell->level()==neighbor->level(), ExcInternalError());
 
-                  // only do faces on same level from one side (unless
-                  // LoopControl says otherwise)
+                  // If we own both cells only do faces from one side (unless
+                  // LoopControl says otherwise). Here, we rely on cell comparison
+                  // that will look at cell->index().
                   if (own_cell && own_neighbor
                       && loop_control.own_faces == LoopControl::one
                       && (neighbor < cell))
@@ -321,13 +322,13 @@ namespace MeshWorker
                   if (!own_cell)
                     continue;
 
-                  // now only one processor assembles faces_to_ghost. This
-                  // logic is based on the subdomain id and is handled inside
-                  // operator<.
+                  // now only one processor assembles faces_to_ghost. We let the
+                  // processor with the smaller (level-)subdomain id assemble the
+                  // face.
                   if (own_cell && !own_neighbor
                       && loop_control.faces_to_ghost == LoopControl::one
-                      && (neighbor < cell))
-                    continue;
+                      && (neighbid < csid))
+                        continue;
 
                   const unsigned int neighbor_face_no = cell->neighbor_face_no(face_no);
                   Assert (neighbor->face(neighbor_face_no) == face, ExcInternalError());

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.