Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avoid interpolating from guard cells in BTD #5342

Merged
merged 2 commits into from
Oct 11, 2024

Conversation

RemiLehe
Copy link
Member

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 #5337 (plot of the laser field, from the BTD diagnostic)
Figure 40
The BTD diagnostics values are identical with this PR, except for the problematic point appearing at the edge of the domain.

@RemiLehe RemiLehe added the component: boosted frame boosted frame components & logic label Sep 30, 2024
Copy link
Member

@RevathiJambunathan RevathiJambunathan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great!
Thank you for the PR!

@RevathiJambunathan RevathiJambunathan added the component: diagnostics all types of outputs label Oct 11, 2024
@RemiLehe RemiLehe merged commit 3cda2c1 into ECP-WarpX:development Oct 11, 2024
37 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: boosted frame boosted frame components & logic component: diagnostics all types of outputs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants