aboutsummaryrefslogtreecommitdiff
path: root/Python/pywarpx/picmi.py
diff options
context:
space:
mode:
Diffstat (limited to 'Python/pywarpx/picmi.py')
-rw-r--r--Python/pywarpx/picmi.py10
1 files changed, 9 insertions, 1 deletions
diff --git a/Python/pywarpx/picmi.py b/Python/pywarpx/picmi.py
index df700a124..6ee342bdc 100644
--- a/Python/pywarpx/picmi.py
+++ b/Python/pywarpx/picmi.py
@@ -304,8 +304,16 @@ 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):
- pywarpx.warpx.use_filter = 1
+ if self.use_spectral:
+ pywarpx.warpx.use_kspace_filter = 1
+ pywarpx.warpx.use_filter_compensation = self.use_spectral_compensation
+ else:
+ pywarpx.warpx.use_filter = 1
if self.n_pass is None:
# If not specified, do at least one pass in each direction.
self.n_pass = 1