Open
Description
Problem Description
For scenarios such as HEP LWFA/PWFA ionization injection (and any injection that is non-external), QED beam collisions & radiation generation, etc. we often need to know where newly generated particles originated.
Generally, we add a runtime attribute orig_x/y/z
to particles that stores position_x/y/z
at t=0
of the simulation. When generating electrons and photons during the simulation (t>0
) with ionization & qed, we cannot yet store their position at generation.
What Needs to be Done First
We need to implement a more general version of SmartCopy
, which is used in ionization and QED physics.
- Smart Copy copies matching attributes, and default-initializes all other attributes in the destination particle.
- We would need a policy (runtime or compile-time) that allows us to do custom initialization in the destination particle.
- In particular, we need a method to init the dest runtime attributes
orig_x/y/z
with srcposition_x/y/z
on particle creation.
Files that implement these routines:
- https://github.com/ECP-WarpX/WarpX/blob/development/Source/Particles/ParticleCreation/SmartCopy.H
- https://github.com/ECP-WarpX/WarpX/blob/development/Source/Particles/ParticleCreation/DefaultInitialization.H
What Will be Follow-Up Tasks
- Update ionization and QED generation logic to support this.