levmar
C LEVMAR SOURCE KICH 16/07/12 21:15:04 9027 SUBROUTINE LEVMAR * * moteur pour algorithme levenberg-marquardt * IMPLICIT INTEGER(I-N) IMPLICIT REAL*8(A-H,O-Z) -INC PPARAM -INC CCOPTIO -INC CCREEL -INC SMLENTI -INC SMLREEL SEGMENT MLREE4.MLREEL,MLREE5.MLREEL,MLREE6.MLREEL,MLREE8.MLREEL, + MLREE9.MLREEL,MLRE11.MLREEL,MLRE12.MLREEL,MLRE13.MLREEL PARAMETER (NTYP=11,NPRO = 10) integer iprocm(NPRO,2) real*8 xmordo(NPRO) logical dpro & 'SIGM', 'PROC', 'ALPH', 'BETA', 'CHI2', & 'PARO' / data iprocm/0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0/ SAVE iprocm data xmordo/1.D0,1.D0,1.D0,1.D0,1.D0,1.D0,1.D0,1.D0,1.D0,1.D0/ SAVE xmordo c dpro =.true. lapro = 0 c jg = NTYP segini mlenti c IF (IERR.NE.0) GOTO 900 if(iret.eq.1) then lect(4) = ip1 IF (IERR.NE.0) GOTO 900 lect(5) = ip1 endif c idon = 0 10 continue IF (IERR.NE.0) GOTO 900 if (iplac.gt.0) then if (iplac.ne.7) then else if (iplac.eq.7) then lapro = kpro dpro = .false. endif iprocc = 0 lapro = kpro dpro = .false. endif enddo endif IF (IERR.NE.0) GOTO 900 lect(iplac) = ip1 idon = idon + 1 goto 10 endif if (iprocc.eq.0) then if (lect(7).le.0) then moterr(1:8) ='PROCEDUR' GOTO 900 endif mlree1 = lect(1) mlree2 = lect(2) mlree6 = lect(6) mlree3 = lect(3) if (mlree1.le.0 .or. mlree2.le.0 .or. mlree6.le.0 .or. & mlree3.le.0) then GOTO 900 endif segact,mlree1,mlree2,mlree6 if (n1.LE.0 .or. n1.NE.n2 .or. n1.NE.n6 .or. n2.NE.n6) then segdes,mlree1,mlree2,mlree6 GOTO 900 endif segact,mlree3 segdes,mlree3 if (ma.LE.0) then segdes,mlree1,mlree2,mlree6 GOTO 900 endif segini,mlre11=mlree3 lect(3) = mlre11 jg = ma segini mlre12 lect(11) = mlre12 jg = ma*ma segini mlree8 lect(8) = mlree8 jg = ma segini mlree9 lect(9) = mlree9 jg = 2 segini mlreel lect(10) = mlreel c * dimensionner critere ip2 = mlree2 if (umordo.GT.XSPETI.and.umordo.lt.1.d0) then xmordo(lapro) = umordo * umordo else xmordo(lapro) = 1.D0 endif c else c* else if (iprocc.gt.0) then do idon = 1, NTYP if (lect(idon).LE.0) then * write(ioimp,*) '!! IPROCC =',iprocc * iprocc = 0 iprocm(lapro,1) = 0 iprocm(lapro,2) = 0 if (idon.eq.7) then moterr(1:8) ='PROCEDUR' else endif GOTO 900 endif enddo endif mlreel = lect(10) * * write(ioimp,*)'levm',xmordo(lapro),chi2,(abs(chi2)/xmordo(lapro)) if(((abs(chi2)/xmordo(lapro)).lt.1.e-6.and.chi2.gt.0) &.or.iprocc.gt.100.or.alamda.gt.1.e11) goto 80 * iprocc = iprocc + 1 iprocm(lapro,2) = iprocc ip1 = lect(11) ip1 = lect(9) ip1 = lect(8) ip1 = lect(7) ip1 = lect(10) ip1 = lect(6) ip1 = lect(3) ip1 = lect(2) ip1 = lect(1) ip1 = lect(3) ip1 = lect(1) ip1 = lect(7) GOTO 900 80 continue if (alamda.gt.1.e11) write(ioimp,*) 'je ne sais pas faire mieux' * oubli des objets intermediares ip1 = lect(8) ip1 = lect(9) ip1 = lect(11) mlree1 = lect(1) mlree2 = lect(2) mlree3 = lect(6) segdes mlree1,mlree2,mlree3 mlree1 = lect(3) segini,mlree2=mlree1 ip1 = mlree1 ipout = mlree2 mlreel = lect(10) ip1 = mlreel iprocm(lapro,1) = 0 iprocm(lapro,2) = 0 900 CONTINUE segsup mlenti RETURN END
© Cast3M 2003 - Tous droits réservés.
Mentions légales