upvar1
C UPVAR1 SOURCE PV 15/04/13 21:15:18 8474 & NSTRS) IMPLICIT INTEGER(I-N) IMPLICIT REAL *8 (A-H,O-Z) DIMENSION SIG(*),EPSCRP(*),EPSPLU(*),EPSMIN(*) DATA X,Y/1.0D-06,0.0D0/ -INC CCREEL C ____________________________________________________________________ C C THIS ROUTINE UPDATE THE INTERNAL VARIABLES C_____________________________________________________________________ SPLU=0.0D0 GPLU=0.0D0 GMIN=0.0D0 SMIN=0.0D0 sxgr=sqrt(xgrand) DO 11 I=1,NSTRS A=1.D0 IF (I.GT.3) A=2.D0 sigi=min(sxgr,max(-sxgr,sig(i))) epscr=min(sxgr,max(-sxgr,epscrp(i))) SPLU=SPLU+(EPSCR-EPSPLU(I))*SIGI*A SMIN=SMIN+(EPSCR-EPSMIN(I))*SIGI*A GPLU=GPLU+(EPSCR-EPSPLU(I))*(EPSCR-EPSPLU(I))*A 11 GMIN=GMIN+(EPSCR-EPSMIN(I))*(EPSCR-EPSMIN(I))*A GPLU=SQRT(0.6666666666666666D0*GPLU) GMIN=SQRT(0.6666666666666666D0*GMIN) N=0 IF(GPLU.LT.X.AND.GMIN.LT.X) THEN N=1 GO TO 13 ELSE IF(SPLU.GE.Y.AND.SMIN.LT.Y) THEN N=1 GO TO 13 ELSE IF(SPLU.GT.Y.AND.SMIN.LE.Y) THEN N=1 GO TO 13 ELSE IF(SPLU.LT.Y.AND.SMIN.GE.Y) THEN N=2 GO TO 13 ELSE IF(SPLU.LE.Y.AND.SMIN.GT.Y) THEN N=2 GO TO 13 ELSE IF(SPLU.GT.Y.AND.SMIN.GT.Y.AND.GMIN.GT.(GPLU+X)) THEN N=2 GO TO 13 ELSE IF(SPLU.GT.Y.AND.SMIN.GT.Y.AND.GMIN.LE.(GPLU+X)) THEN N=1 GO TO 13 ELSE IF(SPLU.LT.Y.AND.SMIN.LT.Y.AND.GMIN.GT.(GPLU+X)) THEN N=1 GO TO 13 ELSE IF(SPLU.LT.Y.AND.SMIN.LT.Y.AND.GMIN.LE.(GPLU+X)) THEN N=2 ENDIF 13 CONTINUE IF(N.EQ.0) GO TO 18 IF(N.EQ.1) LL=0 IF(N.EQ.2) LL=1 IF(LL.EQ.M) GO TO 18 IF(M.EQ.1) GO TO 15 IF(GPLU.LE.EPSEFF) GO TO 18 DO 14 L=1,NSTRS 14 EPSMIN(L)=EPSCRP(L) EPSEFF=GPLU GO TO 18 15 IF(GMIN.LE.EPSEFF) GO TO 18 DO 16 L=1,NSTRS 16 EPSPLU(L)=EPSCRP(L) EPSEFF=GMIN 18 CONTINUE IF(LL.NE.0) GO TO 20 EPSH=0.0D0 DO 19 L=1,NSTRS A=1.D0 IF (L.GT.3) A=2.D0 19 EPSH=EPSH+(EPSCRP(L)-EPSPLU(L))*(EPSCRP(L)-EPSPLU(L))*A EPSH=SQRT(0.66666666666666666D0*EPSH) GO TO 22 20 EPSH=0.0D0 DO 21 L=1,NSTRS A=1.D0 IF (L.GT.3) A=2.D0 21 EPSH=EPSH+(EPSCRP(L)-EPSMIN(L))*(EPSCRP(L)-EPSMIN(L))*A EPSH=SQRT(0.66666666666666666D0*EPSH) 22 CONTINUE M =LL C C______________________________________________________________________ RETURN END
© Cast3M 2003 - Tous droits réservés.
Mentions légales