Skip to content

Commit

Permalink
changed default stall tolerance
Browse files Browse the repository at this point in the history
  • Loading branch information
Kenneth Moore authored and Kenneth Moore committed Aug 5, 2020
1 parent fd1b224 commit 8c59abe
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion openmdao/solvers/solver.py
Original file line number Diff line number Diff line change
Expand Up @@ -531,7 +531,7 @@ def _declare_options(self):
'identical within the stall_tol, then terminate as if max '
'iterations were reached. Default is 0, which disables this '
'feature.')
self.options.declare('stall_tol', default=1e-6,
self.options.declare('stall_tol', default=1e-12,
desc='When stall checking is enabled, the threshold below which the '
'residual norm is considered unchanged.')

Expand Down
6 changes: 3 additions & 3 deletions openmdao/solvers/tests/test_solver_features.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ def test_nonlinear_solver_stall_detection(self):
newton = prob.model.nonlinear_solver = om.NewtonSolver()
newton.options['solve_subsystems'] = True
newton.options['stall_limit'] = 3
newton.options['stall_tol'] = 1e-6
newton.options['stall_tol'] = 1e-8
newton.options['maxiter'] = 100
newton.options['err_on_non_converge'] = True

Expand Down Expand Up @@ -100,7 +100,7 @@ def test_feature_stall_detection_newton(self):
newton = prob.model.nonlinear_solver = om.NewtonSolver()
newton.options['solve_subsystems'] = True
newton.options['stall_limit'] = 3
newton.options['stall_tol'] = 1e-6
newton.options['stall_tol'] = 1e-8
newton.options['maxiter'] = 100

prob.model.linear_solver = om.DirectSolver()
Expand All @@ -123,7 +123,7 @@ def test_feature_stall_detection_broyden(self):

nl_solver = prob.model.nonlinear_solver = om.BroydenSolver()
nl_solver.options['stall_limit'] = 3
nl_solver.options['stall_tol'] = 1e-6
nl_solver.options['stall_tol'] = 1e-8
nl_solver.options['maxiter'] = 100

prob.model.linear_solver = om.DirectSolver()
Expand Down

0 comments on commit 8c59abe

Please sign in to comment.