ComputationalRadiationPhysics / picongpu

Performance-Portable Particle-in-Cell Simulations for the Exascale Era :sparkles:
https://picongpu.readthedocs.io
Other
710 stars 218 forks source link

PIConGPU unit system #5135

Open psychocoderHPC opened 2 months ago

psychocoderHPC commented 2 months ago

PIConGPU currently deals with three unit systems. SI, PIConGPU normalized SI units and atomic units. It would be beneficial to have a unit system to convert smoothly between all of these.

see: https://github.com/ComputationalRadiationPhysics/picongpu/pull/5133#issuecomment-2369060683

There are some requirements: Currently, we use a fully compile-time conversion system. Since we have the goal to go away from compile time unit system the new system must support runtime units based on runtime input. Additionally, the normalization should not simply shift to the device code and execute multiple multiplications, and divisions there. Conversion factors must somehow pre-computed and accessed later. A single multiplication is not an issue but multiple and decision are a showstopper.