Skip to content

Commit

Permalink
Call SetNeighborIndices_ earlier
Browse files Browse the repository at this point in the history
  • Loading branch information
brryan committed Oct 4, 2024
1 parent 8600e89 commit 73481e8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/interface/swarm_comms.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -141,9 +141,6 @@ void Swarm::SetupPersistentMPI() {

const int nbmax = vbswarm->bd_var_.nbmax;

// Build up convenience array of neighbor indices
SetNeighborIndices_();

// Build device array mapping neighbor index to neighbor bufid
if (pmb->neighbors.size() > 0) {
ParArrayND<int> neighbor_buffer_index("Neighbor buffer index", pmb->neighbors.size());
Expand Down Expand Up @@ -437,6 +434,9 @@ void Swarm::AllocateComms(std::weak_ptr<MeshBlock> wpmb) {
// Enroll SwarmVariable object
vbswarm->bswarm_index = pmb->pbswarm->bswarms.size();
pmb->pbswarm->bswarms.push_back(vbswarm);

// Evaluate neigbor indices
SetNeighborIndices_();
}

} // namespace parthenon

0 comments on commit 73481e8

Please sign in to comment.