WarpX icon indicating copy to clipboard operation
WarpX copied to clipboard

FieldProbe: Do not Remove when Out-of-Domain

Open ax3l opened this issue 1 year ago • 2 comments

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?

ax3l avatar Aug 19 '24 23:08 ax3l

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.

atmyers avatar Aug 20 '24 15:08 atmyers

@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).

ax3l avatar Aug 21 '24 17:08 ax3l