wrimod
C WRIMOD SOURCE OF166741 24/12/18 21:15:39 12092 *----------------------------------------------------------------------* * Ecriture d'un IMODEL sur le fichier IOSAU. * * * * Parametres : * * * * IOSAU Numero du fichier de sortie * * ITLACC Pile contenant les pointeurs IMODELs * * IDEB Indice dans la pile du premier IMODEL a traiter * * IFIN Indice dans la pile du dernier IMODEL a traiter * * IFORM Si sauvegarde en format ou non * * * * Appele par : WRPIL * *----------------------------------------------------------------------* SUBROUTINE WRIMOD(IOSAU,ITLACC,IDEB,IFIN,NIVEAU,IFORM) IMPLICIT INTEGER(I-N) IMPLICIT REAL*8(A-H,O-Z) -INC PPARAM -INC CCFXDR c-dbgC==DEB= FORMULATION HHO == INCLUDE ===================================== c-dbg-INC CCHHOPA c-dbg-INC CCHHORS 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) if (niveau.lt.26) then write(6,*) 'Niveau incompatible avec objet IMODEL ' endif N45 = 38 idecmo = 4 NIDAN = 10 DO in = 1, 10 IDAN(in) = 0 ENDDO * --------------------------------------------------- * (0.1) PreDimensionnement des tableaux de sauvegarde * --------------------------------------------------- * Rappel : On decompose un CHARACTER*16 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 (10) SUR LES IMODELs : * ------------- c-dbg imHHO = 0 DO 10 IEL = IDEB, IFIN IMODEL = ITLAC(IEL) IF (IMODEL.EQ.0) GOTO 10 SEGACT,IMODEL 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 ================================================ * ------------------------------------------------- * (10.1) Dimensionnement des tableaux de sauvegarde * ------------------------------------------------- * MATMOD & FORMOD passage DE CHARACTER*8 EN CHARACTER*16 NFOR = imodel.FORMOD(/2) NMAT = imodel.MATMOD(/2) MN3 = imodel.INFMOD(/1) NOBMOD = imodel.TYMODE(/2) if (MN3.lt.1) then write(6,*) 'WRIMOD : MN3 = INFMOD(/1) < 1' endif imNM1 = NM1 imNM2 = 2 * NFOR imNM3 = 2 * NMAT imNM4 = MN3 imNM5 = NM5 imNM7 = NOBMOD imNM9 = NM9 imNM6 = 0 DO in = 1, 14 nomid = imodel.LNOMID(in) if (nomid.ne.0) then SEGACT,nomid imNM6 = imNM6 + nomid.lesobl(/2) + nomid.lesfac(/2) endif ENDDO imNMI = imNM1 + imNM4 + imNM7 + imNM9 imNMC = imNM2 + imNM3 + imNM5 + imNM6 + imNM7 * Ajustement des tableaux MTAB* si besoin : IF (imNMI.GT.NMI) THEN write(6,*) 'WRIMOD',IMODEL,' MTABEI',NMI,imNMI write(6,*) ' ',NM1,NM4,NM7,NM9 write(6,*) ' ',imNM1,imNM4,imNM7,imNM9 NMI = imNMI SEGADJ,MTABEI ENDIF IF (imNMC.GT.NMC) THEN write(6,*) 'WRIMOD',IMODEL,' MTABEC',NMC,imNMC write(6,*) ' ',NM2,NM3,NM5,NM6,NM7 write(6,*) ' ',imNM2,imNM3,imNM5,imNM6,imNM7 NMC = imNMC SEGADJ,MTABEC ENDIF * --------------------------------------------- * (10.2) Remplissage des tableaux de sauvegarde * --------------------------------------------- IDAN( 1) = N45 IDAN( 2) = NFOR IDAN( 3) = NMAT IDAN( 4) = MN3 IDAN( 5) = idecmo IDAN( 6) = imNM6 IDAN( 7) = NOBMOD IDAN( 8) = 0 IDAN( 9) = imNMI IDAN(10) = imNMC jnNMI = 0 jnNMC = 0 ITABEI( jnNMI + 1 ) = imodel.IMAMOD ITABEI( jnNMI + 2 ) = imodel.NEFMOD ITABEI( jnNMI + 3 ) = NFOR ITABEI( jnNMI + 4 ) = NMAT ITABEI( jnNMI + 5 ) = MN3 ITABEI( jnNMI + 6 ) = imodel.IPDPGE ITABEI( jnNMI + 7 ) = imodel.IMATEE ITABEI( jnNMI + 8 ) = imodel.INATUU ITABEI( jnNMI + 37 ) = NOBMOD ITABEI( jnNMI + 38 ) = imodel.IDERIV jin = jnNMC DO in = 1, NFOR jin = jin + 1 ITABEC( jin ) = imodel.FORMOD(in)(1:8) jin = jin + 1 ITABEC( jin ) = imodel.FORMOD(in)(9:16) ENDDO jnNMC = jnNMC + imNM2 c-dbg write(6,*) ' ',jnNMI,jnNMC,0,imNM2 jin = jnNMC DO in = 1, NMAT jin = jin + 1 ITABEC( jin ) = imodel.MATMOD(in)(1:8) jin = jin + 1 ITABEC( jin ) = imodel.MATMOD(in)(9:16) ENDDO jnNMC = jnNMC + imNM3 c-dbg write(6,*) ' ',jnNMI,jnNMC,0,imNM3 ITABEC( jnNMC + 1 ) = CONMOD(1:8) ITABEC( jnNMC + 2 ) = CONMOD(9:16) ITABEC( jnNMC + 3 ) = CONMOD(17:24) ITABEC( jnNMC + 4 ) = CMATEE jnNMC = jnNMC + imNM5 c-dbg write(6,*) ' ',jnNMI,jnNMC,0,imNM5 jin = jnNMC DO in = 1, 14 nbrobl = 0 nbrfac = 0 nomid = imodel.LNOMID(in) if (nomid.ne.0) then nbrobl = nomid.lesobl(/2) nbrfac = nomid.lesfac(/2) endif ITABEI( jnNMI + 7 + 2*in ) = nbrobl ITABEI( jnNMI + 8 + 2*in ) = nbrfac do it = 1, nbrobl jin = jin + 1 ITABEC( jin ) = nomid.lesobl(it) enddo do it = 1, nbrfac jin = jin + 1 ITABEC( jin ) = nomid.lesfac(it) enddo if (nomid.ne.0) SEGDES,nomid ENDDO jnNMI = jnNMI + imNM1 jnNMC = jnNMC + imNM6 c-dbg write(6,*) ' ',jnNMI,jnNMC,imNM1,imNM6 DO in = 1, MN3 ITABEI( jnNMI + in ) = INFMOD(in) ENDDO jnNMI = jnNMI + imNM4 c-dbg write(6,*) ' ',jnNMI,jnNMC,imNM4,0 DO in = 1, NOBMOD ITABEC( jnNMC + in ) = TYMODE(in) ITABEI( jnNMI + in ) = IVAMOD(in) ENDDO jnNMI = jnNMI + imNM7 jnNMC = jnNMC + imNM7 c-dbg write(6,*) ' ',jnNMI,jnNMC,imNM7,imNM7 DO in = 1, 16 ITABEI( jnNMI + in ) = INFELE(in) ENDDO jnNMI = jnNMI + imNM9 c-dbg write(6,*) ' ',jnNMI,jnNMC,imNMI,imNMC SEGDES,IMODEL * ------------------------------------------ * (10.3) Ecriture des tableaux de sauvegarde * ------------------------------------------ IF (imNMI.GT.0) THEN ENDIF IF (imNMC.GT.0) THEN ENDIF 10 CONTINUE * -------------------------------------------- * (0.2) Suppression des segments de sauvegarde * -------------------------------------------- SEGSUP,MTABEI,MTABEC c-dbg* (0.3) =DEB= FORMULATION HHO = Cas particulier ======================== c-dbg CALL HHOPIL(2,imHHO,imHHO) c-dbg* (0.3) =FIN= FORMULATION HHO ========================================== c RETURN END
© Cast3M 2003 - Tous droits réservés.
Mentions légales