ablastr: replace protected n_grow member with public nGrowVect()#6728
Merged
roelof-groenewald merged 1 commit intoBLAST-WarpX:developmentfrom Mar 31, 2026
Conversation
FillBoundary (MultiFab&, ...) was reading the guard-cell vector via mf.n_grow, a protected data member of AMReX's FabArrayBase that is not part of the public API. Recent AMReX releases tightened encapsulation, causing build failures. Replace with the public accessor mf.nGrowVect(), which is already used everywhere else in the same file. Fixes BLAST-WarpX#6642 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Member
lucafedeli88
left a comment
There was a problem hiding this comment.
Note that this in not actually a bug: n_grow is not a protected member of its class as Claude claims. However, the intent is probably to make it protected at some point, since there is this comment in the source file:
//#ifndef AMREX_USE_GPU
//protected:
//#endif
which means that mf.nGrowVect() may be preferable with respect to mf.n_grow . Can you confirm this, @WeiqunZhang ?
Member
|
Yes |
2b43fcd
into
BLAST-WarpX:development
48 of 49 checks passed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
ablastr::utils::communication::FillBoundary(MultiFab&, ...)was reading the guard-cell vector viamf.n_grow, aprotecteddata member of AMReX'sFabArrayBasethat is not part of the public API. Recent AMReX releases tightened encapsulation, causing build failures with newer AMReX snapshots. All other call sites in the same file already use the public accessormf.nGrowVect().Fix
Replace
mf.n_growwithmf.nGrowVect().Fixes #6642
Test plan
🤖 Generated with Claude Code