aboutsummaryrefslogtreecommitdiff
path: root/Python
diff options
context:
space:
mode:
Diffstat (limited to 'Python')
-rwxr-xr-xPython/pywarpx/_libwarpx.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/Python/pywarpx/_libwarpx.py b/Python/pywarpx/_libwarpx.py
index e6e0d0282..629cecd2a 100755
--- a/Python/pywarpx/_libwarpx.py
+++ b/Python/pywarpx/_libwarpx.py
@@ -625,7 +625,7 @@ class LibWarpX():
x, y, z, ux, uy, uz, nattr, attr, unique_particles
)
- def get_particle_count(self, species_name):
+ def get_particle_count(self, species_name, local=False):
'''
This returns the number of particles of the specified species in the
@@ -635,6 +635,8 @@ class LibWarpX():
----------
species_name : the species name that the number will be returned for
+ local : If True the particle count on this processor will
+ be returned.
Returns
-------
@@ -643,7 +645,7 @@ class LibWarpX():
'''
return self.libwarpx_so.warpx_getNumParticles(
- ctypes.c_char_p(species_name.encode('utf-8'))
+ ctypes.c_char_p(species_name.encode('utf-8')), local
)
def get_particle_structs(self, species_name, level):