From b5a7609e84ab82ed669be3e4de44a15a73c5de28 Mon Sep 17 00:00:00 2001 From: Michael Zingale Date: Fri, 27 Oct 2023 09:25:54 -0400 Subject: [PATCH 1/2] SDC+NSE predictor-corrector update: make number of iters a runtime param --- 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..42bf7c3009 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 \ No newline at end of file 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; From dcfbbcedf557c216f0a5c0d9e559bc0c85b5b6c4 Mon Sep 17 00:00:00 2001 From: Michael Zingale Date: Fri, 27 Oct 2023 09:31:22 -0400 Subject: [PATCH 2/2] fix newline --- integration/_parameters | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/integration/_parameters b/integration/_parameters index 42bf7c3009..1579602917 100644 --- a/integration/_parameters +++ b/integration/_parameters @@ -79,4 +79,4 @@ 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 \ No newline at end of file +nse_iters integer 3