From 210ef04152c6d33a64bd052918c9b501bf88cd8c Mon Sep 17 00:00:00 2001 From: Roelof Groenewald <40245517+roelof-groenewald@users.noreply.github.com> Date: Fri, 6 Jan 2023 12:30:07 -0800 Subject: add local flag to ParticleBoundaryBuffer::getNumParticlesInContainer (#3586) --- Source/Particles/ParticleBoundaryBuffer.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Source/Particles/ParticleBoundaryBuffer.cpp') 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; } -- cgit v1.2.3