Skip to content
Snippets Groups Projects
Commit 735f2f44 authored by Dmitri Naumov's avatar Dmitri Naumov
Browse files

[PL] TS: Change handling when reaching end time.

First removal force the convergence checks to be executed.
Last two changes handle the t being (almost) equal to the
end time.
parent 7e3e98d7
No related branches found
No related tags found
No related merge requests found
......@@ -328,12 +328,6 @@ double UncoupledProcessesTimeLoop::computeTimeStepping(
{
auto& ppd = *_per_process_data[i];
const auto& timestepper = ppd.timestepper;
if (t > timestepper->end())
{
// skip the process that already reaches the ending time.
ppd.skip_time_stepping = true;
continue;
}
auto& time_disc = ppd.time_disc;
auto const& x = *_process_solutions[i];
......@@ -431,7 +425,8 @@ double UncoupledProcessesTimeLoop::computeTimeStepping(
}
else
{
if (t < _end_time)
if (t < _end_time || std::abs(t - _end_time) <
std::numeric_limits<double>::epsilon())
{
WARN(
"Time step %d was rejected %d times "
......@@ -451,7 +446,8 @@ double UncoupledProcessesTimeLoop::computeTimeStepping(
}
else
{
if (t < _end_time)
if (t < _end_time || std::abs(t - _end_time) <
std::numeric_limits<double>::epsilon())
{
t -= prev_dt;
rejected_steps++;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment