diff options
author | 2021-08-05 17:23:24 -0700 | |
---|---|---|
committer | 2021-08-05 17:23:24 -0700 | |
commit | 835f3cee646f6e7b9f679b66ea3463023225860c (patch) | |
tree | a9521c5e5775aaa07b8f1caf6b2b5c37ceef2614 /Python/pywarpx/picmi.py | |
parent | 48fa50a7d92a01061e6563fe2c52f55a0de76bb7 (diff) | |
download | WarpX-835f3cee646f6e7b9f679b66ea3463023225860c.tar.gz WarpX-835f3cee646f6e7b9f679b66ea3463023225860c.tar.zst WarpX-835f3cee646f6e7b9f679b66ea3463023225860c.zip |
Fixed bug where specifying write_dir for particle diagnostic did not work (#2167)
Diffstat (limited to 'Python/pywarpx/picmi.py')
-rw-r--r-- | Python/pywarpx/picmi.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Python/pywarpx/picmi.py b/Python/pywarpx/picmi.py index f4d7a34ed..f9495d2b5 100644 --- a/Python/pywarpx/picmi.py +++ b/Python/pywarpx/picmi.py @@ -1034,6 +1034,11 @@ class ParticleDiagnostic(picmistandard.PICMI_ParticleDiagnostic): self.diagnostic.openpmd_backend = self.openpmd_backend self.diagnostic.intervals = self.period + if self.write_dir is not None or self.file_prefix is not None: + write_dir = (self.write_dir or 'diags') + file_prefix = (self.file_prefix or self.name) + self.diagnostic.file_prefix = write_dir + '/' + file_prefix + # --- Use a set to ensure that fields don't get repeated. variables = set() |