Skip to content

Commit

Permalink
add ignore_unused
Browse files Browse the repository at this point in the history
  • Loading branch information
asalmgren committed Mar 11, 2024
1 parent a6466d2 commit 6d7b1b8
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions Src/AmrCore/AMReX_Interp_C.H
Original file line number Diff line number Diff line change
Expand Up @@ -96,16 +96,20 @@ face_cons_linear_face_interp (int i, int j, int k, int n, Array4<T> const& fine,
IntVect const& ratio, Box const& per_grown_domain, int dim) noexcept
{
int ci = amrex::coarsen(i, ratio[0]);
#if (AMREX_SPACEDIM >= 2)
int cj = amrex::coarsen(j, ratio[1]);
#else

#if (AMREX_SPACEDIM == 1)
amrex::ignore_unused(per_grown_domain);
int cj = 0;
#else
int cj = amrex::coarsen(j, ratio[1]);
#endif

#if (AMREX_SPACEDIM == 3)
int ck = amrex::coarsen(k, ratio[2]);
#else
int ck = 0;
#endif

if (dim == 0 && ci*ratio[0] == i) {
// Check solve mask to ensure we don't overwrite valid fine data.
if (!mask || mask(ci, cj, ck, n)) {
Expand Down

0 comments on commit 6d7b1b8

Please sign in to comment.