kdom10
C KDOM10 SOURCE CB215821 20/11/25 13:31:01 10792 C C************************************************************************ C C PROJET : CASTEM 2000 C C NOM : KDOM10 C C DESCRIPTION : Subroutine called by KDOM1 in the case of EULER C model C We fill the domain table MTAB 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) C INTEGER MTAB, JG, IELEM, ISOUS, NBELEM, NBNN, NBREF, NBSOUS, NBS & ,NBE0, IGEOM, JGM, JGN, NN1, NN2, NN3, NN4, NN5, NN6, NTP & ,LAST, LISFAC(6), INOE, NNOEU, NFAC, NNOEUT, LISFAT(4), NFACT & ,LASTT,IFAC, NSOM, LASTS, NNS, LISSOM(8),LIFAC(5,6) & ,LIFACT(4,4), NBSFP, MCHPSU, MCHPNO, MCHPMR, MCHDIA LOGICAL LOGCOM CHARACTER*8 TYPI -INC PPARAM -INC CCOPTIO -INC SMELEME -INC SMLENTI -INC SMCHPOI -INC SMLMOTS -INC SMCOORD POINTEUR MELCEN.MELEME, MELMAI.MELEME, MLREST.MLENTI & , MLRES.MLENTI, MELTFA.MELEME, MLRESS.MLENTI & , MELSOM.MELEME, MELFAC.MELEME, MELFAL.MELEME, MLEFAC.MLENTI & , MLETOF.MLENTI, IPTT.MELEME, IPTQ.MELEME, MELFAP.MELEME C C Elements allowed are 'SEG3' 'TRI7' 'QUA9' 'TE15' 'PY19' 'PR21' 'CU27' C ITYPEL 3 7 11 35 36 34 33 C TYPI='MAILLAGE' IF(IERR.NE.0)GOTO 9999 C C 2D 3D C**** 'MAILLAGE' complex 1D/2D elts 2D/3D elts C 'CENTRE' 'POI1' (ITYPEL = 1) 1D/2D elts 2D/3D elts C 'SOMMET' 'POI1' (ITYPEL = 1) 2D elts 3D elts C 'FACE' 'POI1' (ITYPEL = 1) 2D elts 3D elts C 'FACEL' 'SEG3' (ITYPEL = 3) 2D elts 3D elts C 'FACEP' 'SEG3' (ITYPEL = 3) in 2D 2D elts 3D elts C complex in 3D C C 'ELTFA' complex 2D elts 3D elts C SEGACT MELEME NBS=MELEME.LISOUS(/1) IF(NBS .EQ. 0) NBS=1 JG=NBS C MLENTI contains ITYPEL C MLENT1 contains NBELEM SEGINI MLENTI SEGINI MLENT1 DO ISOUS=1,NBS,1 IF(NBS .NE. 1)THEN IPT1=MELEME.LISOUS(ISOUS) SEGACT IPT1 ELSE IPT1=MELEME ENDIF C We have already checked the elements available in KDOM2 C We have already checked that they are referred just ONCE C (each MELEME.LISOUS(ISOUS) has different ITYPEL) C MLENTI.LECT(ISOUS)=IPT1.ITYPEL MLENT1.LECT(ISOUS)=IPT1.NUM(/2) ENDDO C C**** Compatibility check C C We do not allow 1D/2D meshes and 2D/3D meshes C IF(IDIM.EQ.2)THEN IF(MLENTI.LECT(1) .EQ. 3)THEN LOGCOM=.FALSE. IF(NBS .NE. 1)THEN WRITE(IOIMP,*) 'Euler model' GOTO 9999 ENDIF ELSE LOGCOM=.TRUE. DO ISOUS=2,NBS,1 IF(MLENTI.LECT(ISOUS) .EQ. 3)THEN WRITE(IOIMP,*) 'Euler model' WRITE(IOIMP,*) 'No mixing between 1D and 2D' GOTO 9999 ENDIF ENDDO ENDIF ELSE C C****** 3D. C No 1D possibility C DO ISOUS=1,NBS,1 IF(MLENTI.LECT(ISOUS) .EQ. 3)THEN WRITE(IOIMP,*) 'Euler model' WRITE(IOIMP,*) 'No 1D meshes in 3D' GOTO 9999 ENDIF ENDDO C IF((MLENTI.LECT(1) .EQ. 7) .OR. (MLENTI.LECT(1) .EQ. 11))THEN LOGCOM=.FALSE. DO ISOUS=1,NBS,1 IF((MLENTI.LECT(ISOUS) .NE. 7) .AND. & (MLENTI.LECT(ISOUS) .NE. 11))THEN WRITE(IOIMP,*) 'Euler model' WRITE(IOIMP,*) 'No mixing between 2D and 3D' GOTO 9999 ENDIF ENDDO ELSE LOGCOM=.TRUE. DO ISOUS=2,NBS,1 IF((MLENTI.LECT(NBS) .EQ. 7) .OR. & (MLENTI.LECT(NBS) .EQ. 11))THEN WRITE(IOIMP,*) 'Euler model' WRITE(IOIMP,*) 'No mixing between 2D and 3D' GOTO 9999 ENDIF ENDDO ENDIF ENDIF C C**** 'MAILLAGE' C 'CENTRE' C C Initialisation C SEGINI, MELMAI=MELEME NBREF=0 IF(NBS .EQ. 1)THEN ISOUS=1 IF(MLENTI.LECT(ISOUS) .EQ. 3)THEN C SEG3 -> SEG2 MELMAI.ITYPEL=2 NBNN=2 ELSEIF(MLENTI.LECT(ISOUS) .EQ. 7)THEN C TRI7 -> TRI3 MELMAI.ITYPEL=4 NBNN=3 ELSEIF(MLENTI.LECT(ISOUS) .EQ. 11)THEN C QUA9 -> QUA4 MELMAI.ITYPEL=8 NBNN=4 ELSEIF(MLENTI.LECT(ISOUS) .EQ. 35)THEN C TE15 -> TET4 MELMAI.ITYPEL=23 NBNN=4 ELSEIF(MLENTI.LECT(ISOUS) .EQ. 36)THEN C PY19 -> PYR5 MELMAI.ITYPEL=25 NBNN=5 ELSEIF(MLENTI.LECT(ISOUS) .EQ. 34)THEN C PR21 -> PRI6 MELMAI.ITYPEL=16 NBNN=6 ELSEIF(MLENTI.LECT(ISOUS) .EQ. 33)THEN C CU27 -> CUB8 MELMAI.ITYPEL=14 NBNN=8 ENDIF NBELEM=MLENT1.LECT(ISOUS) NBSOUS=0 SEGADJ MELMAI NBE0=NBELEM ELSE NBE0=0 DO ISOUS=1,NBS,1 NBELEM=MLENT1.LECT(ISOUS) IF(MLENTI.LECT(ISOUS) .EQ. 3)THEN WRITE(IOIMP,*) 'Subroutine kdom10.eso' GOTO 9999 ELSEIF(MLENTI.LECT(ISOUS) .EQ. 7)THEN C TRI7 -> TRI3 NBNN=3 MELMAI.ITYPEL=4 ELSEIF(MLENTI.LECT(ISOUS) .EQ. 11)THEN C QUA9 -> QUA4 MELMAI.ITYPEL=8 NBNN=4 ELSEIF(MLENTI.LECT(ISOUS) .EQ. 35)THEN C TE15 -> TET4 MELMAI.ITYPEL=23 NBNN=4 ELSEIF(MLENTI.LECT(ISOUS) .EQ. 36)THEN C PY19 -> PYR5 MELMAI.ITYPEL=25 NBNN=5 ELSEIF(MLENTI.LECT(ISOUS) .EQ. 34)THEN C PR21 -> PRI6 MELMAI.ITYPEL=16 NBNN=6 ELSEIF(MLENTI.LECT(ISOUS) .EQ. 33)THEN C CU27 -> CUB8 MELMAI.ITYPEL=14 NBNN=8 ENDIF NBSOUS=0 SEGINI IPT2 MELMAI.LISOUS(ISOUS)=IPT2 IPT2.ITYPEL=MELMAI.ITYPEL MELMAI.ITYPEL=0 NBE0=NBE0+NBELEM IPT1=MELEME.LISOUS(ISOUS) ENDDO ENDIF C NBELEM=NBE0 NBNN=1 NBSOUS=0 NBREF=0 SEGINI MELCEN MELCEN.ITYPEL=1 NBE0=0 C C**** Filling C DO ISOUS=1,NBS,1 IF(NBS.EQ.1)THEN IPT1=MELEME IPT2=MELMAI ELSE IPT1=MELEME.LISOUS(ISOUS) IPT2=MELMAI.LISOUS(ISOUS) ENDIF NBELEM=MLENT1.LECT(ISOUS) IF(MLENTI.LECT(ISOUS) .EQ. 3)THEN C SEG DO IELEM=1,NBELEM,1 NBE0=NBE0+1 IPT2.NUM(1,IELEM)=IPT1.NUM(1,IELEM) IPT2.NUM(2,IELEM)=IPT1.NUM(3,IELEM) IPT2.ICOLOR(IELEM)=IPT1.ICOLOR(IELEM) MELCEN.NUM(1,NBE0)=IPT1.NUM(2,IELEM) MELCEN.ICOLOR(NBE0)=IPT1.ICOLOR(IELEM) ENDDO ELSEIF(MLENTI.LECT(ISOUS) .EQ. 7)THEN C TRI DO IELEM=1,NBELEM,1 NBE0=NBE0+1 IPT2.NUM(1,IELEM)=IPT1.NUM(1,IELEM) IPT2.NUM(2,IELEM)=IPT1.NUM(3,IELEM) IPT2.NUM(3,IELEM)=IPT1.NUM(5,IELEM) IPT2.ICOLOR(IELEM)=IPT1.ICOLOR(IELEM) MELCEN.NUM(1,NBE0)=IPT1.NUM(7,IELEM) MELCEN.ICOLOR(NBE0)=IPT1.ICOLOR(IELEM) ENDDO ELSEIF(MLENTI.LECT(ISOUS) .EQ. 11)THEN C QUA DO IELEM=1,NBELEM,1 NBE0=NBE0+1 IPT2.NUM(1,IELEM)=IPT1.NUM(1,IELEM) IPT2.NUM(2,IELEM)=IPT1.NUM(3,IELEM) IPT2.NUM(3,IELEM)=IPT1.NUM(5,IELEM) IPT2.NUM(4,IELEM)=IPT1.NUM(7,IELEM) IPT2.ICOLOR(IELEM)=IPT1.ICOLOR(IELEM) MELCEN.NUM(1,NBE0)=IPT1.NUM(9,IELEM) MELCEN.ICOLOR(NBE0)=IPT1.ICOLOR(IELEM) ENDDO ELSEIF(MLENTI.LECT(ISOUS) .EQ. 35)THEN C TET DO IELEM=1,NBELEM,1 NBE0=NBE0+1 IPT2.NUM(1,IELEM)=IPT1.NUM(1,IELEM) IPT2.NUM(2,IELEM)=IPT1.NUM(3,IELEM) IPT2.NUM(3,IELEM)=IPT1.NUM(5,IELEM) IPT2.NUM(4,IELEM)=IPT1.NUM(10,IELEM) IPT2.ICOLOR(IELEM)=IPT1.ICOLOR(IELEM) MELCEN.NUM(1,NBE0)=IPT1.NUM(15,IELEM) MELCEN.ICOLOR(NBE0)=IPT1.ICOLOR(IELEM) ENDDO ELSEIF(MLENTI.LECT(ISOUS) .EQ. 36)THEN C PYR DO IELEM=1,NBELEM,1 NBE0=NBE0+1 IPT2.NUM(1,IELEM)=IPT1.NUM(1,IELEM) IPT2.NUM(2,IELEM)=IPT1.NUM(3,IELEM) IPT2.NUM(3,IELEM)=IPT1.NUM(5,IELEM) IPT2.NUM(4,IELEM)=IPT1.NUM(7,IELEM) IPT2.NUM(5,IELEM)=IPT1.NUM(13,IELEM) IPT2.ICOLOR(IELEM)=IPT1.ICOLOR(IELEM) MELCEN.NUM(1,NBE0)=IPT1.NUM(19,IELEM) MELCEN.ICOLOR(NBE0)=IPT1.ICOLOR(IELEM) ENDDO ELSEIF(MLENTI.LECT(ISOUS) .EQ. 34)THEN C PRI DO IELEM=1,NBELEM,1 NBE0=NBE0+1 IPT2.NUM(1,IELEM)=IPT1.NUM(1,IELEM) IPT2.NUM(2,IELEM)=IPT1.NUM(3,IELEM) IPT2.NUM(3,IELEM)=IPT1.NUM(5,IELEM) IPT2.NUM(4,IELEM)=IPT1.NUM(10,IELEM) IPT2.NUM(5,IELEM)=IPT1.NUM(12,IELEM) IPT2.NUM(6,IELEM)=IPT1.NUM(14,IELEM) IPT2.ICOLOR(IELEM)=IPT1.ICOLOR(IELEM) MELCEN.NUM(1,NBE0)=IPT1.NUM(21,IELEM) MELCEN.ICOLOR(NBE0)=IPT1.ICOLOR(IELEM) ENDDO ELSEIF(MLENTI.LECT(ISOUS) .EQ. 33)THEN C CUB DO IELEM=1,NBELEM,1 NBE0=NBE0+1 IPT2.NUM(1,IELEM)=IPT1.NUM(1,IELEM) IPT2.NUM(2,IELEM)=IPT1.NUM(3,IELEM) IPT2.NUM(3,IELEM)=IPT1.NUM(5,IELEM) IPT2.NUM(4,IELEM)=IPT1.NUM(7,IELEM) IPT2.NUM(5,IELEM)=IPT1.NUM(13,IELEM) IPT2.NUM(6,IELEM)=IPT1.NUM(15,IELEM) IPT2.NUM(7,IELEM)=IPT1.NUM(17,IELEM) IPT2.NUM(8,IELEM)=IPT1.NUM(19,IELEM) IPT2.ICOLOR(IELEM)=IPT1.ICOLOR(IELEM) MELCEN.NUM(1,NBE0)=IPT1.NUM(27,IELEM) MELCEN.ICOLOR(NBE0)=IPT1.ICOLOR(IELEM) ENDDO ELSE WRITE(IOIMP,*) 'Subroutine kdom10.eso' ENDIF ENDDO SEGDES MELCEN SEGDES MELMAI C C**** Volume C TYPI='CENTRE ' JGN=4 JGM=1 SEGINI MLMOTS C SEGACT MPOVAL C SEGSUP MLMOTS NBE0=0 DO ISOUS=1,NBS,1 IF(NBS.EQ.1) THEN IPT1=MELEME ELSE IPT1=MELEME.LISOUS(ISOUS) ENDIF C NBELEM=MLENT1.LECT(ISOUS) IF(MLENTI.LECT(ISOUS) .EQ. 3)THEN C SEG3 DO IELEM=1,NBELEM,1 NBE0=NBE0+1 NN1=IPT1.NUM(1,IELEM) NN2=IPT1.NUM(2,IELEM) NN3=IPT1.NUM(3,IELEM) ENDDO ELSEIF(MLENTI.LECT(ISOUS) .EQ. 7)THEN C TRI DO IELEM=1,NBELEM,1 NBE0=NBE0+1 NN1=IPT1.NUM(1,IELEM) NN2=IPT1.NUM(3,IELEM) NN3=IPT1.NUM(5,IELEM) NN4=IPT1.NUM(7,IELEM) C Vol TRI7 as a vol of a degenerate QUA9 ENDDO ELSEIF(MLENTI.LECT(ISOUS) .EQ. 11)THEN C QUA DO IELEM=1,NBELEM,1 NBE0=NBE0+1 NN1=IPT1.NUM(1,IELEM) NN2=IPT1.NUM(3,IELEM) NN3=IPT1.NUM(5,IELEM) NN4=IPT1.NUM(7,IELEM) NN5=IPT1.NUM(9,IELEM) ENDDO ELSEIF(MLENTI.LECT(ISOUS) .EQ. 35)THEN C TET DO IELEM=1,NBELEM,1 NBE0=NBE0+1 NN1=IPT1.NUM(1,IELEM) NN2=IPT1.NUM(3,IELEM) NN3=IPT1.NUM(5,IELEM) NN4=IPT1.NUM(10,IELEM) ENDDO ELSEIF(MLENTI.LECT(ISOUS) .EQ. 36)THEN C PYR DO IELEM=1,NBELEM,1 NBE0=NBE0+1 NN1=IPT1.NUM(1,IELEM) NN2=IPT1.NUM(3,IELEM) NN3=IPT1.NUM(5,IELEM) NN4=IPT1.NUM(7,IELEM) NN5=IPT1.NUM(14,IELEM) NN6=IPT1.NUM(13,IELEM) ENDDO ELSEIF(MLENTI.LECT(ISOUS) .EQ. 34)THEN C PRI C To compute the volume, we divide it into 2 C TET et 3 PYR C DO IELEM=1,NBELEM,1 VOL=0.0D0 NBE0=NBE0+1 NN1=IPT1.NUM(1,IELEM) NN2=IPT1.NUM(3,IELEM) NN3=IPT1.NUM(5,IELEM) NN4=IPT1.NUM(21,IELEM) NN1=IPT1.NUM(14,IELEM) NN2=IPT1.NUM(12,IELEM) NN3=IPT1.NUM(10,IELEM) NN4=IPT1.NUM(21,IELEM) NN1=IPT1.NUM(1,IELEM) NN2=IPT1.NUM(10,IELEM) NN3=IPT1.NUM(12,IELEM) NN4=IPT1.NUM(3,IELEM) NN5=IPT1.NUM(16,IELEM) NN6=IPT1.NUM(21,IELEM) NN1=IPT1.NUM(3,IELEM) NN2=IPT1.NUM(12,IELEM) NN3=IPT1.NUM(14,IELEM) NN4=IPT1.NUM(5,IELEM) NN5=IPT1.NUM(17,IELEM) NN6=IPT1.NUM(21,IELEM) NN1=IPT1.NUM(10,IELEM) NN2=IPT1.NUM(1,IELEM) NN3=IPT1.NUM(5,IELEM) NN4=IPT1.NUM(14,IELEM) NN5=IPT1.NUM(18,IELEM) NN6=IPT1.NUM(21,IELEM) ENDDO C ELSEIF(MLENTI.LECT(ISOUS) .EQ. 33)THEN C CUB C To compute the volume, we divide it into 6 PYR C DO IELEM=1,NBELEM,1 VOL=0.0D0 NBE0=NBE0+1 NN1=IPT1.NUM(1,IELEM) NN2=IPT1.NUM(3,IELEM) NN3=IPT1.NUM(5,IELEM) NN4=IPT1.NUM(7,IELEM) NN5=IPT1.NUM(25,IELEM) NN6=IPT1.NUM(27,IELEM) NN1=IPT1.NUM(19,IELEM) NN2=IPT1.NUM(17,IELEM) NN3=IPT1.NUM(15,IELEM) NN4=IPT1.NUM(13,IELEM) NN5=IPT1.NUM(26,IELEM) NN6=IPT1.NUM(27,IELEM) NN1=IPT1.NUM(1,IELEM) NN2=IPT1.NUM(13,IELEM) NN3=IPT1.NUM(15,IELEM) NN4=IPT1.NUM(3,IELEM) NN5=IPT1.NUM(21,IELEM) NN6=IPT1.NUM(27,IELEM) NN1=IPT1.NUM(3,IELEM) NN2=IPT1.NUM(15,IELEM) NN3=IPT1.NUM(17,IELEM) NN4=IPT1.NUM(5,IELEM) NN5=IPT1.NUM(22,IELEM) NN6=IPT1.NUM(27,IELEM) NN1=IPT1.NUM(7,IELEM) NN2=IPT1.NUM(5,IELEM) NN3=IPT1.NUM(17,IELEM) NN4=IPT1.NUM(19,IELEM) NN5=IPT1.NUM(23,IELEM) NN6=IPT1.NUM(27,IELEM) NN1=IPT1.NUM(19,IELEM) NN2=IPT1.NUM(13,IELEM) NN3=IPT1.NUM(1,IELEM) NN4=IPT1.NUM(7,IELEM) NN5=IPT1.NUM(24,IELEM) NN6=IPT1.NUM(27,IELEM) ENDDO ELSE WRITE(IOIMP,*) 'Subroutine kdom10.eso' ENDIF ENDDO C C C C**** For the moment we have: C 'QUAF' C 'MAILLAGE' C 'CENTRE' C 'XXVOLUM' C C In the complete case (2D mesh in 2D and 3D mesh in 3D): C IF(LOGCOM)THEN C C******* We create ELTFA C SEGINI, MELTFA=MELEME NBREF=0 IF(NBS .EQ. 1)THEN ISOUS=1 IF(MLENTI.LECT(ISOUS) .EQ. 7)THEN C TRI3 NBNN=3 MELTFA.ITYPEL=4 C ELTFA TRI3 ELSEIF(MLENTI.LECT(ISOUS) .EQ. 11)THEN C QUA4 NBNN=4 MELTFA.ITYPEL=8 C ELTFA QUA4 ELSEIF(MLENTI.LECT(ISOUS) .EQ. 35)THEN C TET4 NBNN=4 MELTFA.ITYPEL=23 C ELTFA TET4 ELSEIF(MLENTI.LECT(ISOUS) .EQ. 36)THEN C PYR5 NBNN=5 MELTFA.ITYPEL=9 C ELTFA QUA5 ELSEIF(MLENTI.LECT(ISOUS) .EQ. 34)THEN C PRI6 NBNN=5 MELTFA.ITYPEL=25 C ELTFA PYR5 ELSEIF(MLENTI.LECT(ISOUS) .EQ. 33)THEN C CUB8 NBNN=6 MELTFA.ITYPEL=16 C ELTFA PRI6 ELSE WRITE(IOIMP,*) 'Subroutine kdom10.eso' GOTO 9999 ENDIF NBELEM=MLENT1.LECT(ISOUS) NBSOUS=0 SEGADJ MELTFA ELSE DO ISOUS=1,NBS,1 NBELEM=MLENT1.LECT(ISOUS) IF(MLENTI.LECT(ISOUS) .EQ. 7)THEN C TRI3 NBNN=3 MELTFA.ITYPEL=4 C ELTFA TRI3 ELSEIF(MLENTI.LECT(ISOUS) .EQ. 11)THEN C QUA4 NBNN=4 MELTFA.ITYPEL=8 C ELTFA QUA4 ELSEIF(MLENTI.LECT(ISOUS) .EQ. 35)THEN C TET4 NBNN=4 MELTFA.ITYPEL=23 C ELTFA TET4 ELSEIF(MLENTI.LECT(ISOUS) .EQ. 36)THEN C PYR5 NBNN=5 MELTFA.ITYPEL=9 C ELTFA QUA5 ELSEIF(MLENTI.LECT(ISOUS) .EQ. 34)THEN C PRI6 NBNN=5 MELTFA.ITYPEL=25 C ELTFA PYR5 ELSEIF(MLENTI.LECT(ISOUS) .EQ. 33)THEN C CUB8 NBNN=6 MELTFA.ITYPEL=16 C ELTFA PRI6 ELSE WRITE(IOIMP,*) 'Subroutine kdom10.eso' GOTO 9999 ENDIF NBSOUS=0 SEGINI IPT2 MELTFA.LISOUS(ISOUS)=IPT2 C IPT2.ITYPEL=MELTFA.ITYPEL MELTFA.ITYPEL=0 ENDDO ENDIF C C******* We fill ELTFA C We also count: C NFACT = number of triangular faces C NFAC = number of non-triangular faces C NSOM = number of SOMMET C NTP=nbpts JG=NTP NFAC=0 NFACT=0 NSOM=0 LAST=-1 SEGINI MLRES LASTT=-1 SEGINI MLREST LASTS=-1 SEGINI MLRESS C LAST+MLRES = chaining list to find the (non-triangular faces) DO ISOUS=1,NBS,1 IF(NBS.EQ.1) THEN IPT1=MELEME IPT2=MELTFA ELSE IPT1=MELEME.LISOUS(ISOUS) IPT2=MELTFA.LISOUS(ISOUS) ENDIF C NBELEM=MLENT1.LECT(ISOUS) IF(MLENTI.LECT(ISOUS) .EQ. 7)THEN C TRI (2D) LISFAC(1)=2 LISFAC(2)=4 LISFAC(3)=6 LISSOM(1)=1 LISSOM(2)=3 LISSOM(3)=5 NNS=3 NNOEU=3 NNOEUT=0 ELSEIF(MLENTI.LECT(ISOUS) .EQ. 11)THEN C QUA (2D) LISFAC(1)=2 LISFAC(2)=4 LISFAC(3)=6 LISFAC(4)=8 LISSOM(1)=1 LISSOM(2)=3 LISSOM(3)=5 LISSOM(4)=7 NNS=4 NNOEU=4 NNOEUT=0 ELSEIF(MLENTI.LECT(ISOUS) .EQ. 35)THEN C TET LISFAT(1)=11 LISFAT(2)=12 LISFAT(3)=13 LISFAT(4)=14 LISSOM(1)=1 LISSOM(2)=3 LISSOM(3)=5 LISSOM(4)=10 NNS=4 NNOEU=0 NNOEUT=4 ELSEIF(MLENTI.LECT(ISOUS) .EQ. 36)THEN C PYR LISFAC(1)=14 LISFAT(1)=15 LISFAT(2)=16 LISFAT(3)=17 LISFAT(4)=18 LISSOM(1)=1 LISSOM(2)=3 LISSOM(3)=5 LISSOM(4)=7 LISSOM(5)=13 NNS=5 NNOEU=1 NNOEUT=4 ELSEIF(MLENTI.LECT(ISOUS) .EQ. 34)THEN C PRI LISFAC(1)=16 LISFAC(2)=17 LISFAC(3)=18 LISFAT(1)=19 LISFAT(2)=20 LISSOM(1)=1 LISSOM(2)=3 LISSOM(3)=5 LISSOM(4)=10 LISSOM(5)=12 LISSOM(6)=14 NNS=6 NNOEU=3 NNOEUT=2 ELSEIF(MLENTI.LECT(ISOUS) .EQ. 33)THEN C CUB LISFAC(1)=25 LISFAC(2)=26 LISFAC(3)=21 LISFAC(4)=22 LISFAC(5)=23 LISFAC(6)=24 LISSOM(1)=1 LISSOM(2)=3 LISSOM(3)=5 LISSOM(4)=7 LISSOM(5)=13 LISSOM(6)=15 LISSOM(7)=17 LISSOM(8)=19 NNS=8 NNOEU=6 NNOEUT=0 ELSE WRITE(IOIMP,*) 'Subroutine kdom10.eso' ENDIF C DO IELEM=1,NBELEM,1 IFAC=0 DO INOE=1,NNOEU,1 NN1=IPT1.NUM(LISFAC(INOE),IELEM) IFAC=IFAC+1 IPT2.NUM(IFAC,IELEM)=NN1 IF(MLRES.LECT(NN1) .EQ. 0)THEN NFAC=NFAC+1 MLRES.LECT(NN1)=LAST LAST=NN1 ENDIF ENDDO DO INOE=1,NNOEUT,1 NN1=IPT1.NUM(LISFAT(INOE),IELEM) IFAC=IFAC+1 IPT2.NUM(IFAC,IELEM)=NN1 IF(MLREST.LECT(NN1) .EQ. 0)THEN NFACT=NFACT+1 MLREST.LECT(NN1)=LASTT LASTT=NN1 ENDIF ENDDO DO INOE=1,NNS,1 NN1=IPT1.NUM(LISSOM(INOE),IELEM) IF(MLRESS.LECT(NN1) .EQ. 0)THEN NSOM=NSOM+1 MLRESS.LECT(NN1)=LASTS LASTS=NN1 ENDIF ENDDO C C************* Cas particulier: PRISME C IF(MLENTI.LECT(ISOUS) .EQ. 34)THEN NN1=IPT2.NUM(1,IELEM) NN2=IPT2.NUM(2,IELEM) NN3=IPT2.NUM(3,IELEM) DO INOE=1,2 IPT2.NUM(INOE,IELEM)=IPT2.NUM(INOE+3,IELEM) ENDDO IPT2.NUM(3,IELEM)=NN1 IPT2.NUM(4,IELEM)=NN2 IPT2.NUM(5,IELEM)=NN3 ENDIF ENDDO C C ENDDO SEGDES MELTFA CC CC******* Test CC C write(*,*) 'Triangular faces ', nfact C 10 if(lastt .ne. -1)then C write(*,*) lastt C lastt=mlrest.lect(lastt) C endif C if(lastt .ne. -1) goto 10 C write(*,*) 'Non triangular faces ', nfac C 20 if(last .ne. -1)then C write(*,*) last C last=mlres.lect(last) C endif C if(last .ne. -1) goto 20 C write(*,*) 'Sommets ', nsom C 30 if(lasts .ne. -1)then C write(*,*) lasts C lasts=mlress.lect(lasts) C endif C if(lasts .ne. -1) goto 30 C CC CC******* Fin test CC C C******** Creation of SOMMET C NBELEM=NSOM NBNN=1 NBSOUS=0 NBREF=0 SEGINI MELSOM MELSOM.ITYPEL=1 DO IELEM=1,NSOM,1 MELSOM.NUM(1,IELEM)=LASTS LASTS=MLRESS.LECT(LASTS) ENDDO IF(LASTS .NE. -1)THEN WRITE(IOIMP,*) 'Subroutine kdom10.eso' ENDIF SEGDES MELSOM SEGSUP MLRESS C C******** Creation of FACE (in 3D, triangle first) C NBELEM=NFAC+NFACT NBNN=1 NBSOUS=0 NBREF=0 SEGINI MELFAC MELFAC.ITYPEL=1 DO IELEM=1,NFACT,1 MELFAC.NUM(1,IELEM)=LASTT LASTT=MLREST.LECT(LASTT) ENDDO IF(LASTT .NE. -1)THEN WRITE(IOIMP,*) 'Subroutine kdom10.eso' ENDIF DO IELEM=1,NFAC,1 MELFAC.NUM(1,NFACT+IELEM)=LAST LAST=MLRES.LECT(LAST) ENDDO IF(LAST .NE. -1)THEN WRITE(IOIMP,*) 'Subroutine kdom10.eso' ENDIF SEGDES MELFAC SEGSUP MLRES SEGSUP MLREST C C******* Creation of FACEL and FACEP C C SEGINI MLEFAC JG=NFAC+NFACT SEGINI MLETOF C C MLETOF.LECT(I1) = how many times has the i-th face of MELFAP C already been touched? C NBELEM=NFAC+NFACT NBNN=3 NBSOUS=0 NBREF=0 SEGINI MELFAL MELFAL.ITYPEL=3 C IF(IDIM.EQ.2)THEN C FACEP is a SEG3 NBELEM=NFAC NBNN=3 NBSOUS=0 NBREF=0 SEGINI MELFAP MELFAP.ITYPEL=3 IPTQ=MELFAP ELSEIF(NFAC.EQ.0)THEN C In 3D we have triangles only C TRI4 NBELEM=NFACT NBSOUS=0 NBREF=0 NBNN=4 SEGINI MELFAP IPTT=MELFAP MELFAP.ITYPEL=5 ELSEIF(NFACT.EQ.0)THEN C In 3D we have quadrangles only C QUA5 NBELEM=NFAC NBSOUS=0 NBREF=0 NBNN=5 SEGINI MELFAP IPTQ=MELFAP MELFAP.ITYPEL=9 ELSE C TRI4 5 C QUA5 9 NBELEM=0 NBNN=0 NBSOUS=2 NBREF=0 SEGINI MELFAP MELFAP.ITYPEL=0 C NBELEM=NFACT NBSOUS=0 NBREF=0 NBNN=4 SEGINI IPTT MELFAP.LISOUS(1)=IPTT IPTT.ITYPEL=5 C NBELEM=NFAC NBSOUS=0 NBREF=0 NBNN=5 SEGINI IPTQ MELFAP.LISOUS(2)=IPTQ IPTQ.ITYPEL=9 ENDIF C NBSFP = NBSOUS for FACEP C NBSFP=NBSOUS C DO ISOUS=1,NBS,1 C C********** Loop on the elementary mesh of the QUAF C C We recall that C MLENTI.LECT(ISOUS) contains the type of support of C MELEME.LISOUS C MLENT1.LECT(ISOUS) contains the number of elements of C MELEME.LISOUS C IF(NBS.EQ.1) THEN IPT1=MELEME ELSE IPT1=MELEME.LISOUS(ISOUS) ENDIF C IF(MLENTI.LECT(ISOUS) .EQ. 7)THEN C TRI (2D) LIFAC(1,1)=2 LIFAC(2,1)=1 LIFAC(3,1)=3 LIFAC(1,2)=4 LIFAC(2,2)=3 LIFAC(3,2)=5 LIFAC(1,3)=6 LIFAC(2,3)=5 LIFAC(3,3)=1 C Here we put the center point in LISSOM LISSOM(1)=7 C Number of non-triangular and triangular faces NNOEU=3 NNOEUT=0 C ELSEIF(MLENTI.LECT(ISOUS) .EQ. 11)THEN C QUA (2D) LIFAC(1,1)=2 LIFAC(2,1)=1 LIFAC(3,1)=3 LIFAC(1,2)=4 LIFAC(2,2)=3 LIFAC(3,2)=5 LIFAC(1,3)=6 LIFAC(2,3)=5 LIFAC(3,3)=7 LIFAC(1,4)=8 LIFAC(2,4)=7 LIFAC(3,4)=1 LISSOM(1)=9 NNOEU=4 NNOEUT=0 ELSEIF(MLENTI.LECT(ISOUS) .EQ. 35)THEN C TET LIFACT(1,1)=11 LIFACT(2,1)=1 LIFACT(3,1)=3 LIFACT(4,1)=5 LIFACT(1,2)=12 LIFACT(2,2)=1 LIFACT(3,2)=10 LIFACT(4,2)=3 LIFACT(1,3)=13 LIFACT(2,3)=3 LIFACT(3,3)=10 LIFACT(4,3)=5 LIFACT(1,4)=14 LIFACT(2,4)=10 LIFACT(3,4)=1 LIFACT(4,4)=5 LISSOM(1)=15 NNOEU=0 NNOEUT=4 ELSEIF(MLENTI.LECT(ISOUS) .EQ. 36)THEN C PYR LIFAC(1,1)=14 LIFAC(2,1)=1 LIFAC(3,1)=3 LIFAC(4,1)=5 LIFAC(5,1)=7 LIFACT(1,1)=15 LIFACT(2,1)=1 LIFACT(3,1)=13 LIFACT(4,1)=3 LIFACT(1,2)=16 LIFACT(2,2)=3 LIFACT(3,2)=13 LIFACT(4,2)=5 LIFACT(1,3)=17 LIFACT(2,3)=5 LIFACT(3,3)=13 LIFACT(4,3)=7 LIFACT(1,4)=18 LIFACT(2,4)=13 LIFACT(3,4)=1 LIFACT(4,4)=7 LISSOM(1)=19 NNOEU=1 NNOEUT=4 ELSEIF(MLENTI.LECT(ISOUS) .EQ. 34)THEN C PRI LIFAC(1,1)=16 LIFAC(2,1)=1 LIFAC(3,1)=10 LIFAC(4,1)=12 LIFAC(5,1)=3 LIFAC(1,2)=17 LIFAC(2,2)=3 LIFAC(3,2)=12 LIFAC(4,2)=14 LIFAC(5,2)=5 LIFAC(1,3)=18 LIFAC(2,3)=1 LIFAC(3,3)=5 LIFAC(4,3)=14 LIFAC(5,3)=10 LIFACT(1,1)=19 LIFACT(2,1)=1 LIFACT(3,1)=3 LIFACT(4,1)=5 LIFACT(1,2)=20 LIFACT(2,2)=10 LIFACT(3,2)=14 LIFACT(4,2)=12 LISSOM(1)=21 NNOEU=3 NNOEUT=2 ELSEIF(MLENTI.LECT(ISOUS) .EQ. 33)THEN C CUB LIFAC(1,1)=21 LIFAC(2,1)=1 LIFAC(3,1)=13 LIFAC(4,1)=15 LIFAC(5,1)=3 LIFAC(1,2)=22 LIFAC(2,2)=3 LIFAC(3,2)=15 LIFAC(4,2)=17 LIFAC(5,2)=5 LIFAC(1,3)=23 LIFAC(2,3)=5 LIFAC(3,3)=17 LIFAC(4,3)=19 LIFAC(5,3)=7 LIFAC(1,4)=24 LIFAC(2,4)=1 LIFAC(3,4)=7 LIFAC(4,4)=19 LIFAC(5,4)=13 LIFAC(1,5)=25 LIFAC(2,5)=1 LIFAC(3,5)=3 LIFAC(4,5)=5 LIFAC(5,5)=7 LIFAC(1,6)=26 LIFAC(2,6)=13 LIFAC(3,6)=19 LIFAC(4,6)=17 LIFAC(5,6)=15 LISSOM(1)=27 NNOEU=6 NNOEUT=0 ELSE WRITE(IOIMP,*) 'Subroutine kdom10.eso' ENDIF C NBELEM=MLENT1.LECT(ISOUS) DO IELEM=1,NBELEM,1 C NNOEU = number of quagrangular elements DO INOE=1,NNOEU,1 C NN1 is the global number of the face C NN2 is the local number of the face in the MELEME C 'FACE' C The MELEME 'FACE' contains : -triangular faces C (MELEME IPTT) C -non-triangular faces C (MELEME IPTQ) C Then NN3 = position of NN1 in IPTQ = NN2 - NFACT C where NFACT is the total number of triangular faces C NN1=IPT1.NUM(LIFAC(1,INOE),IELEM) NN2=MLEFAC.LECT(NN1) NN3=NN2-NFACT IF(MLETOF.LECT(NN2).EQ.0)THEN C C MLETOF.LECT(NN2) = how many times the face NN2 has C been touched? C MLETOF.LECT(NN2)=1 MELFAL.NUM(2,NN2)=NN1 MELFAL.NUM(1,NN2)=IPT1.NUM(LISSOM(1),IELEM) MELFAL.NUM(3,NN2)=IPT1.NUM(LISSOM(1),IELEM) IF(IDIM .EQ.2)THEN IPTQ.NUM(1,NN3)=IPT1.NUM(LIFAC(2,INOE),IELEM) IPTQ.NUM(2,NN3)=IPT1.NUM(LIFAC(3,INOE),IELEM) IPTQ.NUM(3,NN3)=NN1 ELSE IPTQ.NUM(1,NN3)=IPT1.NUM(LIFAC(2,INOE),IELEM) IPTQ.NUM(2,NN3)=IPT1.NUM(LIFAC(3,INOE),IELEM) IPTQ.NUM(3,NN3)=IPT1.NUM(LIFAC(4,INOE),IELEM) IPTQ.NUM(4,NN3)=IPT1.NUM(LIFAC(5,INOE),IELEM) IPTQ.NUM(5,NN3)=NN1 ENDIF ELSEIF(MLETOF.LECT(NN2).EQ.1)THEN MLETOF.LECT(NN2)=2 MELFAL.NUM(3,NN2)=IPT1.NUM(LISSOM(1),IELEM) ELSE WRITE(IOIMP,*) 'Subroutine kdom10.eso' ENDIF ENDDO DO INOE=1,NNOEUT,1 C NN1 is the global number of the face C NN2 is the local number of the face in the MELEME C 'FACE' and is also the position of NN1 in IPTT C NN1=IPT1.NUM(LIFACT(1,INOE),IELEM) NN2=MLEFAC.LECT(NN1) IF(MLETOF.LECT(NN2).EQ.0)THEN MLETOF.LECT(NN2)=1 MELFAL.NUM(2,NN2)=NN1 MELFAL.NUM(1,NN2)=IPT1.NUM(LISSOM(1),IELEM) MELFAL.NUM(3,NN2)=IPT1.NUM(LISSOM(1),IELEM) IPTT.NUM(1,NN2)=IPT1.NUM(LIFACT(2,INOE),IELEM) IPTT.NUM(2,NN2)=IPT1.NUM(LIFACT(3,INOE),IELEM) IPTT.NUM(3,NN2)=IPT1.NUM(LIFACT(4,INOE),IELEM) IPTT.NUM(4,NN2)=NN1 ELSEIF(MLETOF.LECT(NN2).EQ.1)THEN MLETOF.LECT(NN2)=2 MELFAL.NUM(3,NN2)=IPT1.NUM(LISSOM(1),IELEM) ELSE WRITE(IOIMP,*) 'Subroutine kdom10.eso' ENDIF ENDDO ENDDO ENDDO IF(NBSFP .NE. 0)THEN SEGDES IPTQ SEGDES IPTT ENDIF SEGDES MELFAL SEGDES MELFAP C SEGDES MELFAP C SEGDES MELFAP C SEGDES MELFAP SEGSUP MLETOF SEGSUP MLEFAC C C******** Creation of 'XXSURFAC', 'XXNORMAF', 'MATROT' C IF(IERR.NE.0)GOTO 9999 C C******** Creation of 'XXDIEMIN' C IF(IERR.NE.0)GOTO 9999 C ENDIF C C C***** Fin qui C C SEGSUP MLENTI SEGSUP MLENT1 C 9999 RETURN C END
© Cast3M 2003 - Tous droits réservés.
Mentions légales