aboutsummaryrefslogtreecommitdiff
path: root/Python/pywarpx
diff options
context:
space:
mode:
authorGravatar David Grote <grote1@llnl.gov> 2020-12-01 09:02:39 -0800
committerGravatar GitHub <noreply@github.com> 2020-12-01 09:02:39 -0800
commitae89e95c1636f28e2d88a93620c20f4c4acfbfeb (patch)
tree6d34a57626ccffbc226592bc829d8b8e6b2333fe /Python/pywarpx
parentd3c161d83a9352136edc27d38ee165ed986a8ee4 (diff)
downloadWarpX-ae89e95c1636f28e2d88a93620c20f4c4acfbfeb.tar.gz
WarpX-ae89e95c1636f28e2d88a93620c20f4c4acfbfeb.tar.zst
WarpX-ae89e95c1636f28e2d88a93620c20f4c4acfbfeb.zip
Update and fix to picmi.py (#1539)
Diffstat (limited to 'Python/pywarpx')
-rw-r--r--Python/pywarpx/picmi.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/Python/pywarpx/picmi.py b/Python/pywarpx/picmi.py
index fd4a608eb..784d9af01 100644
--- a/Python/pywarpx/picmi.py
+++ b/Python/pywarpx/picmi.py
@@ -70,6 +70,8 @@ class Species(picmistandard.PICMI_Species):
if self.mass is None:
self.mass = element.mass*periodictable.constants.atomic_mass_constant
+ self.boost_adjust_transverse_positions = kw.pop('warpx_boost_adjust_transverse_positions', None)
+
def initialize_inputs(self, layout,
initialize_self_fields = False,
injection_plane_position = None,
@@ -85,7 +87,8 @@ class Species(picmistandard.PICMI_Species):
mass = self.mass,
charge = self.charge,
injection_style = 'python',
- initialize_self_fields = int(initialize_self_fields))
+ initialize_self_fields = int(initialize_self_fields),
+ boost_adjust_transverse_positions = self.boost_adjust_transverse_positions)
pywarpx.Particles.particles_list.append(self.species)
if self.initial_distribution is not None:
@@ -314,7 +317,7 @@ class BinomialSmoother(picmistandard.PICMI_BinomialSmoother):
def initialize_inputs(self, solver):
pywarpx.warpx.use_filter = 1
- pywarpx.warpx.use_filter_compensation = np.all(self.compensation)
+ pywarpx.warpx.use_filter_compensation = bool(np.all(self.compensation))
if self.n_pass is None:
# If not specified, do at least one pass in each direction.
self.n_pass = 1