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.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/Python/pywarpx/picmi.py b/Python/pywarpx/picmi.py
index e4f0b8651..374cbc962 100644
--- a/Python/pywarpx/picmi.py
+++ b/Python/pywarpx/picmi.py
@@ -1064,6 +1064,7 @@ class Checkpoint(picmistandard.base._ClassWithInit):
self.period = period
self.write_dir = write_dir
+ self.file_prefix = kw.pop('warpx_file_prefix', None)
self.name = name
if self.name is None:
@@ -1083,6 +1084,10 @@ class Checkpoint(picmistandard.base._ClassWithInit):
self.diagnostic.diag_type = 'Full'
self.diagnostic.format = 'checkpoint'
+ 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
class ParticleDiagnostic(picmistandard.PICMI_ParticleDiagnostic):
def init(self, kw):