Skip to content

Commit 0e0c939

Browse files
authored
update sufficient decrease condition (#75)
1 parent b488ed5 commit 0e0c939

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/projections.F90

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ subroutine point_curve(x0, t, k, coef, nctl, ndim, Niter, eps, s, Diff)
136136
nfVal = 0.5 * nDist**2
137137

138138
! Check if the new point satisfies the wolfe condition
139-
if (nfval < fval + pgrad * wolfe * step) then
139+
if (nfval <= fval + pgrad * wolfe * step) then
140140
dist = ndist
141141
exit lineloop
142142
end if
@@ -327,7 +327,7 @@ subroutine point_surface(x0, tu, tv, ku, kv, coef, nctlu, nctlv, ndim, niter, ep
327327
nfval = 0.5 * ndist**2
328328

329329
! Check if the new point satisfies the wolfe condition
330-
if (nfval < fval + pgrad * wolfe * step) then
330+
if (nfval <= fval + pgrad * wolfe * step) then
331331
dist = ndist
332332
exit lineloop
333333
end if
@@ -647,7 +647,7 @@ subroutine point_volume(x0, tu, tv, tw, ku, kv, kw, coef, nctlu, nctlv, nctlw, n
647647
nfval = 0.5 * ndist**2
648648

649649
! Check if the new point satisfies the wolfe condition
650-
if (nfval < fval + pgrad * wolfe * step) then
650+
if (nfval <= fval + pgrad * wolfe * step) then
651651
dist = ndist
652652
exit lineloop
653653
end if
@@ -849,7 +849,7 @@ subroutine curve_curve(t1, k1, coef1, t2, k2, coef2, n1, n2, ndim, Niter, &
849849
nfval = 0.5 * ndist**2
850850

851851
! Check if the new point satisfies the wolfe condition
852-
if (nfval < fval + pgrad * wolfe * step) then
852+
if (nfval <= fval + pgrad * wolfe * step) then
853853
dist = ndist
854854
exit lineloop
855855
end if
@@ -1067,7 +1067,7 @@ subroutine curve_surface(tc, kc, coefc, tu, tv, ku, kv, coefs, &
10671067
nfVal = 0.5 * nDist**2
10681068

10691069
! Check if the new point satisfies the wolfe condition
1070-
if (nfval < fval + pgrad * wolfe * step) then
1070+
if (nfval <= fval + pgrad * wolfe * step) then
10711071
dist = ndist
10721072
exit lineloop
10731073
end if

0 commit comments

Comments
 (0)