-
assigned issue to
set error_on_nonconvergence to True by default
Issue #842
resolved
Right now, if a solver fails to converge with the given parameters (maximum_iterations
, relative_tolerance
etc.), Dolfin writes a message like
*** Warning: Krylov solver did not converge in 100 iterations (PETSc reason DIVERGED_ITS, residual norm ||r|| = 4.626070e+04).
to the screen and continues as normal. This message can easily drown in whatever output your code generates.
According to The Zen of Python,
Errors should never pass silently.
Unless explicitly silenced.
This should also apply here: The setting
solver.parameters['error_on_nonconvergence'] = True
should be the default. If anyone really wants allow a failing solver to pass, this can be set to False
.
Comments (5)
-
-
Sounds reasonable.
-
This is a regression brought by 3bcf36ba so should definitely be fixed. A fix proposed by pull request #355.
-
-
assigned issue to
-
assigned issue to
-
- changed status to resolved
Fixed by 7263633244b5ab7aeacbbde0f2e707ff833e1a27.
- Log in to comment