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) --- Python/pywarpx/_libwarpx.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'Python/pywarpx/_libwarpx.py') diff --git a/Python/pywarpx/_libwarpx.py b/Python/pywarpx/_libwarpx.py index c2c3a774b..47a0737b7 100755 --- a/Python/pywarpx/_libwarpx.py +++ b/Python/pywarpx/_libwarpx.py @@ -1042,7 +1042,7 @@ class LibWarpX(): ctypes.c_char_p(species_name.encode('utf-8')), local ) - def get_particle_boundary_buffer_size(self, species_name, boundary): + def get_particle_boundary_buffer_size(self, species_name, boundary, local=False): ''' This returns the number of particles that have been scraped so far in the simulation from the specified boundary and of the specified species. @@ -1056,11 +1056,15 @@ class LibWarpX(): boundary : str The boundary from which to get the scraped particle data in the form x/y/z_hi/lo + + local : bool + Whether to only return the number of particles in the current + processor's buffer ''' return self.libwarpx_so.warpx_getParticleBoundaryBufferSize( ctypes.c_char_p(species_name.encode('utf-8')), - self._get_boundary_number(boundary) + self._get_boundary_number(boundary), local ) def get_particle_boundary_buffer_structs(self, species_name, boundary, level): -- cgit v1.2.3