WarpX
WarpX copied to clipboard
Add 1d support to `_libwarpx.py` functions `get_particle_X`
The handy libwarpx functions to get particle coordinates do not yet support 1d simulations. This PR adds that support.
One thing that might need some discussion is how to treat dimensions not included in the coordinate system chosen. For example, if get_particle_y()
is called in 2d the previous implementation was to return the same coordinate as when calling get_particle_z()
. But if get_particle_r()
was called in a 2d Cartesian simulation an exception was raised saying r is not defined in 2d Cartesian.