From d3b385c561eb3e4dd3ce0ba03a94768f16075605 Mon Sep 17 00:00:00 2001 From: Sebastian Eibl <sebastian.eibl@fau.de> Date: Mon, 9 Mar 2020 14:26:31 +0100 Subject: [PATCH] [BUGFIX] potential deadlock When processes contain no blocks after refinement the neighbor list is not correctly reset. --- src/mesa_pd/domain/BlockForestDomain.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/mesa_pd/domain/BlockForestDomain.cpp b/src/mesa_pd/domain/BlockForestDomain.cpp index 12e341fd9..cf5305270 100644 --- a/src/mesa_pd/domain/BlockForestDomain.cpp +++ b/src/mesa_pd/domain/BlockForestDomain.cpp @@ -45,11 +45,13 @@ void BlockForestDomain::refresh() periodic_[1] = blockForest_->isPeriodic(1); periodic_[2] = blockForest_->isPeriodic(2); - if (blockForest_->empty()) return; - localAABBs_.clear(); neighborSubdomains_.clear(); neighborProcesses_.clear(); + unionOfLocalAABBs_ = math::AABB(Vec3(real_t(0)), Vec3(real_t(0))); + + if (blockForest_->empty()) return; + unionOfLocalAABBs_ = blockForest_->begin()->getAABB(); for (auto& iBlk : *blockForest_) { -- GitLab