Fix openPMD: Do not scale unitSI 1
Avoid to scale meshes and particle records with unitSI equal to 1.0. This is often the case for non-floating point records and unintentionally casts their type to double when we mean to stay in integer or unsigned integer (e.g., particle id
) scales. This thus fixes issues with the latter and avoids unnecessary operations on large data sets.
From https://github.com/ECP-WarpX/WarpX/blob/24.07/Examples/Physics_applications/laser_acceleration/inputs_3d :
Previously, id
and regionofinterest
were cast to double
, loosing precision for very high numbers.
Backport: release
Edited by Axel Huebl