aboutsummaryrefslogtreecommitdiff
path: root/Python/pywarpx/_libwarpx.py
diff options
context:
space:
mode:
Diffstat (limited to 'Python/pywarpx/_libwarpx.py')
-rwxr-xr-xPython/pywarpx/_libwarpx.py17
1 files changed, 17 insertions, 0 deletions
diff --git a/Python/pywarpx/_libwarpx.py b/Python/pywarpx/_libwarpx.py
index 105bfc37f..2475d8938 100755
--- a/Python/pywarpx/_libwarpx.py
+++ b/Python/pywarpx/_libwarpx.py
@@ -1048,6 +1048,23 @@ class LibWarpX():
'''
self.libwarpx_so.warpx_clearParticleBoundaryBuffer()
+ def depositChargeDensity(self, species_name, level):
+ '''
+
+ Deposit the specified species' charge density in rho_fp in order to
+ access that data via pywarpx.fields.RhoFPWrapper()
+
+ Parameters
+ ----------
+
+ species_name : the species name that will be deposited.
+ level : Which AMR level to retrieve scraped particle data from.
+
+ '''
+ self.libwarpx_so.warpx_depositChargeDensity(
+ ctypes.c_char_p(species_name.encode('utf-8')), level
+ )
+
def _get_mesh_field_list(self, warpx_func, level, direction, include_ghosts):
"""
Generic routine to fetch the list of field data arrays.