From 64b65de78e60f8988487661e2fb751ae8938038a Mon Sep 17 00:00:00 2001 From: Mike VandenBoom Date: Sat, 25 Apr 2026 10:31:04 -0500 Subject: [PATCH 1/2] fix(ibm): fix IB restart and state output for adaptive-dt (cfl_dt) runs --- src/simulation/m_start_up.fpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/simulation/m_start_up.fpp b/src/simulation/m_start_up.fpp index d544324c8a..28214859f4 100644 --- a/src/simulation/m_start_up.fpp +++ b/src/simulation/m_start_up.fpp @@ -818,7 +818,7 @@ contains end if ! Write IB kinematic state for restart - if (ib) call s_write_ib_state_file(t_step) + if (ib) call s_write_ib_state_file(save_count) call nvtxEndRange call cpu_time(finish) @@ -914,9 +914,13 @@ contains if (model_eqns == 3) call s_initialize_internal_energy_equations(q_cons_ts(1)%vf) if (ib) then - if (t_step_start > 0) call s_read_ib_restart_data(t_step_start) + if (cfl_dt) then + if (n_start > 0) call s_read_ib_restart_data(n_start) + else + if (t_step_start > 0) call s_read_ib_restart_data(t_step_start) + end if call s_ibm_setup() - if (t_step_start == 0) then + if (t_step_start == 0 .or. (cfl_dt .and. n_start == 0)) then call s_write_ib_data_file(0) call s_write_ib_state_file(0) end if From 450e25371fad1dd3ba66f8b4e6fd2a8deb2768ad Mon Sep 17 00:00:00 2001 From: "Daniel J. Vickers" Date: Tue, 28 Apr 2026 10:47:36 -0400 Subject: [PATCH 2/2] Slightly condensed some of the if logic --- src/simulation/m_start_up.fpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/simulation/m_start_up.fpp b/src/simulation/m_start_up.fpp index 28214859f4..310595249b 100644 --- a/src/simulation/m_start_up.fpp +++ b/src/simulation/m_start_up.fpp @@ -914,10 +914,10 @@ contains if (model_eqns == 3) call s_initialize_internal_energy_equations(q_cons_ts(1)%vf) if (ib) then - if (cfl_dt) then - if (n_start > 0) call s_read_ib_restart_data(n_start) - else - if (t_step_start > 0) call s_read_ib_restart_data(t_step_start) + if (cfl_dt .and. n_start > 0) then + call s_read_ib_restart_data(n_start) + else if (t_step_start > 0) then + call s_read_ib_restart_data(t_step_start) end if call s_ibm_setup() if (t_step_start == 0 .or. (cfl_dt .and. n_start == 0)) then