Skip to content

Fix access to global_debye_length with tiling - #7222

Merged
dpgrote merged 1 commit into
BLAST-WarpX:developmentfrom
dpgrote:fix_global_debye_with_tiling
Aug 28, 2026
Merged

Fix access to global_debye_length with tiling#7222
dpgrote merged 1 commit into
BLAST-WarpX:developmentfrom
dpgrote:fix_global_debye_with_tiling

Conversation

@dpgrote

@dpgrote dpgrote commented Aug 28, 2026

Copy link
Copy Markdown
Member

The calculation of the global Debye length during binary collisions was added in PR #5763. It was recently realized that the access was being done incorrectly, not taking into account that the MFIter loop was using tiling. With tiling, the i_cell index is relative to the tile and cannot be directly used to access MultiFab data. The fix is to use the global_index that was add in PR #6954.

Note that this error was not detected since the CI test does not use tiling.

@dpgrote
dpgrote requested a review from JustinRayAngus August 28, 2026 20:25
@EZoni

EZoni commented Aug 28, 2026

Copy link
Copy Markdown
Member

Note that this error was not detected since the CI test uses a domain uniformly filled with plasma so accessing the global Debye length data at the wrong cell index did not have a significant effect on the results since it will also be uniform.

By chance, do you know if there is an easy way to modify the CI test such that the plasma doesn't fill the domain uniformly (so as to catch bugs like the one fixed in this PR going forward)?

@EZoni
EZoni self-requested a review August 28, 2026 21:03
@EZoni EZoni added bug Something isn't working bug: affects latest release Bug also exists in latest release version component: diagnostics all types of outputs labels Aug 28, 2026
@dpgrote

dpgrote commented Aug 28, 2026

Copy link
Copy Markdown
Member Author

Note that this error was not detected since the CI test uses a domain uniformly filled with plasma so accessing the global Debye length data at the wrong cell index did not have a significant effect on the results since it will also be uniform.

By chance, do you know if there is an easy way to modify the CI test such that the plasma doesn't fill the domain uniformly (so as to catch bugs like the one fixed in this PR going forward)?

@EZoni The test could be added, but would require somewhat significant change to the existing test.

@dpgrote
dpgrote merged commit 95e9722 into BLAST-WarpX:development Aug 28, 2026
51 checks passed
@dpgrote
dpgrote deleted the fix_global_debye_with_tiling branch August 28, 2026 23:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug: affects latest release Bug also exists in latest release version bug Something isn't working component: diagnostics all types of outputs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants