diff --git a/NumLib/TimeStepping/Algorithms/CreateFixedTimeStepping.cpp b/NumLib/TimeStepping/Algorithms/CreateFixedTimeStepping.cpp index 461ec71f28d7f71a0650704d0928573cb195e991..82e56c6103e2bb9cb2f2ac602cf1e5207370dab9 100644 --- a/NumLib/TimeStepping/Algorithms/CreateFixedTimeStepping.cpp +++ b/NumLib/TimeStepping/Algorithms/CreateFixedTimeStepping.cpp @@ -192,7 +192,11 @@ std::unique_ptr<TimeStepAlgorithm> createFixedTimeStepping( e.what()); } - t_curr += repeat * delta_t; + // Multiplying dt * repeat is not the same as in the current + // implementation of the time loop, where the dt's are added. + // Therefore the sum of all dt is taken here. + t_curr = + std::accumulate(end(delta_ts) - repeat, end(delta_ts), t_curr); } }