From fb314e909f950ec28e0c984441972acb0890a1e8 Mon Sep 17 00:00:00 2001 From: Michael Zingale Date: Thu, 29 Jun 2023 13:59:08 -0400 Subject: [PATCH 1/2] update the interface for update_density_in_time we don't need int_state --- integration/integrator_rhs_simplified_sdc.H | 4 ++-- integration/integrator_type.H | 5 +---- integration/integrator_type_simplified_sdc.H | 4 ++-- 3 files changed, 5 insertions(+), 8 deletions(-) diff --git a/integration/integrator_rhs_simplified_sdc.H b/integration/integrator_rhs_simplified_sdc.H index d998a1fdf7..dfc4ab34a3 100644 --- a/integration/integrator_rhs_simplified_sdc.H +++ b/integration/integrator_rhs_simplified_sdc.H @@ -28,7 +28,7 @@ void rhs(const Real time, BurnT& state, T& int_state, RArray1D& ydot, // update rho - update_density_in_time(time, state, int_state); + update_density_in_time(time, state); // ensure that the mass fractions are valid -- only int_state is // updated here @@ -91,7 +91,7 @@ void jac (const Real time, BurnT& state, T& int_state, MatrixType& pd) // update rho, rho*u, ... in the burn_t state - update_density_in_time(time, state, int_state); + update_density_in_time(time, state); // ensure that the mass fractions are valid -- only int_state is // updated here diff --git a/integration/integrator_type.H b/integration/integrator_type.H index 2e5f710af2..60be6b04c5 100644 --- a/integration/integrator_type.H +++ b/integration/integrator_type.H @@ -7,7 +7,7 @@ using namespace integrator_rp; template AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE -void update_density_in_time(const Real time, BurnT& state, [[maybe_unused]] const T& int_state) +void update_density_in_time(const Real time, BurnT& state) { // some quantities are only advected. Here we update those state @@ -16,9 +16,6 @@ void update_density_in_time(const Real time, BurnT& state, [[maybe_unused]] cons // Note: we don't update the aux data here based on the X's -- that // needs to be done separately. // - // Also note: int_state is only used as input for the case where - // we need to construct rho from (rho X). - // we are always integrating from t = 0, so there is no offset // time needed here. The indexing of ydot_a is based on // the indices in burn_t and is 0-based diff --git a/integration/integrator_type_simplified_sdc.H b/integration/integrator_type_simplified_sdc.H index 37cc60b127..39c1270d33 100644 --- a/integration/integrator_type_simplified_sdc.H +++ b/integration/integrator_type_simplified_sdc.H @@ -23,7 +23,7 @@ void renormalize_species(const Real time, BurnT& state, T& int_state) // update rho, rho*u, etc. - update_density_in_time(time, state, int_state); + update_density_in_time(time, state); Real nspec_sum = 0.0_rt; for (int n = 1; n <= NumSpec; n++) { @@ -105,7 +105,7 @@ void int_to_burn(const Real time, const T& int_state, BurnT& state) // update rho in the burn_t state // this may be redundant, but better to be safe - update_density_in_time(time, state, int_state); + update_density_in_time(time, state); Real rhoInv = 1.0_rt / state.rho; From 381d8676d7c9808b60a2080fc79a3394e278369b Mon Sep 17 00:00:00 2001 From: Michael Zingale Date: Thu, 29 Jun 2023 14:30:41 -0400 Subject: [PATCH 2/2] fix compilation --- integration/integrator_type.H | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/integration/integrator_type.H b/integration/integrator_type.H index 60be6b04c5..510f245da6 100644 --- a/integration/integrator_type.H +++ b/integration/integrator_type.H @@ -5,7 +5,7 @@ using namespace integrator_rp; -template +template AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void update_density_in_time(const Real time, BurnT& state) {