EB: make face-centered EB data nodal in face_dir throughout - #5637
Merged
WeiqunZhang merged 2 commits intoAug 27, 2026
Conversation
A face-centered box holds one more staggered cell than it holds cell-centered cells, and nodal is how that is expressed. areafrac, facecent and the edge centroids across the stagger were cell-typed, so their last staggered cell fell in the ghost region, out of reach of the ParallelCopy in fill*FC, and the covered-region mask added in AMReX-Codes#5636 cleared that plane with nothing able to write it back. The edge centroid along face_dir had the converse defect: coarsen_from_fine shrinks its box back to cell, so its top plane was never written and kept the 1.0 of a fully open edge, which then overwrote the mask inside the body. One rule now -- face_dir nodal, the other directions as in the cell-centered path -- plus the face_dir edge box grown back to the staggered range it is indexed by. The value at a given index does not move; the last staggered cell of each box becomes valid data the copy can deliver. The same geometry built with one EB box and with many now agrees in every field, where the edge centroid along face_dir used to differ at 1633-3844 cells. Addresses issue 1 in AMReX-Codes#5635, on top of AMReX-Codes#5636.
asalmgren
approved these changes
Aug 27, 2026
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.
A face-centered box holds one more staggered cell than it holds cell-centered cells, and nodal is how that is expressed. areafrac, facecent and the edge centroids across the stagger were cell-typed, so their last staggered cell fell in the ghost region, out of reach of the ParallelCopy in fill*FC, and the covered-region mask added in #5636 cleared that plane with nothing able to write it back. The edge centroid along face_dir had the converse defect: coarsen_from_fine shrinks its box back to cell, so its top plane was never written and kept the 1.0 of a fully open edge, which then overwrote the mask inside the body.
One rule now -- face_dir nodal, the other directions as in the cell-centered path -- plus the face_dir edge box grown back to the staggered range it is indexed by. The value at a given index does not move; the last staggered cell of each box becomes valid data the copy can deliver. The same geometry built with one EB box and with many now agrees in every field, where the edge centroid along face_dir used to differ at 1633-3844 cells.
Addresses issue 1 in #5635, on top of #5636.