diff options
author | 2023-09-06 17:04:21 -0700 | |
---|---|---|
committer | 2023-09-07 00:04:21 +0000 | |
commit | a056388af4bfb1975d55e8e8ac4af8cea68e6692 (patch) | |
tree | 74999b52a6d793ba86d3cac27a1b05f44951d43f /Python/pywarpx/picmi.py | |
parent | 2ceb85cc17503caf2d14e8866da272cf29e46c49 (diff) | |
download | WarpX-a056388af4bfb1975d55e8e8ac4af8cea68e6692.tar.gz WarpX-a056388af4bfb1975d55e8e8ac4af8cea68e6692.tar.zst WarpX-a056388af4bfb1975d55e8e8ac4af8cea68e6692.zip |
add symmetrize to PICMI (#4271)
* add symmetrize to PICMI
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* don't set defaults in PICMI - they don't matter
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Diffstat (limited to '')
-rw-r--r-- | Python/pywarpx/picmi.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Python/pywarpx/picmi.py b/Python/pywarpx/picmi.py index d1f5136bc..c7124780a 100644 --- a/Python/pywarpx/picmi.py +++ b/Python/pywarpx/picmi.py @@ -277,6 +277,10 @@ class MultiSpecies(picmistandard.PICMI_MultiSpecies): class GaussianBunchDistribution(picmistandard.PICMI_GaussianBunchDistribution): + def init(self, kw): + self.do_symmetrize = kw.pop('warpx_do_symmetrize', None) + self.symmetrization_order = kw.pop('warpx_symmetrization_order', None) + def initialize_inputs(self, species_number, layout, species, density_scale): species.injection_style = "gaussian_beam" species.x_m = self.centroid_position[0] @@ -329,6 +333,9 @@ class GaussianBunchDistribution(picmistandard.PICMI_GaussianBunchDistribution): species.uy = self.centroid_velocity[1]/constants.c species.uz = self.centroid_velocity[2]/constants.c + species.do_symmetrize = self.do_symmetrize + species.symmetrization_order = self.symmetrization_order + class DensityDistributionBase(object): """This is a base class for several predefined density distributions. It |