From bc80e3336084220d6cd79f0947df5f26cd047db4 Mon Sep 17 00:00:00 2001 From: Rebecca Neumann <rebecca@dune-project.org> Date: Fri, 13 May 2011 12:17:00 +0000 Subject: [PATCH] make indicessyncer compatible with ALU [[Imported from SVN: r6441]] --- dune/common/parallel/indicessyncer.hh | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/dune/common/parallel/indicessyncer.hh b/dune/common/parallel/indicessyncer.hh index c5d5590c2..ff8a92d12 100644 --- a/dune/common/parallel/indicessyncer.hh +++ b/dune/common/parallel/indicessyncer.hh @@ -523,13 +523,21 @@ namespace Dune // Search for the index in the set. assert(gIndex != global->second.end()); - while(*index < *gIndex) + while(!(index->global() == gIndex->first + && index->local().attribute() == gIndex->second)) { ++index; + // this is only needed for ALU, where there may exist + // more entries with the same global index in the remote index set + // than in the index set + if (index->global() > gIndex->first) { + index=indexSet.begin(); + } + } assert(index != indexSet.end() && *index == *gIndex); rIndex->localIndex_ = &(*index); - + ++index; ++rIndex; ++gIndex; } -- GitLab