diff options
author | 2023-01-06 12:30:07 -0800 | |
---|---|---|
committer | 2023-01-06 12:30:07 -0800 | |
commit | 210ef04152c6d33a64bd052918c9b501bf88cd8c (patch) | |
tree | bc6e3c33b0871b0a55b5f8d8f990d9b882ba8b3b /Python/pywarpx/_libwarpx.py | |
parent | 8fb44c9eb40daada432e77963f71b3c99bcdcd3e (diff) | |
download | WarpX-210ef04152c6d33a64bd052918c9b501bf88cd8c.tar.gz WarpX-210ef04152c6d33a64bd052918c9b501bf88cd8c.tar.zst WarpX-210ef04152c6d33a64bd052918c9b501bf88cd8c.zip |
add local flag to ParticleBoundaryBuffer::getNumParticlesInContainer (#3586)
Diffstat (limited to 'Python/pywarpx/_libwarpx.py')
-rwxr-xr-x | Python/pywarpx/_libwarpx.py | 8 |
1 files changed, 6 insertions, 2 deletions
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): |