diff --git a/python/mesa_pd/templates/mpi/SyncNextNeighbors.templ.cpp b/python/mesa_pd/templates/mpi/SyncNextNeighbors.templ.cpp index 4765e4f135d8ce13d33e8113f9571e6cce37e957..0f3350604f5b058561beb5e68f909d9e74592999 100644 --- a/python/mesa_pd/templates/mpi/SyncNextNeighbors.templ.cpp +++ b/python/mesa_pd/templates/mpi/SyncNextNeighbors.templ.cpp @@ -123,7 +123,7 @@ void SyncNextNeighbors::generateSynchronizationMessages(data::ParticleStorage& p continue; } - if (domain.isContainedInLocalSubdomain(pIt->getPosition(), pIt->getInteractionRadius())) + if (domain.isContainedInLocalSubdomain(pIt->getPosition(), pIt->getInteractionRadius() + dx)) { //no sync needed //just delete ghost particles if there are any diff --git a/src/mesa_pd/mpi/SyncNextNeighbors.cpp b/src/mesa_pd/mpi/SyncNextNeighbors.cpp index bdbfc24ebedf6bcc665faa08a64a73632e18f654..4d5ef12cd2747e6aa6e7c853b24598369f7ddc5f 100644 --- a/src/mesa_pd/mpi/SyncNextNeighbors.cpp +++ b/src/mesa_pd/mpi/SyncNextNeighbors.cpp @@ -123,7 +123,7 @@ void SyncNextNeighbors::generateSynchronizationMessages(data::ParticleStorage& p continue; } - if (domain.isContainedInLocalSubdomain(pIt->getPosition(), pIt->getInteractionRadius())) + if (domain.isContainedInLocalSubdomain(pIt->getPosition(), pIt->getInteractionRadius() + dx)) { //no sync needed //just delete ghost particles if there are any