Skip to content

EB: make face-centered EB data nodal in face_dir throughout - #5637

Merged
WeiqunZhang merged 2 commits into
AMReX-Codes:developmentfrom
WeiqunZhang:fc-eb-areafrac-extent
Aug 27, 2026
Merged

EB: make face-centered EB data nodal in face_dir throughout#5637
WeiqunZhang merged 2 commits into
AMReX-Codes:developmentfrom
WeiqunZhang:fc-eb-areafrac-extent

Conversation

@WeiqunZhang

Copy link
Copy Markdown
Member

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.

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.
@WeiqunZhang
WeiqunZhang requested a review from asalmgren August 21, 2026 21:46
@WeiqunZhang
WeiqunZhang merged commit 8b773b2 into AMReX-Codes:development Aug 27, 2026
75 checks passed
@WeiqunZhang
WeiqunZhang deleted the fc-eb-areafrac-extent branch August 27, 2026 19:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants