Skip to content

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

Description

@WeiqunZhang

Location: Source/MacProj.H:72-80, Source/MacProj.cpp:749-802, Source/OutFlowBC.H:16-22, Source/OutFlowBC.cpp:9-27
Severity: Low — dead code
Category: Docs
Based on commit bb697bf5 (line numbers refer to that tree).

Problem

The second mac_sync_compute overload, which takes precomputed edge states for a single
scalar, is not called anywhere in Source/, Exec/ or Tutorials/; the only call is
the full-state overload from NavierStokes::mac_sync (Source/NavierStokes.cpp:1486).
Its header comment still describes a use case from another code ("div rho U h ...").
#204 kept it compiling by aliasing Sync as the state MultiFab handed to ComputeAofs:

// Source/MacProj.cpp:787-794
    MultiFab Smf(Sync, amrex::make_alias, Sync_indx, ncomp);
    ...
    ns_level.ComputeAofs(Sync, /*Ssync_comp*/ Sync_indx, state_comp,
                         ncomp,
                         /*State*/ Smf, /*S_comp*/ 0,           //not used when known_edgestates

so the function now exists only to be maintained. Likewise OutFlowBC::SemiGrow and
OutFlowBC::SemiCoarsen (Source/OutFlowBC.cpp:9-27) are unreferenced; the only
OutFlowBC members in use are GetOutFlowFaces and HasOutFlowBC.

Impact

None at run time. The unused overload is a maintenance trap: it does not add Ucorr to
mac_reg the way the live overload does (Source/MacProj.cpp:723-738), so a future
caller would silently get an inconsistent MAC register.

Suggested fix

Remove the overload (Source/MacProj.H:72-80, Source/MacProj.cpp:741-802) and
SemiGrow/SemiCoarsen (Source/OutFlowBC.H:16-22, Source/OutFlowBC.cpp:9-27).
Plain deletions; no diff given.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions