Open
Description
When switching from using the WarpX executable to using Python/PICMI (e.g. in order to take advantage of the Python callback functions), users usually have to rewrite their input script from scratch. (i.e. switching from the input script syntax to the PICMI syntax)
This is often time consuming and error prone. Instead it could be useful to have the option to load an input script in Python, e.g.:
sim = Simulation.from_input_script( './inputs_3d' ) # loads an existing input script
installcallback('afterstep', myplots) # optional: add callback function
sim.step() # runs the simulation
One could use a syntax similar to the one in ImpactX:
https://github.com/ECP-WarpX/impactx/blob/24.09/src/python/ImpactX.cpp#L79
which relies on:
https://github.com/AMReX-Codes/pyamrex/blob/development/src/Base/ParmParse.cpp#L33
See also:
AMReX-Codes/amrex#4156