Skip to content

Commit c17024d

Browse files
committed
Can use only prediction if predicting exotically
1 parent cf2367c commit c17024d

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

pySDC/implementations/convergence_controller_classes/check_convergence.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,9 @@ def check_convergence(S, self=None):
7373

7474
# get residual and check against prescribed tolerance (plus check number of iterations)
7575
iter_converged = S.status.iter >= S.params.maxiter
76-
res_converged = L.status.residual <= L.params.restol and (S.status.iter > 0 or L.status.sweep > 0)
76+
res_converged = L.status.residual <= L.params.restol and (
77+
(S.status.iter > 0 or L.status.sweep > 0) or L.sweep.params.initial_guess not in ['spread', 'copy', 'zero']
78+
)
7779
e_tol_converged = (
7880
L.status.increment < L.params.e_tol if (L.params.get('e_tol') and L.status.get('increment')) else False
7981
)

0 commit comments

Comments
 (0)