Skip to content

Commit

Permalink
change interface for flux registers in LES due to warning
Browse files Browse the repository at this point in the history
  • Loading branch information
baperry2 committed Jun 21, 2024
1 parent 228a1aa commit da8e523
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 9 deletions.
22 changes: 14 additions & 8 deletions Source/LES.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -215,14 +215,12 @@ PeleC::updateFluxRegistersLES(
amrex::Real dt,
const amrex::MFIter& mfi,
amrex::FabType typ,
amrex::FArrayBox flux_ec[AMREX_SPACEDIM])
const std::array<amrex::FArrayBox const*, AMREX_SPACEDIM>& flux_ec)
{
if (do_reflux && reflux_factor != 0) {
amrex::FArrayBox dm_as_fine(
amrex::Box::TheUnitBox(), LESTerm.nComp(), amrex::The_Async_Arena());
update_flux_registers(
reflux_factor * dt, mfi, typ,
{AMREX_D_DECL(&flux_ec[0], &flux_ec[1], &flux_ec[2])}, dm_as_fine);
update_flux_registers(reflux_factor * dt, mfi, typ, flux_ec, dm_as_fine);
}
}

Expand Down Expand Up @@ -324,7 +322,9 @@ PeleC::getSmagorinskyLESTerm(
computeFluxDiv(LESTerm, mfi, vbox, flx, volume);

// Refluxing
updateFluxRegistersLES(reflux_factor, LESTerm, dt, mfi, typ, flux_ec);
updateFluxRegistersLES(
reflux_factor, LESTerm, dt, mfi, typ,
{AMREX_D_DECL(&flux_ec[0], &flux_ec[1], &flux_ec[2])});
} // End of MFIter scope
} // End of OMP scope
#endif
Expand Down Expand Up @@ -602,7 +602,9 @@ PeleC::getDynamicSmagorinskyLESTerm(
computeFluxDiv(LESTerm, mfi, vbox, flx, volume);

// Refluxing
updateFluxRegistersLES(reflux_factor, LESTerm, dt, mfi, typ, flux_ec);
updateFluxRegistersLES(
reflux_factor, LESTerm, dt, mfi, typ,
{AMREX_D_DECL(&flux_ec[0], &flux_ec[1], &flux_ec[2])});
}
}
#endif
Expand Down Expand Up @@ -705,7 +707,9 @@ PeleC::getWALELESTerm(
computeFluxDiv(LESTerm, mfi, vbox, flx, volume);

// Refluxing
updateFluxRegistersLES(reflux_factor, LESTerm, dt, mfi, typ, flux_ec);
updateFluxRegistersLES(
reflux_factor, LESTerm, dt, mfi, typ,
{AMREX_D_DECL(&flux_ec[0], &flux_ec[1], &flux_ec[2])});
} // End of MFIter scope
} // End of OMP scope
#endif
Expand Down Expand Up @@ -809,7 +813,9 @@ PeleC::getVremanLESTerm(
computeFluxDiv(LESTerm, mfi, vbox, flx, volume);

// Refluxing
updateFluxRegistersLES(reflux_factor, LESTerm, dt, mfi, typ, flux_ec);
updateFluxRegistersLES(
reflux_factor, LESTerm, dt, mfi, typ,
{AMREX_D_DECL(&flux_ec[0], &flux_ec[1], &flux_ec[2])});
} // End of MFIter scope
} // End of OMP scope
#endif
Expand Down
2 changes: 1 addition & 1 deletion Source/PeleC.H
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,7 @@ public:
amrex::Real dt,
const amrex::MFIter& mfi,
amrex::FabType typ,
amrex::FArrayBox flux_ec[AMREX_SPACEDIM]);
const std::array<amrex::FArrayBox const*, AMREX_SPACEDIM>& flux_ec);

void getSmagorinskyLESTerm(
amrex::Real time,
Expand Down

0 comments on commit da8e523

Please sign in to comment.