Open
Description
Description
Particle Fields do not work when using the openpmd backend in RZ geometry
(Only tested using the precompiled executable from conda
)
Minimal Example
When adding the snippet
diag1.particle_fields_to_plot = z
diag1.particle_fields_species = electrons beam
diag1.particle_fields.z(x,y,z,ux,uy,uz) = z
to
inputs_test_rz_laser_acceleration_opmd
The code instantly fails with the error
Initializing AMReX (25.02)...
OMP initialized with 8 OMP threads
AMReX (25.02) initialized
PICSAR (25.01)
WarpX (Unknown)
__ __ __ __
\ \ / /_ _ _ __ _ __\ \/ /
\ \ /\ / / _` | '__| '_ \\ /
\ V V / (_| | | | |_) / \
\_/\_/ \__,_|_| | .__/_/\_\
|_|
Level 0: dt = 1.72851157e-16 ; dx = 1.171875e-07 ; dz = 6.640625e-08
0::Assertion `ncomp_from_src == m_varnames.size()' failed, file "/Users/runner/miniforge3/conda-bld/warpx_1738873300730/work/Source/Diagnostics/FullDiagnostics.cpp", line 540 !!!
SIGABRT
See Backtrace.0.0 file for details
Backtrace
0: amrex::BLBackTrace::print_backtrace_info(__sFILE*) (in libamrex_2d.dylib) + 64
1: amrex::BLBackTrace::handler(int) (in libamrex_2d.dylib) + 640
2: amrex::Assert_host(char const*, char const*, int, char const*) (in libamrex_2d.dylib) + 268
3: FullDiagnostics::InitializeFieldFunctorsRZopenPMD(int) (in warpx.rz) + 7260
4: Diagnostics::InitData() (in warpx.rz) + 152
5: MultiDiagnostics::InitData() (in warpx.rz) + 32
6: WarpX::InitData() (in warpx.rz) + 776
7: main (in warpx.rz) + 76
8: start (in dyld) + 2840
===== TinyProfilers ======
main()
WarpX::InitData()
However, when the snippet is added to this file (i.e. the same simulation but using the plotfile output type), there us no error
inputs_test_rz_laser_acceleration
Note, this is also not an issue in cartesian geometry as WarpX/Examples/Tests/particle_fields_diags
also runs without any issue.
System information
MacOS 15.3
WarpX 25.02 via Conda