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DISTZB=(YMAX-YMIN)/PREC DISTZC=(ZMAX-ZMIN)/PREC NPUI = 3 IF(DISTZA.LT.(DISTZB*1.D-5).OR.DISTZA.LT.DISTZC*1.D-5) NPUI=NPUI-1 IF(DISTZB.LT.(DISTZA*1.D-5).OR.DISTZB.LT.DISTZC*1.D-5) NPUI=NPUI-1 IF(DISTZC.LT.(DISTZA*1.D-5).OR.DISTZC.LT.DISTZB*1.D-5) NPUI=NPUI-1 IF (NPUI .EQ. 0) THEN RETURN ENDIF A=(DISTZA+1)*(DISTZB+1)*(DISTZC+1) RAP=1.D0 IF (A.GT.ANF) RAP=(ANF/A)**(1.D0/REAL(NPUI)) TRUC =INT(DISTZA*RAP)+3 TRUC1=INT(DISTZB*RAP)+3 TRUC2=INT(DISTZC*RAP)+3 TRUC3=TRUC*TRUC1 NG=TRUC3*TRUC2/NUMNP+1 DO 20 I=1,NUMNP3 NP1(I)=0 20 CONTINUE YCOR=0.D0 ZCOR=0.D0 DO 25 I=1,NUMNP IREF=IDCP(I)*IDIMP1-IDIM IF (IDIM.GE.2) YCOR=XCOOR(IREF+1) IF (IDIM.GE.3) ZCOR=XCOOR(IREF+2) NZONE=ICRAT/NG+1 NP4(I)=ICRAT NP5(I)=NZONE NP1(NZONE)=NP1(NZONE)+1 25 CONTINUE DO 30 I=2,NUMNP3 NP1(I)=NP1(I-1)+NP1(I) 30 CONTINUE DO 35 I=1,NUMNP ICRAT=NP4(I) NZONE=NP5(I) J=NP1(NZONE) NP3(J)=ICRAT NP2(J)=I NP1(NZONE)=NP1(NZONE)-1 35 CONTINUE DO 40 I=1,NUMNP3-1 JD=NP1(I)+2 JF=NP1(I+1) IF (JD.LE.JF) THEN 45 IPERM=0 DO 50 J=JD,JF IF (NP3(J-1).GT.NP3(J)) THEN L1=NP2(J-1) NP2(J-1)=NP2(J) NP2(J)=L1 L1=NP3(J-1) NP3(J-1)=NP3(J) NP3(J)=L1 IPERM=1 ENDIF 50 CONTINUE IF (IPERM.EQ.1) GO TO 45 ENDIF 40 CONTINUE IF (IIMPI.NE.0) WRITE (IOIMP,41) DISTZA,DISTZB,DISTZC 41 FORMAT (1X,' DISTZA=',F10.3,'DISTZB=',F10.3,'DISTZC=',F10.3) RETURN END
© Cast3M 2003 - Tous droits réservés.
Mentions légales