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

[NL] NS; Avoid increment of the 'iteration'.

parent 80fde827
No related branches found
No related tags found
No related merge requests found
......@@ -148,6 +148,11 @@ NonlinearSolverStatus NonlinearSolver<NonlinearSolverTag::Picard>::solve(
if (error_norms_met)
break;
// Avoid increment of the 'iteration' if the error norms are not met,
// but maximum number of iterations is reached.
if (iteration >= _maxiter)
break;
}
if (iteration > _maxiter)
......@@ -298,6 +303,11 @@ NonlinearSolverStatus NonlinearSolver<NonlinearSolverTag::Newton>::solve(
if (error_norms_met)
break;
// Avoid increment of the 'iteration' if the error norms are not met,
// but maximum number of iterations is reached.
if (iteration >= _maxiter)
break;
}
if (iteration > _maxiter)
......
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