From ed3f7c583f7017ea7b5c53f507bbe8026ef92a58 Mon Sep 17 00:00:00 2001 From: David Grote Date: Mon, 14 Sep 2020 11:25:41 -0700 Subject: picmi: use kspace filter automatically for RZ PSATD (#1318) --- Python/pywarpx/picmi.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'Python/pywarpx/picmi.py') 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: -- cgit v1.2.3