diff --git a/src/mesa_pd/domain/InfoCollection.h b/src/mesa_pd/domain/InfoCollection.h index d7796df85a331c9bc7192795ec36a48db40174f6..be0d280ffdcc3125bc9c0d545324fd7ef4ead20b 100644 --- a/src/mesa_pd/domain/InfoCollection.h +++ b/src/mesa_pd/domain/InfoCollection.h @@ -55,23 +55,24 @@ void createWithNeighborhood(Accessor& ac, const BlockForest& bf, pe::InfoCollect ++info.computationalWeight; } - } - - for (uint_t branchID = 0; branchID < 8; ++branchID) - { - const auto childID = BlockID(block->getId(), branchID); - const auto childAABB = bf.getAABBFromBlockId(childID); - pe::BlockInfo& childInfo = ic[childID]; - if (childAABB.contains(ac.getPosition(idx))) + for (uint_t branchID = 0; branchID < 8; ++branchID) { - if (data::particle_flags::isSet( ac.getFlags(idx), data::particle_flags::GHOST)) - { - ++childInfo.communicationWeight; - } else + const auto childID = BlockID(block->getId(), branchID); + const auto childAABB = bf.getAABBFromBlockId(childID); + pe::BlockInfo& childInfo = ic[childID]; + if (childAABB.contains(ac.getPosition(idx))) { - ++childInfo.computationalWeight; + if (data::particle_flags::isSet( ac.getFlags(idx), data::particle_flags::GHOST)) + { + ++childInfo.communicationWeight; + } else + { + ++childInfo.computationalWeight; + } + break; //particle can only be located within one child } } + break; //particle can only be located within one block } } }