diff options
author | 2019-06-28 10:39:21 -0700 | |
---|---|---|
committer | 2019-06-28 10:39:21 -0700 | |
commit | bc3782d5a73197f18c04465c1cce02cdc2d7fc26 (patch) | |
tree | 53aa5afb2de7081754922f7b251fbbbf830a71ba /Python/pywarpx/picmi.py | |
parent | 3ef79513e8a65a2336376880fa6164869915e0e5 (diff) | |
parent | f8cac426f20599e3de4dfaf73d29ea96c4324282 (diff) | |
download | WarpX-bc3782d5a73197f18c04465c1cce02cdc2d7fc26.tar.gz WarpX-bc3782d5a73197f18c04465c1cce02cdc2d7fc26.tar.zst WarpX-bc3782d5a73197f18c04465c1cce02cdc2d7fc26.zip |
Merge branch 'dev' into RZgeometry
Diffstat (limited to 'Python/pywarpx/picmi.py')
-rw-r--r-- | Python/pywarpx/picmi.py | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/Python/pywarpx/picmi.py b/Python/pywarpx/picmi.py index 80d8e01e7..3170fef04 100644 --- a/Python/pywarpx/picmi.py +++ b/Python/pywarpx/picmi.py @@ -567,12 +567,22 @@ class FieldDiagnostic(picmistandard.PICMI_FieldDiagnostic): pywarpx.warpx.plot_finepatch = self.plot_finepatch pywarpx.warpx.plot_crsepatch = self.plot_crsepatch + if self.write_dir is not None: + plot_file = self.write_dir + '/plotfiles/plt' + pywarpx.amr.check_consistency('plot_file', plot_file, 'The plot directory must be the same for all simulation frame diagnostics') + pywarpx.warpx.plot_file = plot_file + class ElectrostaticFieldDiagnostic(picmistandard.PICMI_ElectrostaticFieldDiagnostic): def initialize_inputs(self): # --- For now, the period must be the same as plot_int if set pywarpx.amr.check_consistency('plot_int', self.period, 'The period must be the same for all simulation frame diagnostics') pywarpx.amr.plot_int = self.period + if self.write_dir is not None: + plot_file = self.write_dir + '/plotfiles/plt' + pywarpx.amr.check_consistency('plot_file', plot_file, 'The plot directory must be the same for all simulation frame diagnostics') + pywarpx.warpx.plot_file = plot_file + class ParticleDiagnostic(picmistandard.PICMI_ParticleDiagnostic): def initialize_inputs(self): @@ -587,6 +597,11 @@ class ParticleDiagnostic(picmistandard.PICMI_ParticleDiagnostic): if 'part_per_proc' in self.data_list: pywarpx.warpx.plot_part_per_proc = 1 + if self.write_dir is not None: + plot_file = self.write_dir + '/plotfiles/plt' + pywarpx.amr.check_consistency('plot_file', plot_file, 'The plot directory must be the same for all simulation frame diagnostics') + pywarpx.warpx.plot_file = plot_file + # ---------------------------- # Lab frame diagnostics @@ -598,11 +613,13 @@ class LabFrameFieldDiagnostic(picmistandard.PICMI_LabFrameFieldDiagnostic): pywarpx.warpx.check_consistency('num_snapshots_lab', self.num_snapshots, 'The number of snapshots must be the same in all lab frame diagnostics') pywarpx.warpx.check_consistency('dt_snapshots_lab', self.dt_snapshots, 'The time between snapshots must be the same in all lab frame diagnostics') + pywarpx.warpx.check_consistency('lab_data_directory', self.write_dir, 'The write directory must be the same in all lab frame diagnostics') pywarpx.warpx.do_boosted_frame_diagnostic = 1 pywarpx.warpx.num_snapshots_lab = self.num_snapshots pywarpx.warpx.dt_snapshots_lab = self.dt_snapshots pywarpx.warpx.do_boosted_frame_fields = 1 + pywarpx.warpx.lab_data_directory = self.write_dir class LabFrameParticleDiagnostic(picmistandard.PICMI_LabFrameParticleDiagnostic): @@ -610,8 +627,10 @@ class LabFrameParticleDiagnostic(picmistandard.PICMI_LabFrameParticleDiagnostic) pywarpx.warpx.check_consistency('num_snapshots_lab', self.num_snapshots, 'The number of snapshots must be the same in all lab frame diagnostics') pywarpx.warpx.check_consistency('dt_snapshots_lab', self.dt_snapshots, 'The time between snapshots must be the same in all lab frame diagnostics') + pywarpx.warpx.check_consistency('lab_data_directory', self.write_dir, 'The write directory must be the same in all lab frame diagnostics') pywarpx.warpx.do_boosted_frame_diagnostic = 1 pywarpx.warpx.num_snapshots_lab = self.num_snapshots pywarpx.warpx.dt_snapshots_lab = self.dt_snapshots pywarpx.warpx.do_boosted_frame_particles = 1 + pywarpx.warpx.lab_data_directory = self.write_dir |