aboutsummaryrefslogtreecommitdiff
path: root/Source/Particles/ParticleBoundaryBuffer.cpp
diff options
context:
space:
mode:
authorGravatar Roelof Groenewald <40245517+roelof-groenewald@users.noreply.github.com> 2023-01-06 12:30:07 -0800
committerGravatar GitHub <noreply@github.com> 2023-01-06 12:30:07 -0800
commit210ef04152c6d33a64bd052918c9b501bf88cd8c (patch)
treebc6e3c33b0871b0a55b5f8d8f990d9b882ba8b3b /Source/Particles/ParticleBoundaryBuffer.cpp
parent8fb44c9eb40daada432e77963f71b3c99bcdcd3e (diff)
downloadWarpX-210ef04152c6d33a64bd052918c9b501bf88cd8c.tar.gz
WarpX-210ef04152c6d33a64bd052918c9b501bf88cd8c.tar.zst
WarpX-210ef04152c6d33a64bd052918c9b501bf88cd8c.zip
add local flag to ParticleBoundaryBuffer::getNumParticlesInContainer (#3586)
Diffstat (limited to 'Source/Particles/ParticleBoundaryBuffer.cpp')
-rw-r--r--Source/Particles/ParticleBoundaryBuffer.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/Source/Particles/ParticleBoundaryBuffer.cpp b/Source/Particles/ParticleBoundaryBuffer.cpp
index f1ee10593..a5c3bcd90 100644
--- a/Source/Particles/ParticleBoundaryBuffer.cpp
+++ b/Source/Particles/ParticleBoundaryBuffer.cpp
@@ -352,12 +352,12 @@ void ParticleBoundaryBuffer::gatherParticles (MultiParticleContainer& mypc,
}
int ParticleBoundaryBuffer::getNumParticlesInContainer(
- const std::string species_name, int boundary) {
+ const std::string species_name, int boundary, bool local) {
auto& buffer = m_particle_containers[boundary];
auto index = WarpX::GetInstance().GetPartContainer().getSpeciesID(species_name);
- if (buffer[index].isDefined()) return buffer[index].TotalNumberOfParticles(false);
+ if (buffer[index].isDefined()) return buffer[index].TotalNumberOfParticles(false, local);
else return 0;
}