From 6be7341470e11657423c64efb6233b7dacb94c3a Mon Sep 17 00:00:00 2001 From: Michael Zingale Date: Tue, 23 Jan 2024 11:14:33 -0500 Subject: [PATCH] fix compilation --- Source/hydro/Castro_ctu.cpp | 5 ----- Source/hydro/Castro_hydro.H | 3 --- Source/sources/Castro_sources.cpp | 20 +++++++++----------- 3 files changed, 9 insertions(+), 19 deletions(-) diff --git a/Source/hydro/Castro_ctu.cpp b/Source/hydro/Castro_ctu.cpp index 490df4c07b..38e18b0cac 100644 --- a/Source/hydro/Castro_ctu.cpp +++ b/Source/hydro/Castro_ctu.cpp @@ -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). diff --git a/Source/hydro/Castro_hydro.H b/Source/hydro/Castro_hydro.H index 647abc10ac..bbf0db8fa3 100644 --- a/Source/hydro/Castro_hydro.H +++ b/Source/hydro/Castro_hydro.H @@ -710,9 +710,6 @@ /// @param dt timestep /// void consup_hydro(const amrex::Box& bx, -#ifdef SHOCK_VAR - amrex::Array4 const& shk, -#endif amrex::Array4 const& U_new, amrex::Array4 const& flux0, amrex::Array4 const& qx, diff --git a/Source/sources/Castro_sources.cpp b/Source/sources/Castro_sources.cpp index 5b4e7b3057..bbb323c1c7 100644 --- a/Source/sources/Castro_sources.cpp +++ b/Source/sources/Castro_sources.cpp @@ -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); @@ -565,14 +562,20 @@ Castro::pre_advance_operators (Real time, Real dt) Array4 const q_arr = q.array(); Array4 const qaux_arr = qaux.array(); - Array4 const U_old_arr = Sborder.array(mfi); + Array4 const U_old_arr = Sborder.array(mfi); Array4 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 { @@ -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.