Skip to content

Commit

Permalink
SDC+NSE predictor-corrector update: make number of iters a runtime pa…
Browse files Browse the repository at this point in the history
…ram (#1370)
  • Loading branch information
zingale authored Oct 28, 2023
1 parent e052f6e commit 6f60462
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions integration/_parameters
Original file line number Diff line number Diff line change
Expand Up @@ -77,3 +77,6 @@ sdc_burn_tol_factor real 1.d0
# for Strang, this simply means scaling e by the initial energy?
scale_system integer 0

# for the NSE update predictor-corrector, how many iterations
# do we take to get the new time NSE state
nse_iters integer 3
4 changes: 2 additions & 2 deletions integration/nse_update_simplified_sdc.H
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ void sdc_nse_burn(BurnT& state, const Real dt) {
rho_aux_new[n] = state.y[SFX+n] + dt * state.ydot_a[SFX+n] + dt * aux_source[n];
}

for (int iter = 0; iter < 3; iter++) {
for (int iter = 0; iter < integrator_rp::nse_iters; iter++) {

// update (rho e)^{n+1} based on the new energy generation rate
rhoe_new = state.y[SEINT] + dt * state.ydot_a[SEINT] + dt * rho_enucdot;
Expand Down Expand Up @@ -258,7 +258,7 @@ void sdc_nse_burn(BurnT& state, const Real dt) {
rhoX_new[n] = state.y[SFS+n] + dt * state.ydot_a[SFS+n] + dt * rhoX_source[n];
}

for (int iter = 0; iter < 3; iter++) {
for (int iter = 0; iter < integrator_rp::nse_iters; iter++) {

// update (rho e)^{n+1} based on the new energy generation rate
rhoe_new = state.y[SEINT] + dt * state.ydot_a[SEINT] + dt * rho_enucdot;
Expand Down

0 comments on commit 6f60462

Please sign in to comment.