Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update the interface for update_density_in_time #1244

Merged
merged 2 commits into from
Jun 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions integration/integrator_rhs_simplified_sdc.H
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
7 changes: 2 additions & 5 deletions integration/integrator_type.H
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@

using namespace integrator_rp;

template <typename BurnT, typename T>
template <typename BurnT>
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
Expand All @@ -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
Expand Down
4 changes: 2 additions & 2 deletions integration/integrator_type_simplified_sdc.H
Original file line number Diff line number Diff line change
Expand Up @@ -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++) {
Expand Down Expand Up @@ -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;

Expand Down