Télécharger kpruss.eso

Retour à la liste

Numérotation des lignes :

kpruss
  1. C KPRUSS SOURCE CB215821 20/11/25 13:32:53 10792
  2. SUBROUTINE KPRUSS(MELEME,MELEM2,
  3. &IPM1,IPM2,IPM3,IAXI,IKAS,INEFMD,KPRE,IZTGG1,IK1,K0,IKOMP)
  4.  
  5. IMPLICIT INTEGER(I-N)
  6. IMPLICIT REAL*8 (A-H,O-Z)
  7. C*****************************************************************************
  8. C
  9. C Ce SP calcule les matrices elementaires de divergence alias C
  10. C
  11. C IKAS=1 KMCT calcul de Ct (Div U)
  12. C IKAS=2 KMAC calcul de C uniquement (Grad p)
  13. C IKAS=3 KCCT calcul de C assemblage pour C et Ct
  14. C
  15. C*****************************************************************************
  16. CHARACTER*8 NOM0
  17.  
  18.  
  19. -INC PPARAM
  20. -INC CCOPTIO
  21. -INC CCGEOME
  22. -INC SMCOORD
  23. -INC SIZFFB
  24. POINTEUR IZF1.IZFFM,IZH2.IZHR
  25. -INC SMELEME
  26. POINTEUR MELEM2.MELEME
  27. -INC SMCHPOI
  28. POINTEUR IZTGG1.MPOVAL
  29. -INC CCREEL
  30. DIMENSION KIPM(3),XYZ1(24)
  31.  
  32.  
  33. C OPERATEUR PRESSION
  34. C
  35. DEUPI=1.D0
  36. IF(IAXI.NE.0)DEUPI=2.D0*XPI
  37. IF(IKAS.EQ.3)DEUPI=-DEUPI
  38.  
  39. C write(6,*)' DEUPI=',deupi
  40. IF(IDIM.EQ.2)IPM3=IPM1
  41. KIPM(1)=IPM1
  42. KIPM(2)=IPM2
  43. KIPM(3)=IPM3
  44. SEGACT MELEME,IPM1*MOD,IPM2*MOD,IPM3*MOD
  45.  
  46. NP=NUM(/1)
  47. NEL=NUM(/2)
  48.  
  49. IF(KPRE.NE.2)THEN
  50. IF(INEFMD.EQ.3)THEN
  51. IF(KPRE.EQ.3)NOM0=NOMS(ITYPEL)//'PRP0'
  52. IF(KPRE.EQ.4)NOM0=NOMS(ITYPEL)//'PRP1'
  53. IF(KPRE.EQ.5)NOM0=NOMS(ITYPEL)//'PFP1'
  54. ELSEIF(INEFMD.EQ.2)THEN
  55. IF(KPRE.EQ.3)NOM0=NOMS(ITYPEL)//'MCP0'
  56. IF(KPRE.EQ.4)NOM0=NOMS(ITYPEL)//'MCP1'
  57. IF(KPRE.EQ.5)NOM0=NOMS(ITYPEL)//'MCF1'
  58. ELSEIF(INEFMD.EQ.1)THEN
  59. IF(KPRE.EQ.5)NOM0=NOMS(ITYPEL)//'P1P1'
  60. ELSEIF(INEFMD.EQ.4)THEN
  61. NOM0=NOMS(ITYPEL)//' '
  62. ENDIF
  63.  
  64. C write(6,*)' Kpruss : NOM0=',nom0,' ikas=',ikas,' nel=',nel
  65. CALL KALPBG(NOM0,'FONFORM ',IZFFM)
  66.  
  67. SEGACT IZFFM*MOD
  68. IZHR=KZHR(1)
  69. IZH2=KZHR(2)
  70.  
  71. SEGACT IZHR*MOD,IZH2*MOD
  72.  
  73. NES=GR(/1)
  74. NPG=GR(/3)
  75. IZF1=KTP(1)
  76. SEGACT IZF1*MOD
  77. MP1=IZF1.FN(/1)
  78. MP=MELEM2.NUM(/1)
  79.  
  80. DO 30 KE=1,NEL
  81. NK=K0+KE
  82.  
  83. C%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% IKOMP = 1 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  84. IF(IKOMP.EQ.1)THEN
  85. DO I=1,NP
  86. J=NUM(I,KE)
  87. DO N=1,IDIM
  88. XYZ(N,I)=XCOOR((J-1)*(IDIM+1) +N)
  89. ENDDO
  90. ENDDO
  91.  
  92. CALL CALJBR
  93. &(FN,GR,PG,XYZ,HR,PGSQ,RPG,NES,IDIM,NP,NPG,IAXI,AIRE,AJ,SGN)
  94.  
  95. DO 324 K=1,IDIM
  96. IPM4=KIPM(K)
  97.  
  98. DO M=1,MP1
  99.  
  100. DO I=1,NP
  101. U=0.D0
  102. DO 333 L=1,NPG
  103. U=U+IZF1.FN(M,L)*HR(K,I,L)*PGSQ(L)*DEUPI*RPG(L)
  104. 333 CONTINUE
  105.  
  106. IF(IAXI.NE.0.AND.K.EQ.1)THEN
  107. DO 334 L=1,NPG
  108. U=U+IZF1.FN(M,L)*FN(I,L)*PGSQ(L)*DEUPI
  109. 334 CONTINUE
  110. ENDIF
  111.  
  112. K1=1+(1-IK1)*(NK-1)
  113. U=U*IZTGG1.VPOCHA(K1,1)
  114.  
  115. if(ikas.ne.2)then
  116. IPM4.AM(KE,I,M)=IPM4.AM(KE,I,M)+U
  117. else
  118. IPM4.AM(KE,M,I)=IPM4.AM(KE,M,I)+U
  119. endif
  120.  
  121. ENDDO
  122. ENDDO
  123. 324 CONTINUE
  124. C%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% IKOMP = 0 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  125. ELSE
  126.  
  127. DO I=1,MP1
  128. J=MELEM2.NUM(I,KE)
  129. DO N=1,IDIM
  130. IZH2.XYZ(N,I)=XCOOR((J-1)*(IDIM+1) +N)
  131. ENDDO
  132. ENDDO
  133.  
  134. CALL CALJBR(IZF1.FN,IZF1.GR,PG,
  135. & IZH2.XYZ,IZH2.HR,IZH2.PGSQ,IZH2.RPG,NES,IDIM,MP1,NPG,IAXI,AIRE,
  136. & IZH2.AJ,SGN)
  137.  
  138. DO 524 K=1,IDIM
  139. IPM4=KIPM(K)
  140.  
  141. DO M=1,MP1
  142.  
  143. DO I=1,NP
  144. U=0.D0
  145. DO 533 L=1,NPG
  146. U=U+FN(I,L)*IZH2.HR(K,M,L)*IZH2.PGSQ(L)*DEUPI*IZH2.RPG(L)
  147. 533 CONTINUE
  148.  
  149. K1=1+(1-IK1)*(NK-1)
  150. U=U*IZTGG1.VPOCHA(K1,1)
  151.  
  152. if(ikas.ne.2)then
  153. IPM4.AM(KE,I,M)=IPM4.AM(KE,I,M)+U
  154. else
  155. IPM4.AM(KE,M,I)=IPM4.AM(KE,M,I)+U
  156. endif
  157.  
  158. ENDDO
  159. ENDDO
  160. 524 CONTINUE
  161.  
  162. ENDIF
  163. C%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  164.  
  165. 37 CONTINUE
  166. 30 CONTINUE
  167.  
  168. SEGSUP IZHR,IZFFM,IZH2
  169.  
  170.  
  171. C CAS MACRO CENTRE
  172.  
  173. ELSEIF(KPRE.EQ.2)THEN
  174. NOM0=NOMS(ITYPEL)//' '
  175. CALL KALPBG(NOM0,'FONFORM ',IZFFM)
  176.  
  177. SEGACT IZFFM*MOD
  178. IZHR=KZHR(1)
  179. IZH2=KZHR(2)
  180. SEGACT IZHR*MOD,IZH2*MOD
  181. NES=GR(/1)
  182. NPG=GR(/3)
  183. IZF1=KTP(1)
  184. SEGACT IZF1*MOD
  185. MPG=IZF1.FN(/2)
  186. NP=GR(/2)
  187.  
  188. DO 40 KE=1,NEL
  189.  
  190. NK=K0+KE
  191.  
  192. IX=0
  193. DO I=1,NP
  194. J=NUM(I,KE)
  195. DO N=1,IDIM
  196. IX=IX+1
  197. XYZ1(IX)=XCOOR((J-1)*(IDIM+1) +N)
  198. ENDDO
  199. ENDDO
  200.  
  201. CALL CALJBR(FN,GR,PG,XYZ1,HR,PGSQ,RPG,NES,
  202. & IDIM,NP,NPG,IAXI,AIRE,AJ,SGN)
  203.  
  204. DO 424 K=1,IDIM
  205. IPM4=KIPM(K)
  206.  
  207. DO 423 I=1,NP
  208. U=0.D0
  209. DO 433 L=1,NPG
  210. U=U+HR(K,I,L)*PGSQ(L)*DEUPI*RPG(L)
  211. 433 CONTINUE
  212.  
  213. IF(IAXI.NE.0.AND.K.EQ.1)THEN
  214. DO 434 L=1,NPG
  215. U=U+FN(I,L)*PGSQ(L)*DEUPI
  216. 434 CONTINUE
  217. ENDIF
  218.  
  219. K1=1+(1-IK1)*(NK-1)
  220. U=U*IZTGG1.VPOCHA(K1,1)
  221.  
  222. if(ikas.ne.2)then
  223. IPM4.AM(KE,I,1)=IPM4.AM(KE,I,1)+U
  224. else
  225. IPM4.AM(KE,1,I)=IPM4.AM(KE,1,I)+U
  226. endif
  227.  
  228. 423 CONTINUE
  229. 424 CONTINUE
  230.  
  231. 40 CONTINUE
  232.  
  233. SEGSUP IZHR,IZFFM,IZH2
  234.  
  235. ENDIF
  236.  
  237. C write(6,*)' Retour KPRUSS'
  238. RETURN
  239. 1002 FORMAT(10(1X,1PE11.4))
  240. 1040 FORMAT(1X,'CALCUL MATRICE AM ',I4/10(1X,1PE11.4))
  241. END
  242.  
  243.  
  244.  
  245.  
  246.  
  247.  
  248.  
  249.  
  250.  
  251.  
  252.  
  253.  
  254.  
  255.  
  256.  
  257.  
  258.  
  259.  
  260.  
  261.  
  262.  

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