diff options
author | 2022-11-09 11:29:57 -0800 | |
---|---|---|
committer | 2022-11-09 19:29:57 +0000 | |
commit | 3e98c31a491fb438cb98692c7a62dbcdd717c39b (patch) | |
tree | f9da28c9351338b5253bf86b80561fc92ad9f09a /Python/pywarpx/picmi.py | |
parent | 6beaa9fc0f5a68694d8dfbb70d6eae01446e4490 (diff) | |
download | WarpX-3e98c31a491fb438cb98692c7a62dbcdd717c39b.tar.gz WarpX-3e98c31a491fb438cb98692c7a62dbcdd717c39b.tar.zst WarpX-3e98c31a491fb438cb98692c7a62dbcdd717c39b.zip |
BTD: remove old/legacy back-transformed diagnostics (#3485)
* Start removing old BTD
* Remove GetCellCenteredData
* Remove do_backtransform_fields and do_backtransform_particles
* Remove more functions
* Remove more variables
* Update documentation
* Fix CI test `RigidInjection_BTD`
* Remove slicing from `BTD_ReducedSliceDiag`
* Rename `BTD_ReducedSliceDiag` as `LaserAcceleration_BTD`
* Query deprecated input and abort
Co-authored-by: Edoardo Zoni <ezoni@lbl.gov>
Diffstat (limited to 'Python/pywarpx/picmi.py')
-rw-r--r-- | Python/pywarpx/picmi.py | 63 |
1 files changed, 8 insertions, 55 deletions
diff --git a/Python/pywarpx/picmi.py b/Python/pywarpx/picmi.py index c112f0157..30b9f4c7c 100644 --- a/Python/pywarpx/picmi.py +++ b/Python/pywarpx/picmi.py @@ -1922,9 +1922,6 @@ class LabFrameFieldDiagnostic(picmistandard.PICMI_LabFrameFieldDiagnostic, Parameters ---------- - warpx_new_BTD: bool, optional - Use the new BTD diagnostics - warpx_format: string, optional Passed to <diagnostic name>.format @@ -1947,36 +1944,16 @@ class LabFrameFieldDiagnostic(picmistandard.PICMI_LabFrameFieldDiagnostic, Passed to <diagnostic name>.upper_bound """ def init(self, kw): - self.use_new_BTD = kw.pop('warpx_new_BTD', False) - if self.use_new_BTD: - # The user is using the new BTD - self.format = kw.pop('warpx_format', None) - self.openpmd_backend = kw.pop('warpx_openpmd_backend', None) - self.file_prefix = kw.pop('warpx_file_prefix', None) - self.file_min_digits = kw.pop('warpx_file_min_digits', None) - self.buffer_size = kw.pop('warpx_buffer_size', None) - self.lower_bound = kw.pop('warpx_lower_bound', None) - self.upper_bound = kw.pop('warpx_upper_bound', None) + # The user is using the new BTD + self.format = kw.pop('warpx_format', None) + self.openpmd_backend = kw.pop('warpx_openpmd_backend', None) + self.file_prefix = kw.pop('warpx_file_prefix', None) + self.file_min_digits = kw.pop('warpx_file_min_digits', None) + self.buffer_size = kw.pop('warpx_buffer_size', None) + self.lower_bound = kw.pop('warpx_lower_bound', None) + self.upper_bound = kw.pop('warpx_upper_bound', None) def initialize_inputs(self): - if self.use_new_BTD: - self.initialize_inputs_new() - else: - self.initialize_inputs_old() - - def initialize_inputs_old(self): - - 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_back_transformed_diagnostics = 1 - pywarpx.warpx.num_snapshots_lab = self.num_snapshots - pywarpx.warpx.dt_snapshots_lab = self.dt_snapshots - pywarpx.warpx.do_back_transformed_fields = 1 - pywarpx.warpx.lab_data_directory = self.write_dir - - def initialize_inputs_new(self): self.add_diagnostic() @@ -2025,30 +2002,6 @@ class LabFrameFieldDiagnostic(picmistandard.PICMI_LabFrameFieldDiagnostic, self.set_write_dir() - -class LabFrameParticleDiagnostic(picmistandard.PICMI_LabFrameParticleDiagnostic): - def initialize_inputs(self): - - 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_back_transformed_diagnostics = 1 - - if isinstance(self.species, Species): - self.species.do_back_transformed_diagnostics = 1 - else: - try: - for specie in self.species: - specie.do_back_transformed_diagnostics = 1 - except TypeError: - pass - - pywarpx.warpx.num_snapshots_lab = self.num_snapshots - pywarpx.warpx.dt_snapshots_lab = self.dt_snapshots - pywarpx.warpx.lab_data_directory = self.write_dir - - class ReducedDiagnostic(picmistandard.base._ClassWithInit, WarpXDiagnosticBase): """ Sets up a reduced diagnostic in the simulation. |