Skip to content

Commit fb17ecd

Browse files
committed
fixed typo for f return in anderson_bjorck
1 parent a6dd772 commit fb17ecd

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/root_module.F90

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -911,7 +911,7 @@ subroutine illinois(me,ax,bx,fax,fbx,xzero,fzero,iflag)
911911
real(wp),intent(out) :: fzero !! value of `f` at the root (`f(xzero)`)
912912
integer,intent(out) :: iflag !! status flag (`0`=root found, `-2`=max iterations reached)
913913

914-
real(wp) :: x1,x2,x3,f1,f2,f3,delta,f1tmp
914+
real(wp) :: x1,x2,x3,f1,f2,f3,f1tmp
915915
integer :: i !! iteration counter
916916
logical :: root_found !! convergence in x
917917

@@ -1001,14 +1001,14 @@ subroutine anderson_bjorck(me,ax,bx,fax,fbx,xzero,fzero,iflag)
10011001

10021002
! determine a new inclusion interval:
10031003
if (f2*f3<0.0_wp) then
1004-
! zero lies between x2 and x3
1004+
! zero lies between x2 and x3 ! x1-----x3--*--x2
10051005
x1 = x2
10061006
x2 = x3
10071007
f1 = f2
10081008
f2 = f3
1009-
f1tmp = f1
1009+
f1tmp = f2
10101010
else
1011-
! zero lies between x1 and x3
1011+
! zero lies between x1 and x3 ! x1--*--x3-----x2
10121012
g = 1.0_wp - f3/f2
10131013
if (g<=0.0_wp) g = 0.5_wp
10141014
x2 = x3
@@ -2211,7 +2211,7 @@ subroutine anderson_bjorck_kroger(me,ax,bx,fax,fbx,xzero,fzero,iflag)
22112211
x2 = x3
22122212
f1 = f2
22132213
f2 = f3
2214-
f1tmp = f1
2214+
f1tmp = f2
22152215
else
22162216
! zero lies between x1 and x3
22172217
g = 1.0_wp-f3/f2

0 commit comments

Comments
 (0)