@@ -441,7 +441,7 @@ subroutine fdjac1(fcn, n, x, Fvec, Fjac, Ldfjac, Iflag, Ml, Mu, Epsfcn, Wa1, Wa2
441441 ! ! of functions and variables.
442442 integer , intent (in ) :: Ldfjac ! ! a positive integer input variable not less than n
443443 ! ! which specifies the leading dimension of the array fjac.
444- integer , intent (out ) :: Iflag ! ! an integer variable which can be used to terminate
444+ integer , intent (inout ) :: Iflag ! ! an integer variable which can be used to terminate
445445 ! ! the execution of fdjac1. see description of [[func]].
446446 integer , intent (in ) :: Ml ! ! a nonnegative integer input variable which specifies
447447 ! ! the number of subdiagonals within the band of the
@@ -482,7 +482,6 @@ subroutine fdjac1(fcn, n, x, Fvec, Fjac, Ldfjac, Iflag, Ml, Mu, Epsfcn, Wa1, Wa2
482482 if (h == zero) h = eps
483483 x(j) = Wa2(j) + h
484484 end do
485- Iflag = 1 ! JW added
486485 call fcn(n, x, Wa1, Iflag)
487486 if (Iflag < 0 ) return
488487 do j = k, n, msum
@@ -502,7 +501,6 @@ subroutine fdjac1(fcn, n, x, Fvec, Fjac, Ldfjac, Iflag, Ml, Mu, Epsfcn, Wa1, Wa2
502501 h = eps* abs (temp)
503502 if (h == zero) h = eps
504503 x(j) = temp + h
505- Iflag = 1 ! JW added
506504 call fcn(n, x, Wa1, Iflag)
507505 if (Iflag < 0 ) return
508506 x(j) = temp
@@ -533,7 +531,7 @@ subroutine fdjac2(fcn, m, n, x, Fvec, Fjac, Ldfjac, Iflag, Epsfcn, Wa)
533531 ! ! of variables. n must not exceed m.
534532 integer , intent (in ) :: Ldfjac ! ! a positive integer input variable not less than m
535533 ! ! which specifies the leading dimension of the array fjac.
536- integer , intent (out ) :: Iflag ! ! an integer variable which can be used to terminate
534+ integer , intent (inout ) :: Iflag ! ! an integer variable which can be used to terminate
537535 ! ! the execution of fdjac2. see description of [[func2]].
538536 real (wp), intent (in ) :: Epsfcn ! ! an input variable used in determining a suitable
539537 ! ! step length for the forward-difference approximation. this
0 commit comments