Skip to content

Commit

Permalink
fix compilation
Browse files Browse the repository at this point in the history
  • Loading branch information
zingale committed Jan 23, 2024
1 parent 6736acf commit 6be7341
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 19 deletions.
5 changes: 0 additions & 5 deletions Source/hydro/Castro_ctu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,11 +65,6 @@ Castro::consup_hydro(const Box& bx,

U_new(i,j,k,n) = U_new(i,j,k,n) - dt * pdu;

#ifdef SHOCK_VAR
} else if (n == USHK) {
U_new(i,j,k,USHK) = U_old(i,j,k,USHK);
#endif

} else if (n == UMX) {
// Add gradp term to momentum equation -- only for axisymmetric
// coords (and only for the radial flux).
Expand Down
3 changes: 0 additions & 3 deletions Source/hydro/Castro_hydro.H
Original file line number Diff line number Diff line change
Expand Up @@ -710,9 +710,6 @@
/// @param dt timestep
///
void consup_hydro(const amrex::Box& bx,
#ifdef SHOCK_VAR
amrex::Array4<amrex::Real const> const& shk,
#endif
amrex::Array4<amrex::Real> const& U_new,
amrex::Array4<amrex::Real> const& flux0,
amrex::Array4<amrex::Real const> const& qx,
Expand Down
20 changes: 9 additions & 11 deletions Source/sources/Castro_sources.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -546,10 +546,7 @@ Castro::pre_advance_operators (Real time, Real dt)
// recompute the old sources after the burn, so this is done here
// only for evaluating the shock flag.

// Note: we still compute the shock flag in the hydro for the
// hybrid-Riemann (for now) since that version will have seen the
// effect of the burning in the first dt), but that version is
// never stored in State_Type
do_old_sources(time, dt);

MultiFab& old_source = get_old_data(Source_Type);

Expand All @@ -565,14 +562,20 @@ Castro::pre_advance_operators (Real time, Real dt)
Array4<Real> const q_arr = q.array();
Array4<Real> const qaux_arr = qaux.array();

Array4<Real const> const U_old_arr = Sborder.array(mfi);
Array4<Real> const U_old_arr = Sborder.array(mfi);
Array4<Real> const old_src_arr = old_source.array(mfi);

ctoprim(bx, time, U_old_arr, q_arr, qaux_arr);

shock(obx, q_arr, old_src_arr, shk_arr);
shock(bx, q_arr, old_src_arr, shk_arr);

// now store it in Sborder

// Note: we still compute the shock flag in the hydro for the
// hybrid-Riemann (for now) since that version will have seen the
// effect of the burning in the first dt), but that version is
// never stored in State_Type

amrex::ParallelFor(bx,
[=] AMREX_GPU_DEVICE (int i, int j, int k) noexcept
{
Expand All @@ -588,11 +591,6 @@ Castro::pre_advance_operators (Real time, Real dt)
AmrLevel::FillPatch(*this, Sborder, Sborder.nGrow(), time, State_Type, USHK, 1, USHK);
}

#endif

getLevel(lev).pre_hydro_operators(prev_time, dt);


#endif

// If we are Strang splitting the reactions, do the old-time contribution now.
Expand Down

0 comments on commit 6be7341

Please sign in to comment.