diff options
author | 2020-09-14 11:25:41 -0700 | |
---|---|---|
committer | 2020-09-14 11:25:41 -0700 | |
commit | ed3f7c583f7017ea7b5c53f507bbe8026ef92a58 (patch) | |
tree | ab36a1142f6d97e0221b1212c7aef3ee3ca51eda /Python/pywarpx/picmi.py | |
parent | 15ede66769e86a2d425714fee0bf1c75a870460d (diff) | |
download | WarpX-ed3f7c583f7017ea7b5c53f507bbe8026ef92a58.tar.gz WarpX-ed3f7c583f7017ea7b5c53f507bbe8026ef92a58.tar.zst WarpX-ed3f7c583f7017ea7b5c53f507bbe8026ef92a58.zip |
picmi: use kspace filter automatically for RZ PSATD (#1318)
Diffstat (limited to '')
-rw-r--r-- | Python/pywarpx/picmi.py | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/Python/pywarpx/picmi.py b/Python/pywarpx/picmi.py index ab90b923a..30dc3534c 100644 --- a/Python/pywarpx/picmi.py +++ b/Python/pywarpx/picmi.py @@ -303,14 +303,13 @@ class PseudoRandomLayout(picmistandard.PICMI_PseudoRandomLayout): class BinomialSmoother(picmistandard.PICMI_BinomialSmoother): - def init(self, kw): - self.use_spectral = kw.pop('warpx_kspace_filter', None) - self.use_spectral_compensation = kw.pop('warpx_kspace_filter_compensation', None) def initialize_inputs(self, solver): - if self.use_spectral: + use_spectral = solver.method == 'PSATD' and isinstance(solver.grid, picmistandard.PICMI_CylindricalGrid) + if use_spectral: pywarpx.warpx.use_kspace_filter = 1 - pywarpx.warpx.use_filter_compensation = self.use_spectral_compensation + if self.compensation is not None: + pywarpx.warpx.use_filter_compensation = self.compensation[0] and self.compensation[1] else: pywarpx.warpx.use_filter = 1 if self.n_pass is None: |