Télécharger konjp1.eso

Retour à la liste

Numérotation des lignes :

konjp1
  1. C KONJP1 SOURCE OF166741 24/12/13 21:16:37 12097
  2. SUBROUTINE KONJP1(ILINC,ILINP,IRN,IUN,IPN,IGAMN,INORM,ICHPVO
  3. $ ,ICHPSU,MELEMC,MELEFE,MELLIM,IMAT)
  4. C
  5. C************************************************************************
  6. C
  7. C PROJET : CASTEM 2000
  8. C
  9. C NOM : KONJP1
  10. C
  11. C DESCRIPTION : Voir KON14
  12. C Calcul du jacobien du résidu pour la méthode de
  13. C VLH (variable primales = variables primitives,
  14. C variable duales = variables conservatives)
  15. C
  16. C Cas deux dimensions, gaz "calorically perfect"
  17. C
  18. C LANGAGE : FORTRAN 77 + ESOPE 2000 (avec estensions CISI)
  19. C
  20. C AUTEUR : A. BECCANTINI, DRN/DMT/SFME/LTMF
  21. C
  22. C************************************************************************
  23. C
  24. C
  25. C APPELES (Outils
  26. C CASTEM) : KRIPAD, LICHT, ERREUR
  27. C
  28. C APPELES (Calcul) : VLHJ1, VLHJ3
  29. C
  30. C************************************************************************
  31. C
  32. C ENTREES
  33. C
  34. C ILINC : liste des inconnues duales (pointeur d'un LISTMOTS)
  35. C
  36. C ILINP : liste des inconnues primales (pointeur d'un LISTMOTS)
  37. C
  38. C 1) Pointeurs des CHPOINT
  39. C
  40. C IRN : CHPOINT CENTRE contenant la masse volumique ;
  41. C
  42. C IUN : CHPOINT CENTRE contenant la vitesse ;
  43. C
  44. C IPN : CHPOINT CENTRE contenant la pression ;
  45. C
  46. C IGAMN : CHPOINT CENTRE contenant le gamma ;
  47. C
  48. C INORM : CHPOINT FACE contenant les normales aux faces ;
  49. C
  50. C ICHPVO : CHPOINT VOLUME contenant le volume
  51. C
  52. C ICHPSU : CHPOINT FACE contenant la surface des faces
  53. C
  54. C
  55. C 2) Pointeurs de MELEME de la table DOMAINE
  56. C
  57. C MELEMC : MELEME 'CENTRE' du SPG des CENTRES
  58. C
  59. C MELEFE : MELEME 'FACEL' du connectivité Faces -> Elts
  60. C
  61. C MELLIM : MELEME SPG des conditions aux bords
  62. C
  63. C SORTIES
  64. C
  65. C IMAT : pointeur de la MATRIK du jacobien du residu
  66. C
  67. C************************************************************************
  68. C
  69. C HISTORIQUE (Anomalies et modifications éventuelles)
  70. C
  71. C HISTORIQUE :
  72. C
  73. C************************************************************************
  74. C
  75. C
  76. C N.B.: On suppose qu'on a déjà controllé RO, P > 0
  77. C GAMMA \in (1,3)
  78. C Si non il faut le faire!!!
  79. C
  80. C************************************************************************
  81. C
  82. IMPLICIT INTEGER(I-N)
  83. INTEGER ILINC, ILINP, IRN,IUN,IPN,IGAMN,INORM,ICHPVO,ICHPSU
  84. & , IMAT, IGEOMC, IGEOMF
  85. & , NFAC, NBSOUS, NBREF, NBELEM, NBNN, NRIGE, NMATRI, NKID
  86. & , NKMT, NBME, NBEL, MP, NP
  87. & , IFAC, NGCF, NLCF, NGCG, NGCD, NLCG, NLCD, NLFL
  88. REAL*8 ROG, PG, UXG, UYG, RETG, GAMG, VOLG
  89. & , ROD, PD, UXD, UYD, RETD, GAMD, VOLD
  90. & , SURF, CNX, CNY, CTX, CTY, FUNCEL
  91. & , DFRO(4), DFRET(4), DFRUN(4), DFRUT(4)
  92. CHARACTER*8 TYPE
  93. C
  94. C**** LES INCLUDES
  95. C
  96.  
  97. -INC PPARAM
  98. -INC CCOPTIO
  99. -INC SMCHPOI
  100. -INC SMELEME
  101. -INC SMLMOTS
  102. -INC SMLENTI
  103. POINTEUR MPRN.MPOVAL, MPUN.MPOVAL, MPPN.MPOVAL, MPGAMN.MPOVAL,
  104. & MPNORM.MPOVAL, MPVOLU.MPOVAL, MPOVSU.MPOVAL
  105. POINTEUR MELEMC.MELEME, MELEMF.MELEME, MELEFE.MELEME,
  106. & MELEDU.MELEME,MELLIM.MELEME
  107. POINTEUR MLENTC.MLENTI, MLENTF.MLENTI, MLELIM.MLENTI
  108. POINTEUR RR.IZAFM, RUX.IZAFM, RUY.IZAFM, RP.IZAFM,
  109. & UXR.IZAFM, UXUX.IZAFM, UXUY.IZAFM, UXP.IZAFM,
  110. & UYR.IZAFM, UYUX.IZAFM, UYUY.IZAFM, UYP.IZAFM,
  111. & RETR.IZAFM, RETUX.IZAFM, RETUY.IZAFM, RETP.IZAFM
  112. POINTEUR MLMINC.MLMOTS
  113. C
  114. C**** KRIPAD pour la correspondance global/local des conditions limits
  115. C
  116. CALL KRIPAD(MELLIM,MLELIM)
  117. C SEGACT MELLIM
  118. C
  119. C**** KRIPAD pour la correspondance global/local des centres
  120. C
  121. CALL KRIPAD(MELEMC,MLENTC)
  122. C
  123. C SEGACT MLENTC
  124. SEGACT MELEMC
  125. C
  126. SEGACT MELEFE
  127. C
  128. CALL LICHT(ICHPSU,MPOVSU,TYPE,IGEOMF)
  129. CALL LICHT(INORM,MPNORM,TYPE,IGEOMF)
  130. CALL LICHT(ICHPVO,MPVOLU,TYPE,IGEOMC)
  131. C
  132. C**** LICHT active les MPOVALs en *MOD
  133. C
  134. C i.e.
  135. C
  136. C SEGACT MPOVSU*MOD
  137. C SEGACT MPOVNO*MOD
  138. C SEGACT MPVOLU*MOD
  139. C
  140. MELEMF = IGEOMF
  141. CALL KRIPAD(MELEMF,MLENTF)
  142. C
  143. C SEGACT MLENTF
  144. SEGACT MELEMF
  145. C
  146. CALL LICHT(IRN,MPRN,TYPE,IGEOMC)
  147. CALL LICHT(IPN,MPPN,TYPE,IGEOMC)
  148. CALL LICHT(IUN,MPUN,TYPE,IGEOMC)
  149. CALL LICHT(IGAMN,MPGAMN,TYPE,IGEOMC)
  150. C
  151. C SEGACT MPRN*MOD
  152. C SEGACT MPPN*MOD
  153. C SEGACT MPUN*MOD
  154. C SEGACT MPGAMN*MOD
  155. C
  156. NFAC = MELEFE.NUM(/2)
  157. C
  158. C**** Maillage des inconnues primales
  159. C
  160. NBSOUS = 0
  161. NBREF = 0
  162. NBELEM = NFAC
  163. NBNN = 2
  164. C
  165. SEGINI MELEDU
  166. C MELEPR = MELEDU
  167. C
  168. C**** MELEDU = 'SEG2'
  169. C
  170. MELEDU.ITYPEL = 2
  171. C
  172. NRIGE = 7
  173. NMATRI = 1
  174. NKID = 9
  175. NKMT = 7
  176. C
  177. SEGINI MATRIK
  178. IMAT = MATRIK
  179. MATRIK.IRIGEL(1,1) = MELEDU
  180. MATRIK.IRIGEL(2,1) = MELEDU
  181. C
  182. C**** Matrice non symetrique
  183. C
  184. MATRIK.IRIGEL(7,1) = 2
  185. C
  186. NBME = 16
  187. NBSOUS = 1
  188. SEGINI IMATRI
  189. MATRIK.IRIGEL(4,1) = IMATRI
  190. C
  191. C**** Variables primales (primitives)
  192. C
  193. MLMINC = ILINP
  194. SEGACT MLMINC
  195. IMATRI.LISPRI(1) = MLMINC.MOTS(1)
  196. IMATRI.LISPRI(2) = MLMINC.MOTS(2)
  197. IMATRI.LISPRI(3) = MLMINC.MOTS(3)
  198. IMATRI.LISPRI(4) = MLMINC.MOTS(4)
  199. IMATRI.LISPRI(5) = MLMINC.MOTS(1)
  200. IMATRI.LISPRI(6) = MLMINC.MOTS(2)
  201. IMATRI.LISPRI(7) = MLMINC.MOTS(3)
  202. IMATRI.LISPRI(8) = MLMINC.MOTS(4)
  203. IMATRI.LISPRI(9) = MLMINC.MOTS(1)
  204. IMATRI.LISPRI(10) = MLMINC.MOTS(2)
  205. IMATRI.LISPRI(11) = MLMINC.MOTS(3)
  206. IMATRI.LISPRI(12) = MLMINC.MOTS(4)
  207. IMATRI.LISPRI(13) = MLMINC.MOTS(1)
  208. IMATRI.LISPRI(14) = MLMINC.MOTS(2)
  209. IMATRI.LISPRI(15) = MLMINC.MOTS(3)
  210. IMATRI.LISPRI(16) = MLMINC.MOTS(4)
  211. SEGDES MLMINC
  212. C
  213. C**** Variables duales (conservatives)
  214. C
  215. MLMINC = ILINC
  216. SEGACT MLMINC
  217. IMATRI.LISDUA(1) = MLMINC.MOTS(1)
  218. IMATRI.LISDUA(2) = MLMINC.MOTS(1)
  219. IMATRI.LISDUA(3) = MLMINC.MOTS(1)
  220. IMATRI.LISDUA(4) = MLMINC.MOTS(1)
  221. IMATRI.LISDUA(5) = MLMINC.MOTS(2)
  222. IMATRI.LISDUA(6) = MLMINC.MOTS(2)
  223. IMATRI.LISDUA(7) = MLMINC.MOTS(2)
  224. IMATRI.LISDUA(8) = MLMINC.MOTS(2)
  225. IMATRI.LISDUA(9) = MLMINC.MOTS(3)
  226. IMATRI.LISDUA(10) = MLMINC.MOTS(3)
  227. IMATRI.LISDUA(11) = MLMINC.MOTS(3)
  228. IMATRI.LISDUA(12) = MLMINC.MOTS(3)
  229. IMATRI.LISDUA(13) = MLMINC.MOTS(4)
  230. IMATRI.LISDUA(14) = MLMINC.MOTS(4)
  231. IMATRI.LISDUA(15) = MLMINC.MOTS(4)
  232. IMATRI.LISDUA(16) = MLMINC.MOTS(4)
  233. SEGDES MLMINC
  234. C
  235. NBEL = NBELEM
  236. NBSOUS = 1
  237. NP = 2
  238. MP = 2
  239. SEGINI RR , RUX , RUY , RP ,
  240. & UXR , UXUX , UXUY , UXP ,
  241. & UYR , UYUX , UYUY , UYP ,
  242. & RETR , RETUX , RETUY , RETP
  243. C
  244. C**** Duale = IMATRI.LISDUA(1) = 'RN'
  245. C Primale = IMATRI.LISPRI(1) = 'RN'
  246. C -> IMATRI.LIZAFM(1,1) = RR
  247. C
  248. C Duale = IMATRI.LISDUA(2) = 'RN'
  249. C Primale = IMATRI.LISPRI(1) = 'RUXN'
  250. C -> IMATRI.LIZAFM(1,2) = RUX
  251. C ...
  252. C
  253. IMATRI.LIZAFM(1,1) = RR
  254. IMATRI.LIZAFM(1,2) = RUX
  255. IMATRI.LIZAFM(1,3) = RUY
  256. IMATRI.LIZAFM(1,4) = RP
  257. IMATRI.LIZAFM(1,5) = UXR
  258. IMATRI.LIZAFM(1,6) = UXUX
  259. IMATRI.LIZAFM(1,7) = UXUY
  260. IMATRI.LIZAFM(1,8) = UXP
  261. IMATRI.LIZAFM(1,9) = UYR
  262. IMATRI.LIZAFM(1,10) = UYUX
  263. IMATRI.LIZAFM(1,11) = UYUY
  264. IMATRI.LIZAFM(1,12) = UYP
  265. IMATRI.LIZAFM(1,13) = RETR
  266. IMATRI.LIZAFM(1,14) = RETUX
  267. IMATRI.LIZAFM(1,15) = RETUY
  268. IMATRI.LIZAFM(1,16) = RETP
  269. C
  270. DO IFAC = 1, NFAC, 1
  271. NGCF = MELEFE.NUM(2,IFAC)
  272. NLCF = MLENTF.LECT(NGCF)
  273. IF(NLCF .NE. IFAC)THEN
  274. WRITE(IOIMP,*) 'Il ne faut pas jouer avec la table domaine'
  275. CALL ERREUR(5)
  276. GOTO 9999
  277. ENDIF
  278. NLFL = MLELIM.LECT(NGCF)
  279. NGCG = MELEFE.NUM(1,IFAC)
  280. NGCD = MELEFE.NUM(3,IFAC)
  281. IF(NLFL .NE. 0)THEN
  282. C
  283. C********** The point belongs on BC -> No contribution to jacobian!
  284. C
  285. MELEDU.NUM(1,IFAC) = NGCG
  286. MELEDU.NUM(2,IFAC) = NGCD
  287. ELSEIF(NGCG .NE. NGCD)THEN
  288. C
  289. C********** Les MELEMEs
  290. C
  291. MELEDU.NUM(1,IFAC) = NGCG
  292. MELEDU.NUM(2,IFAC) = NGCD
  293. C
  294. C********** Les etats G et D
  295. C
  296. NLCG = MLENTC.LECT(NGCG)
  297. NLCD = MLENTC.LECT(NGCD)
  298. C
  299. ROG = MPRN.VPOCHA(NLCG,1)
  300. PG = MPPN.VPOCHA(NLCG,1)
  301. UXG = MPUN.VPOCHA(NLCG,1)
  302. UYG = MPUN.VPOCHA(NLCG,2)
  303. GAMG = MPGAMN.VPOCHA(NLCG,1)
  304. RETG= (PG / (GAMG - 1.0D0)) + 0.5D0 * ROG * (UXG * UXG +
  305. & UYG * UYG)
  306. VOLG = MPVOLU.VPOCHA(NLCG,1)
  307. C
  308. ROD = MPRN.VPOCHA(NLCD,1)
  309. PD = MPPN.VPOCHA(NLCD,1)
  310. UXD = MPUN.VPOCHA(NLCD,1)
  311. UYD = MPUN.VPOCHA(NLCD,2)
  312. GAMD = MPGAMN.VPOCHA(NLCD,1)
  313. RETD= (PD / (GAMD - 1.0D0)) + 0.5D0 * ROD * (UXD * UXD +
  314. & UYD * UYD)
  315. VOLD = MPVOLU.VPOCHA(NLCD,1)
  316. C
  317. C********** La normale G->D
  318. C La tangente
  319. C
  320. SURF = MPOVSU.VPOCHA(NLCF,1)
  321. CNX = MPNORM.VPOCHA(NLCF,1)
  322. CNY = MPNORM.VPOCHA(NLCF,2)
  323. CTX = -1.0D0 * CNY
  324. CTY = CNX
  325. C
  326. C********** La contribution de Gauche
  327. C
  328. CALL VLHJ1(ROG,UXG,UYG,PG,RETG,GAMG,CNX,CNY,CTX,CTY,
  329. & DFRO,DFRUN,DFRUT,DFRET)
  330. C
  331. C
  332. C********** AB.AM(IFAC,IPRIM,IDUAL)
  333. C A = nom de l'inconnu duale (Ro,rUX,rUY,RET)
  334. C B = nom de l'inconnu primale (Ro,UX,UY,P)
  335. C IPRIM = 1, 2 -> G, D
  336. C IDUAL = 1, 2 -> G, D
  337. C i.e.
  338. C A_IDUAL = AB.AM(IFAC,IPRIM,IDUAL) * B_IPRIM + ...
  339. C
  340. C
  341. C********** Dual RN
  342. C
  343. FUNCEL = SURF * DFRO(1)
  344. RR.AM(IFAC,1,1) = -1.0D0 * FUNCEL / VOLG
  345. RR.AM(IFAC,1,2) = FUNCEL / VOLD
  346. C
  347. FUNCEL = SURF * DFRO(2)
  348. RUX.AM(IFAC,1,1) = -1.0D0 * FUNCEL / VOLG
  349. RUX.AM(IFAC,1,2) = FUNCEL / VOLD
  350. C
  351. FUNCEL = SURF * DFRO(3)
  352. RUY.AM(IFAC,1,1) = -1.0D0 * FUNCEL / VOLG
  353. RUY.AM(IFAC,1,2) = FUNCEL / VOLD
  354. C
  355. FUNCEL = SURF * DFRO(4)
  356. RP.AM(IFAC,1,1) = -1.0D0 * FUNCEL / VOLG
  357. RP.AM(IFAC,1,2) = FUNCEL / VOLD
  358. C
  359. C********** Dual RUXN
  360. C
  361. FUNCEL = SURF * (DFRUN(1) * CNX + DFRUT(1) * CTX)
  362. UXR.AM(IFAC,1,1) = -1.0D0 * FUNCEL / VOLG
  363. UXR.AM(IFAC,1,2) = FUNCEL / VOLD
  364. C
  365. FUNCEL = SURF * (DFRUN(2) * CNX + DFRUT(2) * CTX)
  366. UXUX.AM(IFAC,1,1) = -1.0D0 * FUNCEL / VOLG
  367. UXUX.AM(IFAC,1,2) = FUNCEL / VOLD
  368. C
  369. FUNCEL = SURF * (DFRUN(3) * CNX + DFRUT(3) * CTX)
  370. UXUY.AM(IFAC,1,1) = -1.0D0 * FUNCEL / VOLG
  371. UXUY.AM(IFAC,1,2) = FUNCEL / VOLD
  372. C
  373. FUNCEL = SURF * (DFRUN(4) * CNX + DFRUT(4) * CTX)
  374. UXP.AM(IFAC,1,1) = -1.0D0 * FUNCEL / VOLG
  375. UXP.AM(IFAC,1,2) = FUNCEL / VOLD
  376. C
  377. C********** Dual RUYN
  378. C
  379. FUNCEL = SURF * (DFRUN(1) * CNY + DFRUT(1) * CTY)
  380. UYR.AM(IFAC,1,1) = -1.0D0 * FUNCEL / VOLG
  381. UYR.AM(IFAC,1,2) = FUNCEL / VOLD
  382. C
  383. FUNCEL = SURF * (DFRUN(2) * CNY + DFRUT(2) * CTY)
  384. UYUX.AM(IFAC,1,1) = -1.0D0 * FUNCEL / VOLG
  385. UYUX.AM(IFAC,1,2) = FUNCEL / VOLD
  386. C
  387. FUNCEL = SURF * (DFRUN(3) * CNY + DFRUT(3) * CTY)
  388. UYUY.AM(IFAC,1,1) = -1.0D0 * FUNCEL / VOLG
  389. UYUY.AM(IFAC,1,2) = FUNCEL / VOLD
  390. C
  391. FUNCEL = SURF * (DFRUN(4) * CNY + DFRUT(4) * CTY)
  392. UYP.AM(IFAC,1,1) = -1.0D0 * FUNCEL / VOLG
  393. UYP.AM(IFAC,1,2) = FUNCEL / VOLD
  394. C
  395. C********** Dual RETN
  396. C
  397. FUNCEL = SURF * DFRET(1)
  398. RETR.AM(IFAC,1,1) = -1.0D0 * FUNCEL / VOLG
  399. RETR.AM(IFAC,1,2) = FUNCEL / VOLD
  400. C
  401. FUNCEL = SURF * DFRET(2)
  402. RETUX.AM(IFAC,1,1) = -1.0D0 * FUNCEL / VOLG
  403. RETUX.AM(IFAC,1,2) = FUNCEL / VOLD
  404. C
  405. FUNCEL = SURF * DFRET(3)
  406. RETUY.AM(IFAC,1,1) = -1.0D0 * FUNCEL / VOLG
  407. RETUY.AM(IFAC,1,2) = FUNCEL / VOLD
  408. C
  409. FUNCEL = SURF * DFRET(4)
  410. RETP.AM(IFAC,1,1) = -1.0D0 * FUNCEL / VOLG
  411. RETP.AM(IFAC,1,2) = FUNCEL / VOLD
  412. C
  413. C
  414. C********** La contribution de D
  415. C
  416. CNX = -1.0D0 * CNX
  417. CNY = -1.0D0 * CNY
  418. CTX = -1.0D0 * CTX
  419. CTY = -1.0D0 * CTY
  420.  
  421. CALL VLHJ1(ROD,UXD,UYD,PD,RETD,GAMD,CNX,CNY,CTX,CTY,
  422. & DFRO,DFRUN,DFRUT,DFRET)
  423. C
  424. C
  425. C********** Dual RN
  426. C
  427. FUNCEL = SURF * DFRO(1)
  428. RR.AM(IFAC,2,2) = -1.0D0 * FUNCEL / VOLD
  429. RR.AM(IFAC,2,1) = FUNCEL / VOLG
  430. C
  431. FUNCEL = SURF * DFRO(2)
  432. RUX.AM(IFAC,2,2) = -1.0D0 * FUNCEL / VOLD
  433. RUX.AM(IFAC,2,1) = FUNCEL / VOLG
  434. C
  435. FUNCEL = SURF * DFRO(3)
  436. RUY.AM(IFAC,2,2) = -1.0D0 * FUNCEL / VOLD
  437. RUY.AM(IFAC,2,1) = FUNCEL / VOLG
  438. C
  439. FUNCEL = SURF * DFRO(4)
  440. RP.AM(IFAC,2,2) = -1.0D0 * FUNCEL / VOLD
  441. RP.AM(IFAC,2,1) = FUNCEL / VOLG
  442. C
  443. C********** Dual RUXN
  444. C
  445. FUNCEL = SURF * (DFRUN(1) * CNX + DFRUT(1) * CTX)
  446. UXR.AM(IFAC,2,2) = -1.0D0 * FUNCEL / VOLD
  447. UXR.AM(IFAC,2,1) = FUNCEL / VOLG
  448. C
  449. FUNCEL = SURF * (DFRUN(2) * CNX + DFRUT(2) * CTX)
  450. UXUX.AM(IFAC,2,2) = -1.0D0 * FUNCEL / VOLD
  451. UXUX.AM(IFAC,2,1) = FUNCEL / VOLG
  452. C
  453. FUNCEL = SURF * (DFRUN(3) * CNX + DFRUT(3) * CTX)
  454. UXUY.AM(IFAC,2,2) = -1.0D0 * FUNCEL / VOLD
  455. UXUY.AM(IFAC,2,1) = FUNCEL / VOLG
  456. C
  457. FUNCEL = SURF * (DFRUN(4) * CNX + DFRUT(4) * CTX)
  458. UXP.AM(IFAC,2,2) = -1.0D0 * FUNCEL / VOLD
  459. UXP.AM(IFAC,2,1) = FUNCEL / VOLG
  460. C
  461. C********** Dual RUYN
  462. C
  463. FUNCEL = SURF * (DFRUN(1) * CNY + DFRUT(1) * CTY)
  464. UYR.AM(IFAC,2,2) = -1.0D0 * FUNCEL / VOLD
  465. UYR.AM(IFAC,2,1) = FUNCEL / VOLG
  466. C
  467. FUNCEL = SURF * (DFRUN(2) * CNY + DFRUT(2) * CTY)
  468. UYUX.AM(IFAC,2,2) = -1.0D0 * FUNCEL / VOLD
  469. UYUX.AM(IFAC,2,1) = FUNCEL / VOLG
  470. C
  471. FUNCEL = SURF * (DFRUN(3) * CNY + DFRUT(3) * CTY)
  472. UYUY.AM(IFAC,2,2) = -1.0D0 * FUNCEL / VOLD
  473. UYUY.AM(IFAC,2,1) = FUNCEL / VOLG
  474. C
  475. FUNCEL = SURF * (DFRUN(4) * CNY + DFRUT(4) * CTY)
  476. UYP.AM(IFAC,2,2) = -1.0D0 * FUNCEL / VOLD
  477. UYP.AM(IFAC,2,1) = FUNCEL / VOLG
  478. C
  479. C********** Dual RETN
  480. C
  481. FUNCEL = SURF * DFRET(1)
  482. RETR.AM(IFAC,2,2) = -1.0D0 * FUNCEL / VOLD
  483. RETR.AM(IFAC,2,1) = FUNCEL / VOLG
  484. C
  485. FUNCEL = SURF * DFRET(2)
  486. RETUX.AM(IFAC,2,2) = -1.0D0 * FUNCEL / VOLD
  487. RETUX.AM(IFAC,2,1) = FUNCEL / VOLG
  488. C
  489. FUNCEL = SURF * DFRET(3)
  490. RETUY.AM(IFAC,2,2) = -1.0D0 * FUNCEL / VOLD
  491. RETUY.AM(IFAC,2,1) = FUNCEL / VOLG
  492. C
  493. FUNCEL = SURF * DFRET(4)
  494. RETP.AM(IFAC,2,2) = -1.0D0 * FUNCEL / VOLD
  495. RETP.AM(IFAC,2,1) = FUNCEL / VOLG
  496. C
  497. ELSE
  498. C
  499. C********** Murs (NGCG = NGCD)
  500. C
  501. C
  502. C********** Les MELEMEs
  503. C
  504. MELEDU.NUM(1,IFAC) = NGCG
  505. MELEDU.NUM(2,IFAC) = NGCD
  506. NLCG = MLENTC.LECT(NGCG)
  507. C
  508. ROG = MPRN.VPOCHA(NLCG,1)
  509. PG = MPPN.VPOCHA(NLCG,1)
  510. UXG = MPUN.VPOCHA(NLCG,1)
  511. UYG = MPUN.VPOCHA(NLCG,2)
  512. GAMG = MPGAMN.VPOCHA(NLCG,1)
  513. VOLG = MPVOLU.VPOCHA(NLCG,1)
  514. C
  515. C********** La normale sortante
  516. C
  517. SURF = MPOVSU.VPOCHA(NLCF,1)
  518. CNX = MPNORM.VPOCHA(NLCF,1)
  519. CNY = MPNORM.VPOCHA(NLCF,2)
  520. C
  521. CALL VLHJ3(ROG,UXG,UYG,PG,GAMG,CNX,CNY,
  522. & DFRUN)
  523. C
  524. C********** Dual RN
  525. C
  526. RR.AM(IFAC,1,1) = 0.0D0
  527. RR.AM(IFAC,1,2) = 0.0D0
  528. C
  529. RUX.AM(IFAC,1,1) = 0.0D0
  530. RUX.AM(IFAC,1,2) = 0.0D0
  531. C
  532. RUY.AM(IFAC,1,1) = 0.0D0
  533. RUY.AM(IFAC,1,2) = 0.0D0
  534. C
  535. RP.AM(IFAC,1,1) = 0.0D0
  536. RP.AM(IFAC,1,2) = 0.0D0
  537. C
  538. C********** Dual RUXN
  539. C
  540. FUNCEL = SURF * DFRUN(1) * CNX
  541. UXR.AM(IFAC,1,1) = -1.0D0 * FUNCEL / VOLG
  542. UXR.AM(IFAC,1,2) = 0.0D0
  543. C
  544. FUNCEL = SURF * DFRUN(2) * CNX
  545. UXUX.AM(IFAC,1,1) = -1.0D0 * FUNCEL / VOLG
  546. UXUX.AM(IFAC,1,2) = 0.0D0
  547. C
  548. FUNCEL = SURF * DFRUN(3) * CNX
  549. UXUY.AM(IFAC,1,1) = -1.0D0 * FUNCEL / VOLG
  550. UXUY.AM(IFAC,1,2) = 0.0D0
  551. C
  552. FUNCEL = SURF * DFRUN(4) * CNX
  553. UXP.AM(IFAC,1,1) = -1.0D0 * FUNCEL / VOLG
  554. UXP.AM(IFAC,1,2) = 0.0D0
  555. C
  556. C********** Dual RUYN
  557. C
  558. FUNCEL = SURF * DFRUN(1) * CNY
  559. UYR.AM(IFAC,1,1) = -1.0D0 * FUNCEL / VOLG
  560. UYR.AM(IFAC,1,2) = 0.0D0
  561. C
  562. FUNCEL = SURF * DFRUN(2) * CNY
  563. UYUX.AM(IFAC,1,1) = -1.0D0 * FUNCEL / VOLG
  564. UYUX.AM(IFAC,1,2) = 0.0D0
  565. C
  566. FUNCEL = SURF * DFRUN(3) * CNY
  567. UYUY.AM(IFAC,1,1) = -1.0D0 * FUNCEL / VOLG
  568. UYUY.AM(IFAC,1,2) = 0.0D0
  569. C
  570. FUNCEL = SURF * DFRUN(4) * CNY
  571. UYP.AM(IFAC,1,1) = -1.0D0 * FUNCEL / VOLG
  572. UYP.AM(IFAC,1,2) = 0.0D0
  573. C
  574. C********** Dual RETN
  575. C
  576. RETR.AM(IFAC,1,1) = 0.0D0
  577. RETR.AM(IFAC,1,2) = 0.0D0
  578. C
  579. RETUX.AM(IFAC,1,1) = 0.0D0
  580. RETUX.AM(IFAC,1,2) = 0.0D0
  581. C
  582. RETUY.AM(IFAC,1,1) = 0.0D0
  583. RETUY.AM(IFAC,1,2) = 0.0D0
  584. C
  585. RETP.AM(IFAC,1,1) = 0.0D0
  586. RETP.AM(IFAC,1,2) = 0.0D0
  587. C
  588. C********** Dual RN
  589. C
  590. RR.AM(IFAC,2,2) = 0.0D0
  591. RR.AM(IFAC,2,1) = 0.0D0
  592. C
  593. RUX.AM(IFAC,2,2) = 0.0D0
  594. RUX.AM(IFAC,2,1) = 0.0D0
  595. C
  596. RUY.AM(IFAC,2,2) = 0.0D0
  597. RUY.AM(IFAC,2,1) = 0.0D0
  598. C
  599. RP.AM(IFAC,2,2) = 0.0D0
  600. RP.AM(IFAC,2,1) = 0.0D0
  601. C
  602. C********** Dual RUXN
  603. C
  604. UXR.AM(IFAC,2,2) = 0.0D0
  605. UXR.AM(IFAC,2,1) = 0.0D0
  606. C
  607. UXUX.AM(IFAC,2,2) = 0.0D0
  608. UXUX.AM(IFAC,2,1) = 0.0D0
  609. C
  610. UXUY.AM(IFAC,2,2) = 0.0D0
  611. UXUY.AM(IFAC,2,1) = 0.0D0
  612. C
  613. UXP.AM(IFAC,2,2) = 0.0D0
  614. UXP.AM(IFAC,2,1) = 0.0D0
  615. C
  616. C********** Dual RUYN
  617. C
  618. UYR.AM(IFAC,2,2) = 0.0D0
  619. UYR.AM(IFAC,2,1) = 0.0D0
  620. C
  621. UYUX.AM(IFAC,2,2) = 0.0D0
  622. UYUX.AM(IFAC,2,1) = 0.0D0
  623. C
  624. UYUY.AM(IFAC,2,2) = 0.0D0
  625. UYUY.AM(IFAC,2,1) = 0.0D0
  626. C
  627. UYP.AM(IFAC,2,2) = 0.0D0
  628. UYP.AM(IFAC,2,1) = 0.0D0
  629. C
  630. C********** Dual RETN
  631. C
  632. RETR.AM(IFAC,2,2) = 0.0D0
  633. RETR.AM(IFAC,2,1) = 0.0D0
  634. C
  635. RETUX.AM(IFAC,2,2) = 0.0D0
  636. RETUX.AM(IFAC,2,1) = 0.0D0
  637. C
  638. RETUY.AM(IFAC,2,2) = 0.0D0
  639. RETUY.AM(IFAC,2,1) = 0.0D0
  640. C
  641. RETP.AM(IFAC,2,2) = 0.0D0
  642. RETP.AM(IFAC,2,1) = 0.0D0
  643. C
  644. ENDIF
  645. ENDDO
  646. C
  647. SEGDES MELEMC
  648. SEGDES MELEFE
  649. SEGDES MELEMF
  650. C
  651. SEGDES MPOVSU
  652. SEGDES MPVOLU
  653. SEGDES MPNORM
  654. C
  655. SEGDES MPRN
  656. SEGDES MPPN
  657. SEGDES MPUN
  658. SEGDES MPGAMN
  659. C
  660. SEGDES MELEDU
  661. SEGDES MATRIK
  662. SEGDES IMATRI
  663. C
  664. SEGDES RR , RUX , RUY , RP ,
  665. & UXR , UXUX , UXUY , UXP ,
  666. & UYR , UYUX , UYUY , UYP ,
  667. & RETR , RETUX , RETUY , RETP
  668.  
  669. SEGSUP MLENTC
  670. SEGSUP MLENTF
  671. SEGSUP MLELIM
  672. C
  673. 9999 CONTINUE
  674. RETURN
  675. END
  676.  
  677.  
  678.  
  679.  
  680.  
  681.  
  682.  
  683.  
  684.  
  685.  
  686.  
  687.  

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