WarpX
WarpX copied to clipboard
FieldProbe: Do not Remove when Out-of-Domain
Not exactly the issue in https://github.com/ECP-WarpX/WarpX/discussions/4502 , but there might be a use case for field probes entering or leaving the domain at certain times.
For instance, in a moving window simulation we might want to have stationary field probes at a certain z position, which is not initially in the simulation box. Supporting this means we need to carefully guard out-of-bounds probes from taking part in the interplation operations and not removing them during AMReX redistribute.
@atmyers any idea how we could do this?
The easiest way would be to initialize the field probes in a staging PC first, then filter / copy the ones that intersect the domain into an "active" PC once we want them to participate in the interpolation and redistribution operations.
Alternatively, we could maybe reuse some of the plasma injection functionality to only create them once they would enter the domain.
@RemiLehe mentioned that the plasma injector also handles similar cases. The logic we do for antennas is also handling similar scenarios (but is a bit more specialized, only supports normal to z).