| 96b7d5c2 | 14-May-2021 |
Jed Brown <jed@jedbrown.org> |
SNESLineSearch CP: fix overzealous atol exiting line search but not SNES
When F and Y are both modest (1e-8), their product can be smaller than the default atol (1e-15) even though we need to take t
SNESLineSearch CP: fix overzealous atol exiting line search but not SNES
When F and Y are both modest (1e-8), their product can be smaller than the default atol (1e-15) even though we need to take the step. When exiting early under this condition, the line search exits before taking any step, but the SNES continues to iterate:
0 SNES Function norm 9.086021195164e-01 Line search: lambdas = [1., 0.], ftys = [-0.656115, 2.91487] Line search terminated: lambda = 0.816265, fnorms = 0.0870758 1 SNES Function norm 8.707582821951e-02 Line search: lambdas = [1., 0.], ftys = [-6.48955e-06, 0.00979613] Line search terminated: lambda = 0.999338, fnorms = 0.00044834 2 SNES Function norm 4.483404033935e-04 Line search: lambdas = [1., 0.], ftys = [1.86622e-10, 1.43036e-06] Line search terminated: lambda = 1.00013, fnorms = 1.09993e-08 3 SNES Function norm 1.099934077677e-08 Line search terminated ended at initial point because dot(F,Y) = 3.11502e-16 < atol = 1e-15 4 SNES Function norm 1.099934077677e-08 Line search terminated ended at initial point because dot(F,Y) = 3.11502e-16 < atol = 1e-15 5 SNES Function norm 1.099934077677e-08 Line search terminated ended at initial point because dot(F,Y) = 3.11502e-16 < atol = 1e-15 6 SNES Function norm 1.099934077677e-08 Line search terminated ended at initial point because dot(F,Y) = 3.11502e-16 < atol = 1e-15
In this commit, we ensure that SNES declares convergence if the "critical point" notion of atol is satisfied on the first step of the line search. Additionally, we change the notion of atol to mean "in the direction of Y", but not multiplied by Y.
Reported-by: Emily Jakobs <emily.jakobs@colorado.edu>
show more ...
|