Skip to content

Commit

Permalink
Let selectActualNeighbors return right after starting if there are (A…
Browse files Browse the repository at this point in the history
…MReX-Codes#2886)

no particles for communication.
  • Loading branch information
hengjiew committed Jul 28, 2022
1 parent 6a47d89 commit 48702b4
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Src/Particle/AMReX_NeighborParticlesI.H
Original file line number Diff line number Diff line change
Expand Up @@ -813,6 +813,11 @@ NeighborParticleContainer<NStructReal, NStructInt, NArrayReal, NArrayInt>::
selectActualNeighbors (CheckPair&& check_pair, int num_cells)
{
BL_PROFILE("NeighborParticleContainer::selectActualNeighbors");
const auto& geom_fine = this->Geom(0);
const auto& ba_fine = this->ParticleBoxArray(0);
if (ba_fine.size() == 1 && !geom_fine.isAnyPeriodic()) {
return;
}

for (int lev = 0; lev < this->numLevels(); ++lev)
{
Expand Down

0 comments on commit 48702b4

Please sign in to comment.