Skip to content

Commit 48702b4

Browse files
authored
Let selectActualNeighbors return right after starting if there are (#2886)
no particles for communication.
1 parent 6a47d89 commit 48702b4

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Src/Particle/AMReX_NeighborParticlesI.H

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -813,6 +813,11 @@ NeighborParticleContainer<NStructReal, NStructInt, NArrayReal, NArrayInt>::
813813
selectActualNeighbors (CheckPair&& check_pair, int num_cells)
814814
{
815815
BL_PROFILE("NeighborParticleContainer::selectActualNeighbors");
816+
const auto& geom_fine = this->Geom(0);
817+
const auto& ba_fine = this->ParticleBoxArray(0);
818+
if (ba_fine.size() == 1 && !geom_fine.isAnyPeriodic()) {
819+
return;
820+
}
816821

817822
for (int lev = 0; lev < this->numLevels(); ++lev)
818823
{

0 commit comments

Comments
 (0)