Skip to content

EB state redistribution: Fix Itracker abort with vfrac fallback - #5630

Merged
WeiqunZhang merged 9 commits into
AMReX-Codes:developmentfrom
skang67:extend-Itracker-clean
Aug 27, 2026
Merged

EB state redistribution: Fix Itracker abort with vfrac fallback#5630
WeiqunZhang merged 9 commits into
AMReX-Codes:developmentfrom
skang67:extend-Itracker-clean

Conversation

@skang67

@skang67 skang67 commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

Summary

This PR adds a volume-fraction-based fallback pathway in the itracker construction for EB state redistribution when the original normal-based neighbor selection fails.

Problem

  • State redistribution merges cutcells with neighbors to achieve target volume. Currently, neighbors are selected based on the EB normal direction, and the selected local indices are stored in itracker array. This is a geometrically reasonable approach when the normal vector accurately represents local EB topology.
  • However, when the EB is poorly resolved or cells have limited connectivity (e.g., cells near the tip of a narrow canyon), the normal-based selection can point to a covered cell (vfrac=0). The current code aborts in this situation with Abort: Trying to merge with covered cell.
  • This stops simulations even when valid merge targets exist in other directions.

Solution

  • This PR adds a fallback selection strategy that activates only when the normal-based method fails.
  • The additional selection method chooses the primary and secondary merge target with the largest volume fraction.
  • The implementation has no impact on existing simulations, because it preserves the original normal-based logic when it succeeds.

Validation

  • Tested on an ERF application with complex urban geometry. This enables redistribution in previously-aborting cases.

The proposed changes:

  • fix a bug or incorrect behavior in AMReX
  • add new capabilities to AMReX
  • changes answers in the test suite to more than roundoff level
  • are likely to significantly affect the results of downstream AMReX users
  • include documentation in the code and/or rst files, if appropriate

@skang67 skang67 changed the title Extend itracker clean EB state redistribution: Add vfrac fallback to Itracker Aug 20, 2026
@skang67 skang67 changed the title EB state redistribution: Add vfrac fallback to Itracker EB state redistribution: Fix Itracker abort with vfrac fallback Aug 20, 2026
@WeiqunZhang
WeiqunZhang merged commit 927f8ac into AMReX-Codes:development Aug 27, 2026
75 checks passed
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.

3 participants