aboutsummaryrefslogtreecommitdiff
path: root/Examples/Modules/gaussian_beam/PICMI_inputs_gaussian_beam.py
diff options
context:
space:
mode:
authorGravatar David Grote <grote1@llnl.gov> 2022-06-24 00:20:19 -0700
committerGravatar GitHub <noreply@github.com> 2022-06-24 00:20:19 -0700
commitf8cf3bc6276aab1d66b32a383c2021592676d69d (patch)
tree923cac9f50a5d227785dfa7e2547159571b905bf /Examples/Modules/gaussian_beam/PICMI_inputs_gaussian_beam.py
parent6be401a3c7322e64efc91a89bf9644bca83f2db9 (diff)
downloadWarpX-f8cf3bc6276aab1d66b32a383c2021592676d69d.tar.gz
WarpX-f8cf3bc6276aab1d66b32a383c2021592676d69d.tar.zst
WarpX-f8cf3bc6276aab1d66b32a383c2021592676d69d.zip
Added `none` as an option for fields_to_plot (#2419)
* Added `none` as an option for fields_to_plot * Added CI test case * Further updates, for picmi and CI tests * Skip the call to amrex::WriteMultiLevelPlotfile when writing no fields * Now clears m_varnames_fields * Don't allocate m_mf_output if no varnames * Updated WarpX-tests.ini
Diffstat (limited to 'Examples/Modules/gaussian_beam/PICMI_inputs_gaussian_beam.py')
-rwxr-xr-xExamples/Modules/gaussian_beam/PICMI_inputs_gaussian_beam.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/Examples/Modules/gaussian_beam/PICMI_inputs_gaussian_beam.py b/Examples/Modules/gaussian_beam/PICMI_inputs_gaussian_beam.py
index fc965787f..b9d060343 100755
--- a/Examples/Modules/gaussian_beam/PICMI_inputs_gaussian_beam.py
+++ b/Examples/Modules/gaussian_beam/PICMI_inputs_gaussian_beam.py
@@ -10,6 +10,11 @@ parser = argparse.ArgumentParser(description="Gaussian beam PICMI example")
parser.add_argument('--diagformat', type=str,
help='Format of the full diagnostics (plotfile, openpmd, ascent, sensei, ...)',
default='plotfile')
+parser.add_argument('--fields_to_plot', type=str,
+ help='List of fields to write to diagnostics',
+ default=['E', 'B', 'J', 'part_per_cell'],
+ nargs = '*')
+
args = parser.parse_args()
constants = picmi.constants
@@ -59,7 +64,7 @@ protons = picmi.Species(particle_type='proton', name='protons', initial_distribu
field_diag1 = picmi.FieldDiagnostic(name = 'diag1',
grid = grid,
period = 10,
- data_list = ['E', 'B', 'J', 'part_per_cell'],
+ data_list = args.fields_to_plot,
warpx_format = args.diagformat,
write_dir = '.',
warpx_file_prefix = 'Python_gaussian_beam_plt')