diff options
-rw-r--r-- | scilab/modules/optimization/src/fortran/n1qn1a.f | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/scilab/modules/optimization/src/fortran/n1qn1a.f b/scilab/modules/optimization/src/fortran/n1qn1a.f index 093db76..18aac49 100644 --- a/scilab/modules/optimization/src/fortran/n1qn1a.f +++ b/scilab/modules/optimization/src/fortran/n1qn1a.f | |||
@@ -15,7 +15,8 @@ c Copyright INRIA | |||
15 | real rzs(*) | 15 | real rzs(*) |
16 | external simul | 16 | external simul |
17 | double precision dnrm2 ! (blas routine) added by Bruno to get | 17 | double precision dnrm2 ! (blas routine) added by Bruno to get |
18 | ! a better information concerning directionnal derivative | 18 | ! a better information concerning directionnal derivative |
19 | integer vfinite ! added by Serge to avoid Inf and Nan's | ||
19 | 1000 format (46h n1qn1 ne peut demarrer (contrainte implicite)) | 20 | 1000 format (46h n1qn1 ne peut demarrer (contrainte implicite)) |
20 | 1001 format (40h n1qn1 termine par voeu de l'utilisateur) | 21 | 1001 format (40h n1qn1 termine par voeu de l'utilisateur) |
21 | 1010 format (45h n1qn1 remplace le hessien initial (qui n'est, | 22 | 1010 format (45h n1qn1 remplace le hessien initial (qui n'est, |
@@ -26,6 +27,8 @@ c calcul initial de fonction-gradient | |||
26 | c | 27 | c |
27 | indic=4 | 28 | indic=4 |
28 | call simul (indic,n,x,f,g,izs,rzs,dzs) | 29 | call simul (indic,n,x,f,g,izs,rzs,dzs) |
30 | c next line added by Serge to avoid Inf and Nan's (04/2007) | ||
31 | if (vfinite(1,f).ne.1.and.vfinite(n,g).ne.1) indic=-1 | ||
29 | if (indic.gt.0) go to 13 | 32 | if (indic.gt.0) go to 13 |
30 | if (iprint.eq.0) go to 12 | 33 | if (iprint.eq.0) go to 12 |
31 | if (indic.lt.0) write (lp,1000) | 34 | if (indic.lt.0) write (lp,1000) |
@@ -177,6 +180,8 @@ c calcul de fonction-gradient | |||
177 | 180 xb(i)=xa(i)+c*d(i) | 180 | 180 xb(i)=xa(i)+c*d(i) |
178 | indic=4 | 181 | indic=4 |
179 | call simul (indic,n,xb,fb,gb,izs,rzs,dzs) | 182 | call simul (indic,n,xb,fb,gb,izs,rzs,dzs) |
183 | c next line added by Serge to avoid Inf and Nan's (04/2007) | ||
184 | if (vfinite(1,fb).ne.1.and.vfinite(n,gb).ne.1) indic=-1 | ||
180 | c test sur indic | 185 | c test sur indic |
181 | if (indic.gt.0) goto 185 | 186 | if (indic.gt.0) goto 185 |
182 | if (indic.lt.0) goto 183 | 187 | if (indic.lt.0) goto 183 |