diff options
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: |