Skip to content

Fix issue #239: remove uncalled MacProj and OutFlowBC code - #264

Merged
asalmgren merged 2 commits into
AMReX-Fluids:developmentfrom
asalmgren:fix-239
Oct 12, 2026
Merged

asalmgren merged 2 commits into
AMReX-Fluids:developmentfrom
asalmgren:fix-239

Conversation

@asalmgren

Copy link
Copy Markdown
Contributor

Fixes #239.

  • Removed the mac_sync_compute overload that takes precomputed edge states for a single scalar (MacProj.H declaration + its definition in MacProj.cpp). Nothing in Source/, Exec/ or Tutorials/ calls it — the only call to mac_sync_compute is NavierStokes::mac_sync (NavierStokes.cpp:1514), which binds the full-state overload. It was also a maintenance trap: unlike the live overload it never adds Ucorr to mac_reg, so a future caller would silently get an inconsistent MAC register.
  • Removed OutFlowBC::SemiGrow and OutFlowBC::SemiCoarsen, which have no callers; GetOutFlowFaces and HasOutFlowBC are the only members in use. Also dropped the stale class comment describing OutFlowBC as the base class of MacOutFlowBC/ProjOutFlowBC, neither of which exists any more.

Deletions of uncalled code only.

Verification

  • Exec/run2d and Exec/run3d both build clean.
  • regtest.2d.hotspot (amr.max_level = 2, so mac_sync actually runs) agrees bit-for-bit with the pre-change build on all fields at all levels (fcompare: PLOTFILE AGREE).

🤖 Generated with Claude Code

asalmgren and others added 2 commits October 12, 2026 14:13
- Remove the mac_sync_compute overload that takes precomputed edge
  states for a single scalar. Nothing in Source/, Exec/ or Tutorials/
  calls it; the only caller of mac_sync_compute is
  NavierStokes::mac_sync, which uses the full-state overload. It was
  also a maintenance trap: unlike the live overload it never adds Ucorr
  to mac_reg, so a future caller would silently get an inconsistent MAC
  register.

- Remove OutFlowBC::SemiGrow and OutFlowBC::SemiCoarsen, which have no
  callers; GetOutFlowFaces and HasOutFlowBC are the only members in use.
  Also drop the stale class comment describing OutFlowBC as the base
  class of MacOutFlowBC and ProjOutFlowBC, neither of which exists any
  more.

Deletions of uncalled code only. regtest.2d.hotspot (2 levels of
refinement, so mac_sync runs) agrees bit-for-bit with the previous code.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@asalmgren
asalmgren merged commit 4ef3bc3 into AMReX-Fluids:development Oct 12, 2026
12 checks passed
@asalmgren
asalmgren deleted the fix-239 branch October 12, 2026 21:25
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.

MacProj::mac_sync_compute (known-edge-state overload) and OutFlowBC::SemiGrow/SemiCoarsen have no callers

1 participant