Télécharger wrimod.eso

Retour à la liste

Numérotation des lignes :

wrimod
  1. C WRIMOD SOURCE OF166741 24/12/18 21:15:39 12092
  2.  
  3. *----------------------------------------------------------------------*
  4. * Ecriture d'un IMODEL sur le fichier IOSAU. *
  5. * *
  6. * Parametres : *
  7. * *
  8. * IOSAU Numero du fichier de sortie *
  9. * ITLACC Pile contenant les pointeurs IMODELs *
  10. * IDEB Indice dans la pile du premier IMODEL a traiter *
  11. * IFIN Indice dans la pile du dernier IMODEL a traiter *
  12. * IFORM Si sauvegarde en format ou non *
  13. * *
  14. * Appele par : WRPIL *
  15. *----------------------------------------------------------------------*
  16.  
  17. SUBROUTINE WRIMOD(IOSAU,ITLACC,IDEB,IFIN,NIVEAU,IFORM)
  18.  
  19. IMPLICIT INTEGER(I-N)
  20. IMPLICIT REAL*8(A-H,O-Z)
  21.  
  22. -INC PPARAM
  23. -INC CCFXDR
  24.  
  25. c-dbgC==DEB= FORMULATION HHO == INCLUDE =====================================
  26. c-dbg-INC CCHHOPA
  27. c-dbg-INC CCHHORS
  28. c-dbgC==FIN= FORMULATION HHO ================================================
  29.  
  30. -INC SMMODEL
  31.  
  32. SEGMENT,ITLACC
  33. INTEGER ITLAC(0)
  34. ENDSEGMENT
  35.  
  36. SEGMENT,MTABEI
  37. INTEGER ITABEI(NMI)
  38. ENDSEGMENT
  39. SEGMENT,MTABEC
  40. CHARACTER*(8) ITABEC(NMC)
  41. ENDSEGMENT
  42.  
  43. INTEGER IDAN(10)
  44.  
  45. if (niveau.lt.26) then
  46. write(6,*) 'Niveau incompatible avec objet IMODEL '
  47. call erreur(5)
  48. endif
  49.  
  50. N45 = 38
  51. idecmo = 4
  52.  
  53. NIDAN = 10
  54. DO in = 1, 10
  55. IDAN(in) = 0
  56. ENDDO
  57.  
  58. * ---------------------------------------------------
  59. * (0.1) PreDimensionnement des tableaux de sauvegarde
  60. * ---------------------------------------------------
  61. * Rappel : On decompose un CHARACTER*16 en deux CHARACTER*8
  62. NM1 = N45
  63. NM2 = 2 * 5
  64. NM3 = 2 * 10
  65. NM4 = 20
  66. NM5 = idecmo
  67. NM6 = 500
  68. NM7 = 10
  69. NM9 = 16
  70.  
  71. NMI = NM1 + NM4 + NM7 + NM9
  72. NMC = NM2 + NM3 + NM5 + NM6 + NM7
  73.  
  74. * Tableaux MTABEI et MTABEC (faire un ajustement si besoin) :
  75. SEGINI,MTABEI,MTABEC
  76.  
  77. * -------------
  78. * BOUCLE (10) SUR LES IMODELs :
  79. * -------------
  80. c-dbg imHHO = 0
  81.  
  82. DO 10 IEL = IDEB, IFIN
  83.  
  84. IMODEL = ITLAC(IEL)
  85. IF (IMODEL.EQ.0) GOTO 10
  86.  
  87. SEGACT,IMODEL
  88.  
  89. c-dbgC==DEB= FORMULATION HHO == Sous-Modele de type HHO =====================
  90. c-dbg IF (imodel.NEFMOD .EQ. HHO_NUM_ELEMENT) imHHO = imHHO + 1
  91. c-dbgC==FIN= FORMULATION HHO ================================================
  92.  
  93. * -------------------------------------------------
  94. * (10.1) Dimensionnement des tableaux de sauvegarde
  95. * -------------------------------------------------
  96. * MATMOD & FORMOD passage DE CHARACTER*8 EN CHARACTER*16
  97. NFOR = imodel.FORMOD(/2)
  98. NMAT = imodel.MATMOD(/2)
  99. MN3 = imodel.INFMOD(/1)
  100. NOBMOD = imodel.TYMODE(/2)
  101.  
  102. if (MN3.lt.1) then
  103. write(6,*) 'WRIMOD : MN3 = INFMOD(/1) < 1'
  104. call erreur(5)
  105. endif
  106.  
  107. imNM1 = NM1
  108. imNM2 = 2 * NFOR
  109. imNM3 = 2 * NMAT
  110. imNM4 = MN3
  111. imNM5 = NM5
  112. imNM7 = NOBMOD
  113. imNM9 = NM9
  114. imNM6 = 0
  115. DO in = 1, 14
  116. nomid = imodel.LNOMID(in)
  117. if (nomid.ne.0) then
  118. SEGACT,nomid
  119. imNM6 = imNM6 + nomid.lesobl(/2) + nomid.lesfac(/2)
  120. endif
  121. ENDDO
  122.  
  123. imNMI = imNM1 + imNM4 + imNM7 + imNM9
  124. imNMC = imNM2 + imNM3 + imNM5 + imNM6 + imNM7
  125.  
  126. * Ajustement des tableaux MTAB* si besoin :
  127. IF (imNMI.GT.NMI) THEN
  128. write(6,*) 'WRIMOD',IMODEL,' MTABEI',NMI,imNMI
  129. write(6,*) ' ',NM1,NM4,NM7,NM9
  130. write(6,*) ' ',imNM1,imNM4,imNM7,imNM9
  131. NMI = imNMI
  132. SEGADJ,MTABEI
  133. ENDIF
  134. IF (imNMC.GT.NMC) THEN
  135. write(6,*) 'WRIMOD',IMODEL,' MTABEC',NMC,imNMC
  136. write(6,*) ' ',NM2,NM3,NM5,NM6,NM7
  137. write(6,*) ' ',imNM2,imNM3,imNM5,imNM6,imNM7
  138. NMC = imNMC
  139. SEGADJ,MTABEC
  140. ENDIF
  141.  
  142. * ---------------------------------------------
  143. * (10.2) Remplissage des tableaux de sauvegarde
  144. * ---------------------------------------------
  145. IDAN( 1) = N45
  146. IDAN( 2) = NFOR
  147. IDAN( 3) = NMAT
  148. IDAN( 4) = MN3
  149. IDAN( 5) = idecmo
  150. IDAN( 6) = imNM6
  151. IDAN( 7) = NOBMOD
  152. IDAN( 8) = 0
  153. IDAN( 9) = imNMI
  154. IDAN(10) = imNMC
  155.  
  156. jnNMI = 0
  157. jnNMC = 0
  158.  
  159. ITABEI( jnNMI + 1 ) = imodel.IMAMOD
  160. ITABEI( jnNMI + 2 ) = imodel.NEFMOD
  161. ITABEI( jnNMI + 3 ) = NFOR
  162. ITABEI( jnNMI + 4 ) = NMAT
  163. ITABEI( jnNMI + 5 ) = MN3
  164. ITABEI( jnNMI + 6 ) = imodel.IPDPGE
  165. ITABEI( jnNMI + 7 ) = imodel.IMATEE
  166. ITABEI( jnNMI + 8 ) = imodel.INATUU
  167. ITABEI( jnNMI + 37 ) = NOBMOD
  168. ITABEI( jnNMI + 38 ) = imodel.IDERIV
  169.  
  170. jin = jnNMC
  171. DO in = 1, NFOR
  172. jin = jin + 1
  173. ITABEC( jin ) = imodel.FORMOD(in)(1:8)
  174. jin = jin + 1
  175. ITABEC( jin ) = imodel.FORMOD(in)(9:16)
  176. ENDDO
  177. jnNMC = jnNMC + imNM2
  178. c-dbg write(6,*) ' ',jnNMI,jnNMC,0,imNM2
  179. jin = jnNMC
  180. DO in = 1, NMAT
  181. jin = jin + 1
  182. ITABEC( jin ) = imodel.MATMOD(in)(1:8)
  183. jin = jin + 1
  184. ITABEC( jin ) = imodel.MATMOD(in)(9:16)
  185. ENDDO
  186. jnNMC = jnNMC + imNM3
  187. c-dbg write(6,*) ' ',jnNMI,jnNMC,0,imNM3
  188. ITABEC( jnNMC + 1 ) = CONMOD(1:8)
  189. ITABEC( jnNMC + 2 ) = CONMOD(9:16)
  190. ITABEC( jnNMC + 3 ) = CONMOD(17:24)
  191. ITABEC( jnNMC + 4 ) = CMATEE
  192. jnNMC = jnNMC + imNM5
  193. c-dbg write(6,*) ' ',jnNMI,jnNMC,0,imNM5
  194.  
  195. jin = jnNMC
  196. DO in = 1, 14
  197. nbrobl = 0
  198. nbrfac = 0
  199. nomid = imodel.LNOMID(in)
  200. if (nomid.ne.0) then
  201. nbrobl = nomid.lesobl(/2)
  202. nbrfac = nomid.lesfac(/2)
  203. endif
  204. ITABEI( jnNMI + 7 + 2*in ) = nbrobl
  205. ITABEI( jnNMI + 8 + 2*in ) = nbrfac
  206. do it = 1, nbrobl
  207. jin = jin + 1
  208. ITABEC( jin ) = nomid.lesobl(it)
  209. enddo
  210. do it = 1, nbrfac
  211. jin = jin + 1
  212. ITABEC( jin ) = nomid.lesfac(it)
  213. enddo
  214. if (nomid.ne.0) SEGDES,nomid
  215. ENDDO
  216. jnNMI = jnNMI + imNM1
  217. jnNMC = jnNMC + imNM6
  218. c-dbg write(6,*) ' ',jnNMI,jnNMC,imNM1,imNM6
  219.  
  220. DO in = 1, MN3
  221. ITABEI( jnNMI + in ) = INFMOD(in)
  222. ENDDO
  223. jnNMI = jnNMI + imNM4
  224. c-dbg write(6,*) ' ',jnNMI,jnNMC,imNM4,0
  225.  
  226. DO in = 1, NOBMOD
  227. ITABEC( jnNMC + in ) = TYMODE(in)
  228. ITABEI( jnNMI + in ) = IVAMOD(in)
  229. ENDDO
  230. jnNMI = jnNMI + imNM7
  231. jnNMC = jnNMC + imNM7
  232. c-dbg write(6,*) ' ',jnNMI,jnNMC,imNM7,imNM7
  233.  
  234. DO in = 1, 16
  235. ITABEI( jnNMI + in ) = INFELE(in)
  236. ENDDO
  237. jnNMI = jnNMI + imNM9
  238. c-dbg write(6,*) ' ',jnNMI,jnNMC,imNMI,imNMC
  239.  
  240. SEGDES,IMODEL
  241.  
  242. * ------------------------------------------
  243. * (10.3) Ecriture des tableaux de sauvegarde
  244. * ------------------------------------------
  245. CALL ECDIFE(IOSAU,NIDAN,IDAN,IFORM)
  246. IF (imNMI.GT.0) THEN
  247. CALL ECDIFE(IOSAU,imNMI,ITABEI,IFORM)
  248. ENDIF
  249. IF (imNMC.GT.0) THEN
  250. CALL ECDIFN(IOSAU,imNMC,MTABEC,IFORM)
  251. ENDIF
  252.  
  253. 10 CONTINUE
  254.  
  255. * --------------------------------------------
  256. * (0.2) Suppression des segments de sauvegarde
  257. * --------------------------------------------
  258. SEGSUP,MTABEI,MTABEC
  259.  
  260. c-dbg* (0.3) =DEB= FORMULATION HHO = Cas particulier ========================
  261. c-dbg CALL HHOPIL(2,imHHO,imHHO)
  262. c-dbg* (0.3) =FIN= FORMULATION HHO ==========================================
  263.  
  264. c RETURN
  265. END
  266.  
  267.  
  268.  

© Cast3M 2003 - Tous droits réservés.
Mentions légales