Télécharger konjp2.eso

Retour à la liste

Numérotation des lignes :

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

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