From 0eaf0a87b7c8f74c2a444ff3926613eb65a3771a Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Wed, 23 Feb 2022 21:30:37 -0700 Subject: [PATCH] Minor updates to ARKode in-code commentary. --- source/sundials/arkode.cc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/source/sundials/arkode.cc b/source/sundials/arkode.cc index 5118490a36..c68e57abd7 100644 --- a/source/sundials/arkode.cc +++ b/source/sundials/arkode.cc @@ -448,6 +448,8 @@ namespace SUNDIALS while (!time.is_at_end()) { time.set_desired_next_step_size(data.output_period); + + // Let ARKode advance time by one period: double actual_next_time; # if DEAL_II_SUNDIALS_VERSION_LT(4, 0, 0) const auto status = SundialsARKode(arkode_mem, @@ -465,9 +467,12 @@ namespace SUNDIALS (void)status; AssertARKode(status); + // Then reflect this time advancement in our own DiscreteTime object: time.set_next_step_size(actual_next_time - time.get_current_time()); time.advance_time(); + // Finally check whether resets or output calls are desired at this + // time: while (solver_should_restart(time.get_current_time(), solution)) reset(time.get_current_time(), time.get_previous_step_size(), -- 2.39.5