pyra3
C PYRA3 SOURCE JC220346 16/11/29 21:15:31 9221 C---------------------------------------------------------------------| C | C | C CETTE SUBROUTINE TENTE DE CREER DEUX PYRAMIDES A PARTIR | C DES QUADRANGLES IF1 et IF2. | C - IGAGNE=1 EN CAS DE SUCCES | C - IGAGNE=0 EN CAS D'ECHEC | C | C---------------------------------------------------------------------| C IMPLICIT INTEGER(I-N) IMPLICIT REAL*8(A-H,O-Z) -INC TDEMAIT -INC PPARAM -INC CCOPTIO C * WRITE(6,1000) 1000 FORMAT(' ----->>> PYRA3 <<<-----') C nptini=nptmax nfcini=nfcmax ICTF=0 ICTV=0 * CREATION POINT MILIEU NPTMAX=NPTMAX+1 XYZ(4,NPTMAX)=(XYZ(4,IP1)+XYZ(4,IP2)+XYZ(4,JP1)+XYZ(4,JP2))/4. * deplacement du point pour l'eloigner de ii jj xn1=(xyz(2,jj)-xyz(2,ii))*((xyz(3,ip1)+xyz(3,ip2))/2-xyz(3,ii))- > (xyz(3,jj)-xyz(3,ii))*((xyz(2,ip1)+xyz(2,ip2))/2-xyz(2,ii)) yn1=(xyz(3,jj)-xyz(3,ii))*((xyz(1,ip1)+xyz(1,ip2))/2-xyz(1,ii))- > (xyz(1,jj)-xyz(1,ii))*((xyz(3,ip1)+xyz(3,ip2))/2-xyz(3,ii)) zn1=(xyz(1,jj)-xyz(1,ii))*((xyz(2,ip1)+xyz(2,ip2))/2-xyz(2,ii))- > (xyz(2,jj)-xyz(2,ii))*((xyz(1,ip1)+xyz(1,ip2))/2-xyz(1,ii)) sn1=sqrt(xn1**2+yn1**2+zn1**2) xn1=xn1/sn1 yn1=yn1/sn1 zn1=zn1/sn1 xn2=((xyz(2,jp1)+xyz(2,jp2))/2-xyz(2,ii))*(xyz(3,jj)-xyz(3,ii))- > ((xyz(3,jp1)+xyz(3,jp2))/2-xyz(3,ii))*(xyz(2,jj)-xyz(2,ii)) yn2=((xyz(3,jp1)+xyz(3,jp2))/2-xyz(3,ii))*(xyz(1,jj)-xyz(1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xyz(3,nptmax)=zmil+zn*expf*expfac * write (6,*) ' pyra3 creation de 2 elements et pt ',nptmax * write (6,*) (xyz(i,ii),i=1,4) * write (6,*) (xyz(i,jj),i=1,4) * write (6,*) (xyz(i,ip1),i=1,4) * write (6,*) (xyz(i,ip2),i=1,4) * write (6,*) (xyz(i,jp1),i=1,4) * write (6,*) (xyz(i,jp2),i=1,4) * write (6,*) (xyz(i,nptmax),i=1,4) * CREATION DES ELEMENTS IPTT=NPTMAX IF (IOK.EQ.0) THEN NPTMAX=nptini IF (IVERB.EQ.1) WRITE (6,*) ' pyra3 DIST ',nptaux return ENDIF IF (gl.lt.xyz(4,iptt)/4) then IF (IVERB.EQ.1) write (6,*) 'pyra3 GL-1' nptmax=nptini return endif IF (IVERB.EQ.1) write (6,*) ' in2 echec ' NPTMAX=nptini return ENDIF * creations des faces NFCMAX=NFCMAX+1 IF3=NFCMAX NFC(1,IF3)=II NFC(2,IF3)=iptt NFC(3,IF3)=IP1 NFC(4,IF3)=0 * NFCMAX=NFCMAX+1 IF4=NFCMAX NFC(1,IF4)=IP1 NFC(2,IF4)=IPTT NFC(3,IF4)=IP2 NFC(4,IF4)=0 * NFCMAX=NFCMAX+1 IF5=NFCMAX NFC(1,IF5)=IP2 NFC(2,IF5)=IPTT NFC(3,IF5)=JJ NFC(4,IF5)=0 * la face commune NFCMAX=NFCMAX+1 IF6=NFCMAX NFC(1,IF6)=JJ NFC(2,IF6)=IPTT NFC(3,IF6)=II NFC(4,IF6)=0 * NFCMAX=NFCMAX+1 IF7=NFCMAX NFC(1,IF7)=JJ NFC(2,IF7)=iptt NFC(3,IF7)=jp2 NFC(4,IF7)=0 * NFCMAX=NFCMAX+1 IF8=NFCMAX NFC(1,IF8)=jp2 NFC(2,IF8)=iptt NFC(3,IF8)=jp1 NFC(4,IF8)=0 * NFCMAX=NFCMAX+1 IF9=NFCMAX NFC(1,IF9)=jp1 NFC(2,IF9)=iptt NFC(3,IF9)=II NFC(4,IF9)=0 * si necessaire verification diago goto 276 275 continue nptmax=nptini nfcmax=nfcini IF (IVERB.EQ.1) write (6,*) ' pyra3 echec diago' return 276 continue C * verification du premier element element IF (IVERB.EQ.1) write (6,*) 'pyra3-1 solpyr invalide' GOTO 160 endif IF (IVERB.EQ.1) write(6,*) ' pyra3 facet if3 invalide' GOTO 160 ENDIF IF (IVERB.EQ.1) write(6,*) ' pyra3 facet if4 invalide' GOTO 160 ENDIF IF (IVERB.EQ.1) write(6,*) ' pyra3 facet if5 invalide' GOTO 160 ENDIF * verification du deuxieme element element IF (IVERB.EQ.1) write (6,*) 'pyra3-2 solpyr invalide' GOTO 165 endif IF (IVERB.EQ.1) write(6,*) ' pyra3 facet if7 invalide' GOTO 165 ENDIF IF (IVERB.EQ.1) write(6,*) ' pyra1 facet if8 invalide' GOTO 165 ENDIF IF (IVERB.EQ.1) write(6,*) ' pyra1 facet if9 invalide' GOTO 165 ENDIF * OK pour creation elements NVOL=NVOL+1 IF (NFV(1,IF1).EQ.0) NFV(1,IF1)=NVOL IF (NFV(1,IF1).NE.NVOL) NFV(2,IF1)=NVOL IF (NFV(1,IF3).EQ.0) NFV(1,IF3)=NVOL IF (NFV(1,IF3).NE.NVOL) NFV(2,IF3)=NVOL IF (NFV(1,IF4).EQ.0) NFV(1,IF4)=NVOL IF (NFV(1,IF4).NE.NVOL) NFV(2,IF4)=NVOL IF (NFV(1,IF5).EQ.0) NFV(1,IF5)=NVOL IF (NFV(1,IF5).NE.NVOL) NFV(2,IF5)=NVOL IF (NFV(1,IF6).EQ.0) NFV(1,IF6)=NVOL IF (NFV(1,IF6).NE.NVOL) NFV(2,IF6)=NVOL IVOL(9,NVOL)=35 DO 280 I=1,4 IVOL(I,NVOL)=NFC(I,IF1) 280 CONTINUE IVOL(5,NVOL)=iptt if (iimpi.eq.1) write (6,1102) nfacet,(ivol(i,nvol),i=1,5) 1102 FORMAT(' PYRA3-1 facettes ',i5,' pyr5 ',8i5) NVOL=NVOL+1 IVOL(9,NVOL)=35 IF (NFV(1,IF2).EQ.0) NFV(1,IF2)=NVOL IF (NFV(1,IF2).NE.NVOL) NFV(2,IF2)=NVOL IF (NFV(1,IF6).EQ.0) NFV(1,IF6)=NVOL IF (NFV(1,IF6).NE.NVOL) NFV(2,IF6)=NVOL IF (NFV(1,IF7).EQ.0) NFV(1,IF7)=NVOL IF (NFV(1,IF7).NE.NVOL) NFV(2,IF7)=NVOL IF (NFV(1,IF8).EQ.0) NFV(1,IF8)=NVOL IF (NFV(1,IF8).NE.NVOL) NFV(2,IF8)=NVOL IF (NFV(1,IF9).EQ.0) NFV(1,IF9)=NVOL IF (NFV(1,IF9).NE.NVOL) NFV(2,IF9)=NVOL DO 282 I=1,4 IVOL(I,NVOL)=NFC(I,IF2) 282 CONTINUE IVOL(5,NVOL)=iptt if (iimpi.eq.1) write (6,1101) nfacet,(ivol(i,nvol),i=1,5) 1101 FORMAT(' PYRA3-2 facettes ',i5,' pyr5 ',8i5) IGAGNE=1 RETURN 165 continue 160 continue nptmax=nptini nfcmax=nfcini goto 9000 9000 CONTINUE END
© Cast3M 2003 - Tous droits réservés.
Mentions légales