From 6f60462ff9ea041d44e24ec9d09a813d76b9d282 Mon Sep 17 00:00:00 2001 From: Michael Zingale Date: Sat, 28 Oct 2023 13:48:16 -0400 Subject: [PATCH] SDC+NSE predictor-corrector update: make number of iters a runtime param (#1370) --- integration/_parameters | 3 +++ integration/nse_update_simplified_sdc.H | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/integration/_parameters b/integration/_parameters index 998ffa47a5..1579602917 100644 --- a/integration/_parameters +++ b/integration/_parameters @@ -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 diff --git a/integration/nse_update_simplified_sdc.H b/integration/nse_update_simplified_sdc.H index 533eb5171b..fe5fb20548 100644 --- a/integration/nse_update_simplified_sdc.H +++ b/integration/nse_update_simplified_sdc.H @@ -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; @@ -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;