Skip to content

Commit

Permalink
more updates
Browse files Browse the repository at this point in the history
  • Loading branch information
zingale committed Jun 29, 2023
1 parent 4d69f3b commit 3879911
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
6 changes: 6 additions & 0 deletions integration/VODE/actual_integrator_simplified_sdc.H
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,12 @@ void actual_integrator (BurnT& state, Real dt)
vode_state.atol_spec = sdc_min_density * atol_spec * sdc_tol_fac;
vode_state.rtol_spec = rtol_spec * sdc_tol_fac;

// if we are scaling the system, then update the atols accordingly
if (scale_system) {
vode_state.atol_enuc /= (state.rho_scale * state.e_scale);
vode_state.atol_spec /= state.rho_scale;
}

// Call the integration routine.

int istate = dvode(state, vode_state);
Expand Down
14 changes: 13 additions & 1 deletion integration/integrator_type_simplified_sdc.H
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,21 @@ void burn_to_int(BurnT& state, T& int_state)

// store the original rho and rho e
state.rho_orig = state.y[SRHO];

state.rhoe_orig = state.y[SEINT];

// normalize
state.e_scale = state.rhoe_orig / state.rho_orig;
state.rho_scale = state.rho_orig;

if (scale_system) {
// we are integrating (rho X, rho e), so normalize by the
// initial scale
int_state.y(net_ienuc) /= (state.rho_scale * state.e_scale);
for (int n = 1; n <= NumSpec; ++n) {
int_state.y(n) /= state.rho;
}
}

}


Expand Down

0 comments on commit 3879911

Please sign in to comment.