aboutsummaryrefslogtreecommitdiff
path: root/Python/pywarpx/picmi.py
diff options
context:
space:
mode:
authorGravatar Roelof Groenewald <40245517+roelof-groenewald@users.noreply.github.com> 2021-08-27 11:39:37 -0700
committerGravatar GitHub <noreply@github.com> 2021-08-27 18:39:37 +0000
commita4c2b99651cbac22ccbf2b0f3e1441c61e639009 (patch)
tree70b02853bf86467af24808ba442526d1b21c383e /Python/pywarpx/picmi.py
parent7975a739038724fe0ca6d5c9f3c4454cc78bf83b (diff)
downloadWarpX-a4c2b99651cbac22ccbf2b0f3e1441c61e639009.tar.gz
WarpX-a4c2b99651cbac22ccbf2b0f3e1441c61e639009.tar.zst
WarpX-a4c2b99651cbac22ccbf2b0f3e1441c61e639009.zip
Functionality to save particle positions from the previous step (#2206)
* added functionality to save particle positions from the previous step * copied WarpX variable to local variable to fix issue with GPU and DPC++ compilation * switched to using a species attribute to toggle whether previous positions are saved so it can be turned on for only a subset of species if desired * changed variable name to be more verbose * added CI test of saving the previous particle positions * start of a table in the documentation to describe commonly used runtime attributes * generate test benchmark data from results obtained with a 2 processor run - the same as what is done during the test * relaxed tolerance on test * regenerate CI test reference data with USE_PSATD=TRUE * Update Docs/source/developers/particles.rst Co-authored-by: Phil Miller <unmobile+gh@gmail.com> Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja>
Diffstat (limited to 'Python/pywarpx/picmi.py')
-rw-r--r--Python/pywarpx/picmi.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/Python/pywarpx/picmi.py b/Python/pywarpx/picmi.py
index 3f483c8b6..e68636b89 100644
--- a/Python/pywarpx/picmi.py
+++ b/Python/pywarpx/picmi.py
@@ -83,6 +83,7 @@ class Species(picmistandard.PICMI_Species):
self.self_fields_required_precision = kw.pop('warpx_self_fields_required_precision', None)
self.self_fields_max_iters = kw.pop('warpx_self_fields_max_iters', None)
self.self_fields_verbosity = kw.pop('warpx_self_fields_verbosity', None)
+ self.save_previous_position = kw.pop('warpx_save_previous_position', None)
def initialize_inputs(self, layout,
initialize_self_fields = False,
@@ -106,7 +107,8 @@ class Species(picmistandard.PICMI_Species):
boost_adjust_transverse_positions = self.boost_adjust_transverse_positions,
self_fields_required_precision = self.self_fields_required_precision,
self_fields_max_iters = self.self_fields_max_iters,
- self_fields_verbosity = self.self_fields_verbosity)
+ self_fields_verbosity = self.self_fields_verbosity,
+ save_previous_position = self.save_previous_position)
pywarpx.Particles.particles_list.append(self.species)
if self.initial_distribution is not None: