From ff48826afcc22b26f197b05fba1e7a721a04e01b Mon Sep 17 00:00:00 2001 From: heister Date: Tue, 8 Apr 2014 13:19:50 +0000 Subject: [PATCH] do not rely on cell::operator< comparing subdomain ids in meshworker::loop for ghost faces but do the check manually git-svn-id: https://svn.dealii.org/trunk@32733 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/include/deal.II/meshworker/loop.h | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/deal.II/include/deal.II/meshworker/loop.h b/deal.II/include/deal.II/meshworker/loop.h index 22110233a2..cebc7916ae 100644 --- a/deal.II/include/deal.II/meshworker/loop.h +++ b/deal.II/include/deal.II/meshworker/loop.h @@ -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()); -- 2.39.5