kdom8
C KDOM8 SOURCE KK2000 14/04/10 21:15:14 8032 & NN11,NN12,NN13,NN14,NN15,NN16,NN17,NN18,NN19,NN20, & NN21) C C************************************************************************ C C PROJET : CASTEM 2000 C C NOM : KDOM8 C C DESCRIPTION : This subroutine check whether NN21 is inside of C the PR21 C C LANGAGE : FORTRAN 77 + ESOPE 2000 (avec estensions CISI) C C AUTEUR : A. BECCANTINI, DRN/DMT/SEMT/LTMF C C************************************************************************ C C IMPLICIT INTEGER(I-N) IMPLICIT REAL*8(A-H,O-Z) INTEGER NN1,NN2,NN3,NN4,NN5,NN6,NN7,NN8,NN9,NN10, & NN11,NN12,NN13,NN14,NN15,NN16,NN17,NN18,NN19,NN20, & NN21, I1, IPCEN, IPL, IPR REAL*8 DX0,DY0,DZ0,DX1,DY1,DZ1,NORX1,NORY1,NORZ1,PSCA0,PSCA1 C -INC PPARAM -INC CCOPTIO -INC SMCOORD C C**** First triangle C IPCEN=NN1 IPR=NN3 IPL=NN5 DX0=XCOOR((IPR-1)*(IDIM+1)+1)- & XCOOR((IPCEN-1)*(IDIM+1)+1) DY0=XCOOR((IPR-1)*(IDIM+1)+2)- & XCOOR((IPCEN-1)*(IDIM+1)+2) DZ0=XCOOR((IPR-1)*(IDIM+1)+3)- & XCOOR((IPCEN-1)*(IDIM+1)+3) DX1=XCOOR((IPL-1)*(IDIM+1)+1)- & XCOOR((IPCEN-1)*(IDIM+1)+1) DY1=XCOOR((IPL-1)*(IDIM+1)+2)- & XCOOR((IPCEN-1)*(IDIM+1)+2) DZ1=XCOOR((IPL-1)*(IDIM+1)+3)- & XCOOR((IPCEN-1)*(IDIM+1)+3) NORX1=(DY0*DZ1-DY1*DZ0) NORY1=(DZ0*DX1-DZ1*DX0) NORZ1=(DX0*DY1-DX1*DY0) C C The scalar product between this normal and C CENTRE-IPCEN C DX1=XCOOR((IPCEN-1)*(IDIM+1)+1)- & XCOOR((NN21-1)*(IDIM+1)+1) DY1=XCOOR((IPCEN-1)*(IDIM+1)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IDIM+1)+3)- & XCOOR((IPCEN-1)*(IDIM+1)+3) NORX1=(DY0*DZ1-DY1*DZ0) NORY1=(DZ0*DX1-DZ1*DX0) NORZ1=(DX0*DY1-DX1*DY0) C C The scalar product between this normal and C CENTRE-IPCEN C DX1=XCOOR((IPCEN-1)*(IDIM+1)+1)- & XCOOR((NN21-1)*(IDIM+1)+1) DY1=XCOOR((IPCEN-1)*(IDIM+1)+2)- & XCOOR((NN21-1)*(IDIM+1)+2) DZ1=XCOOR((IPCEN-1)*(IDIM+1)+3)- & XCOOR((NN21-1)*(IDIM+1)+3) PSCA1=DX1*NORX1+DY1*NORY1+DZ1*NORZ1 IF((PSCA1*PSCA0) .LT.0)THEN C WRITE(IOIMP,*) 'Subroutine kdom8.eso' WRITE(IOIMP,*) 'PR21' C C Erreur -107 0 C Liste des noeuds de l'élément : C WRITE(IOIMP,*) NN1,NN2,NN3,NN4,NN5,NN6,NN7,NN8,NN9,NN10 WRITE(IOIMP,*) NN11,NN12,NN13,NN14,NN15,NN16,NN17,NN18,NN19 $ ,NN20 WRITE(IOIMP,*) NN21 C C Erreur 845 2 C Maillage donné incorrect ?!!! C C GOTO 9999 ENDIF ENDDO C 9999 RETURN END
© Cast3M 2003 - Tous droits réservés.
Mentions légales