liimod
C LIIMOD SOURCE OF166741 24/12/18 21:15:19 12092 *----------------------------------------------------------------------* * LECTURE D'UN SOUS-MODELE (TYPE IMODEL) SUR LE FICHIER IURES * * * * Parametres: * * * * IURES Numero du fichier de sortie * * ITLACC Pile contenant les sous-modeles IMODEL * * IFIN Nombre de IMODELs dans la pile * * IFORM Si sauvegarde en format ou non * * * * APPELE PAR : LIPIL * *----------------------------------------------------------------------* SUBROUTINE LIIMOD(IURES,ITLACC,IFIN,IRETOU,IFORM) IMPLICIT INTEGER(I-N) IMPLICIT REAL*8 (A-H,O-Z) -INC PPARAM -INC CCOPTIO -INC CCFXDR c-dbgC==DEB= FORMULATION HHO == INCLUDE ===================================== c-dbg-INC CCHHOPA c-dbgC==FIN= FORMULATION HHO ================================================ -INC SMMODEL SEGMENT,ITLACC INTEGER ITLAC(0) ENDSEGMENT SEGMENT,MTABEI INTEGER ITABEI(NMI) ENDSEGMENT SEGMENT,MTABEC CHARACTER*(8) ITABEC(NMC) ENDSEGMENT INTEGER IDAN(10) CHARACTER*16 MOMODL(10) IRETOU = 0 iimpil = IIMPI c-dbg iimpil = 1972 N45 = 38 idecmo = 4 NIDAN = 10 DO in = 1, 10 IDAN(in) = 0 ENDDO * ------------------------------------------------ * (0.1) PreDimensionnement des tableaux de lecture * ------------------------------------------------ * Rappel : un CHARACTER*16 est decompose en deux CHARACTER*8 NM1 = N45 NM2 = 2 * 5 NM3 = 2 * 10 NM4 = 20 NM5 = idecmo NM6 = 500 NM7 = 10 NM9 = 16 NMI = NM1 + NM4 + NM7 + NM9 NMC = NM2 + NM3 + NM5 + NM6 + NM7 * Tableaux MTABEI et MTABEC (faire un ajustement si besoin) : SEGINI,MTABEI,MTABEC * -------- * BOUCLE SUR LES IMODELs : * -------- c-dbg imHHO = 0 DO IEL = 1, IFIN * ------------------------------------------------------ * (10.1) Lecture des donnes de dimensionnement du IMODEL * ------------------------------------------------------ IRETOU = 0 if (iimpil.eq.1972) then write(ioimp,*) 'LIIMO : IDAN' write(ioimp,fmt='(10i5)') (idan(in),in=1,nidan) endif IF (IRETOU.NE.0) RETURN imNM1 = IDAN( 1) NFOR = IDAN( 2) NMAT = IDAN( 3) MN3 = IDAN( 4) imNM5 = IDAN( 5) imNM6 = IDAN( 6) NOBMOD = IDAN( 7) imNMI = IDAN( 9) imNMC = IDAN(10) if (imNM1.NE.NM1) then write(ioimp,*) 'LIIMOD : incompatibilite imNM1',imNM1,NM1 endif if (imNM5.NE.NM5) then write(ioimp,*) 'LIIMOD : incompatibilite imNM5',imNM5,NM5 endif if (MN3.lt.1) then write(ioimp,*) 'LIIMOD : incompatibilite MN3',MN3,'<1' endif imNM2 = 2 * NFOR imNM3 = 2 * NMAT imNM4 = MN3 imNM7 = NOBMOD imNM9 = NM9 jnNMI = imNM1 + imNM4 + imNM7 + imNM9 jnNMC = imNM2 + imNM3 + imNM5 + imNM6 + imNM7 if (imNMI.NE.jnNMI) then write(ioimp,*) 'LIIMOD : incompatibilite imNMI',imNMI,jnNMI endif if (imNMC.NE.jnNMC) then write(ioimp,*) 'LIIMOD : incompatibilite imNMC',imNMC,jnNMC endif * Ajustement des tableaux MTAB* si besoin : IF (imNMI.GT.NMI) THEN write(ioimp,*) 'LIIMOD ajustement MTABEI',NMI,imNMI NMI = imNMI SEGADJ,MTABEI ENDIF IF (imNMC.GT.NMC) THEN write(ioimp,*) 'LIIMOD ajustement MTABEC',NMC,imNMC NMC = imNMC SEGADJ,MTABEC ENDIF * --------------------------------------------- * (10.2) Lecture des donnees du IMODEL * --------------------------------------------- IRETOU = 0 IF (IRETOU.NE.0) RETURN IRETOU = 0 IF (IRETOU.NE.0) RETURN * ---------------------------------------------- * (10.3) Iniitalisation et remplissage du IMODEL * ---------------------------------------------- SEGINI,IMODEL jnNMI = 0 jnNMC = 0 imodel.IMAMOD = ITABEI( jnNMI + 1 ) imodel.NEFMOD = ITABEI( jnNMI + 2 ) imodel.IPDPGE = ITABEI( jnNMI + 6 ) imodel.IMATEE = ITABEI( jnNMI + 7 ) imodel.INATUU = ITABEI( jnNMI + 8 ) imodel.IDERIV = ITABEI( jnNMI + 38 ) c* Lecture de la FORMULATION (FORMOD et MATMOD) : jin = jnNMC DO in = 1, NFOR jin = jin + 1 imodel.FORMOD(in)(1: 8) = ITABEC( jin ) jin = jin + 1 imodel.FORMOD(in)(9:16) = ITABEC( jin ) ENDDO jnNMC = jnNMC + imNM2 c*dbg write(6,*) ' ',jnNMI,jnNMC,0,imNM2 jin = jnNMC DO in = 1, NMAT jin = jin + 1 imodel.MATMOD(in)(1: 8) = ITABEC( jin ) jin = jin + 1 imodel.MATMOD(in)(9:16) = ITABEC( jin ) ENDDO jnNMC = jnNMC + imNM3 c*dbg write(6,*) ' ',jnNMI,jnNMC,0,imNM3 c* Lecture du constituant et de la phase : imodel.CONMOD = ' ' imodel.CONMOD( 1: 8) = ITABEC( jnNMC + 1 ) imodel.CONMOD( 9:16) = ITABEC( jnNMC + 2 ) imodel.CONMOD(17:24) = ITABEC( jnNMC + 3 ) imodel.CMATEE = ITABEC( jnNMC + 4 ) jnNMC = jnNMC + imNM5 c*dbg write(6,*) ' ',jnNMI,jnNMC,0,imNM5 c* Lecture des NOMID : jin = jnNMC DO in = 1, 14 nbrobl = ITABEI( jnNMI + 7 + 2*in ) nbrfac = ITABEI( jnNMI + 8 + 2*in ) IF (nbrobl+nbrfac.NE.0) THEN SEGINI,nomid DO it = 1, nbrobl jin = jin + 1 nomid.lesobl(it) = ITABEC( jin ) ENDDO DO it = 1, nbrfac jin = jin + 1 nomid.lesfac(it) = ITABEC( jin ) ENDDO imodel.LNOMID(in) = nomid SEGDES,nomid ENDIF ENDDO jnNMI = jnNMI + imNM1 jnNMC = jnNMC + imNM6 c*dbg write(ioimp,*) ' ',jnNMI,jnNMC,imNM1,imNM6 c* Lecture de INFMOD : DO in = 1, MN3 imodel.INFMOD(in) = ITABEI( jnNMI + in ) ENDDO jnNMI = jnNMI + imNM4 c*dbg write(6,*) ' ',jnNMI,jnNMC,imNM4,0 DO in = 1, NOBMOD imodel.TYMODE(in) = ITABEC( jnNMC + in ) imodel.IVAMOD(in) = ITABEI( jnNMI + in ) ENDDO jnNMI = jnNMI + imNM7 jnNMC = jnNMC + imNM7 c*dbg write(ioimp,*) ' ',jnNMI,jnNMC,imNM7,imNM7 DO in = 1, 16 imodel.INFELE(in) = ITABEI( jnNMI + in ) ENDDO jnNMI = jnNMI + imNM9 c*dbg write(ioimp,*) ' ',jnNMI,jnNMC,imNMI,imNMC c-dbgC==DEB= FORMULATION HHO == Sous-Modele de type HHO ===================== c-dbg IF (imodel.NEFMOD .EQ. HHO_NUM_ELEMENT) imHHO = imHHO + 1 c-dbgC==FIN= FORMULATION HHO ================================================ *Petite modification en cas de modele externe : if (NFOR.eq.1) then if (imodel.FORMOD(1).eq.'MECANIQUE ' .or. & imodel.FORMOD(1).eq.'POREUX ') then if (imodel.INATUU.GE.0) goto 200 iumat = 0 ivisc = 0 iviex = 0 do in = 1, NMAT if (matmod(in).eq.'NON_LINEAIRE ') iumat = in if (matmod(in).eq.'VISCO_EXTERNE ') ivisc = in enddo if (iumat.ne.0) then if (matmod(iumat+1).ne.'UTILISATEUR ') then write(ioimp,*) 'maj modele umat incorrect' return endif imodel.INATUU = -1 endif if (ivisc.ne.0) then if (imodel.INATUU.eq.-2) goto 200 c* mise a jour du modele if (iviex.eq.0) then write(ioimp,*) 'MAJ modele IVIEX incorrect' return endif imodel.INATUU = -2 NOBMOD = NOBMOD + 1 SEGADJ,imodel imodel.TYMODE(NOBMOD+1) = 'IVIEX ' imodel.IVAMOD(NOBMOD+1) = iviex endif 200 continue endif endif c* Cas particuliers ne devant plus arriver a ce niveau : do in = 1, NFOR if (imodel.FORMOD(in).eq.'CONVECTION ' ) then write(ioimp,*) 'Formulation CONVECTION lue !!!' write(ioimp,*) 'Incompatible avec niveau < 25' endif if (imodel.FORMOD(in).eq.'RAYONNEMENT ' ) then write(ioimp,*) 'Formulation RAYONNEMENT lue !!!' write(ioimp,*) 'Incompatible avec niveau < 25' endif enddo SEGDES,IMODEL ITLAC(**) = IMODEL ENDDO * -------------------------------------------- * (0.2) Suppression des segments de sauvegarde * -------------------------------------------- SEGSUP,MTABEI,MTABEC c-dbgC==DEB= FORMULATION HHO ================================================ c-dbg CALL HHOPIL(2,imHHO,imHHO) c-dbgC==FIN= FORMULATION HHO ================================================ c RETURN END
© Cast3M 2003 - Tous droits réservés.
Mentions légales