diff --git a/ProcessLib/TimeLoop.cpp b/ProcessLib/TimeLoop.cpp index 5ca23a0b32ac252e053aace43ac83266b0621650..4310e0764118898e8e720c83dfa87e7a133ab085 100644 --- a/ProcessLib/TimeLoop.cpp +++ b/ProcessLib/TimeLoop.cpp @@ -387,6 +387,8 @@ double TimeLoop::computeTimeStepping(const double prev_dt, double& t, dt = _end_time - t; } + dt = NumLib::possiblyClampDtToNextFixedTime(t, dt, + _output->getFixedOutputTimes()); // Check whether the time stepping is stabilized if (std::fabs(dt - prev_dt) < std::numeric_limits<double>::epsilon()) { @@ -406,9 +408,6 @@ double TimeLoop::computeTimeStepping(const double prev_dt, double& t, } } - dt = NumLib::possiblyClampDtToNextFixedTime(t, dt, - _output->getFixedOutputTimes()); - // Reset the time step with the minimum step size, dt // Update the solution of the previous time step. for (std::size_t i = 0; i < _per_process_data.size(); i++)