Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Avoid interpolating from guard cells in BTD (ECP-WarpX#5342)
BTD diagnostics sometimes show artifacts at the edge of the range of collected data. (See for instance the red curve below.) My understanding is that this happens because the BTD collection planes use data from the guard cells outside of the simulation domain, when interpolating fields that are then used for the Lorentz back-transform. The guard cell data may not be physically correct (e.g. it may not have the right cancellation between `E` and `B`), and could thus cause this artifact. This PR avoids this issue by prevents the collection planes to collect data when it is half a cell from the edge of the simulation domain. See the example below, taken from ECP-WarpX#5337 (plot of the laser field, from the BTD diagnostic) ![Figure 40](https://github.com/user-attachments/assets/e4549856-4182-4a87-aa26-2d3bc6ac8e2c) The BTD diagnostics values are identical with this PR, except for the problematic point appearing at the edge of the domain.
- Loading branch information