Télécharger kdom11.eso

Retour à la liste

Numérotation des lignes :

kdom11
  1. C KDOM11 SOURCE PV 21/10/31 21:15:01 11158
  2. SUBROUTINE KDOM11(MELF,MELFL,MELFP,MCHPSU,MCHPNO,MCHPMR)
  3. C
  4. C************************************************************************
  5. C
  6. C PROJET : CASTEM 2000
  7. C
  8. C NOM : KDOM11
  9. C
  10. C DESCRIPTION : Subroutine called by KDOM10 in the case of EULER
  11. C model.
  12. C We create the CHPOINTS
  13. C MCHPSU = surfaces (faces dimension)
  14. C MCHPNO = normals (oriented from the first
  15. C to the second point of FACEL)
  16. C MCHPMR = rotation matrix
  17. C
  18. C LANGAGE : FORTRAN 77 + ESOPE 2000 (avec estensions CISI)
  19. C
  20. C AUTEUR : A. BECCANTINI, DRN/DMT/SEMT/LTMF
  21. C
  22. C************************************************************************
  23. C
  24. C INPUTS :
  25. C
  26. C MELF : meleme 'FACE'
  27. C MELFL : meleme 'FACEL'
  28. C MELFP : meleme 'FACEP'
  29. C
  30. C OUTPUTS :
  31. C
  32. C MCHPSU : mchpoi 'XXSURFAC'
  33. C MCHPNO : mchpoi 'XXNORMAF'
  34. C MCHPMR : mchpoi 'MATROT'
  35. C
  36. C
  37. IMPLICIT INTEGER(I-N)
  38. IMPLICIT REAL*8(A-H,O-Z)
  39. C
  40. INTEGER IGEOM, MCHPSU, MCHPNO, MCHPMR
  41. & ,JGN, JGM, NBSOUS, ISOUS, NP, NEL, IEL, IPO, NLCF
  42. & , NF, IFAC
  43. REAL*8 XF,YF,X1,Y1, DSURFX, DSURFY, XSURF, YSURF, SURF, A
  44. & ,ORIENT
  45. & ,ZF, DXP, DYP, DZP, DXPM1, DYPM1, DZPM1, DSURFZ, ZSURF
  46. & ,RMX, RMY, RMZ, RRX, RRY, RRZ
  47. CHARACTER*8 TYPE
  48.  
  49.  
  50. -INC PPARAM
  51. -INC CCOPTIO
  52. -INC SMELEME
  53. POINTEUR MELFL.MELEME,MELFP.MELEME,MELF.MELEME
  54. -INC SMCHPOI
  55. POINTEUR MPOVSU.MPOVAL, MPOVNO.MPOVAL, MPOVMR.MPOVAL
  56. -INC SMLENTI
  57. -INC SMLMOTS
  58. -INC SMCOORD
  59. -INC CCREEL
  60. C
  61. C**** Corresp. FACE
  62. C
  63. CALL KRIPAD(MELF,MLENTI)
  64. C SEGINI MLENTI
  65. C
  66. C**** Champoint surfaces
  67. C
  68. JGN=4
  69. JGM=1
  70. SEGINI MLMOTS
  71. MLMOTS.MOTS(1)='SCAL'
  72. TYPE='FACE '
  73. CALL KRCHP1(TYPE,MELF,MCHPSU,MLMOTS)
  74. IF(IERR.NE.0)GOTO 9999
  75. CALL LICHT(MCHPSU,MPOVSU,TYPE,IGEOM)
  76. IF(IERR.NE.0)GOTO 9999
  77. C SEGACT MPOVSU
  78. SEGSUP MLMOTS
  79. C
  80. C**** Champoint normales
  81. C
  82. JGN=4
  83. JGM=IDIM
  84. SEGINI MLMOTS
  85. MLMOTS.MOTS(1)='UX'
  86. MLMOTS.MOTS(2)='UY'
  87. IF(IDIM .EQ. 3) MLMOTS.MOTS(3)='UZ'
  88. TYPE='FACE '
  89. CALL KRCHP1(TYPE,MELF,MCHPNO,MLMOTS)
  90. IF(IERR.NE.0)GOTO 9999
  91. CALL LICHT(MCHPNO,MPOVNO,TYPE,IGEOM)
  92. IF(IERR.NE.0)GOTO 9999
  93. C SEGACT MPOVNO
  94. SEGSUP MLMOTS
  95. C
  96. C**** Champoint matrice de rotation
  97. C
  98. JGN=4
  99. JGM=IDIM*IDIM
  100. SEGINI MLMOTS
  101. IF(IDIM.EQ.2)THEN
  102. MLMOTS.MOTS(1)='RX'
  103. MLMOTS.MOTS(2)='RY'
  104. MLMOTS.MOTS(3)='MX'
  105. MLMOTS.MOTS(4)='MY'
  106. * Normale en M
  107. * vect(M,U) = z
  108. ELSE
  109. MLMOTS.MOTS(1)='UX'
  110. MLMOTS.MOTS(2)='UY'
  111. MLMOTS.MOTS(3)='UZ'
  112. MLMOTS.MOTS(4)='RX'
  113. MLMOTS.MOTS(5)='RY'
  114. MLMOTS.MOTS(6)='RZ'
  115. MLMOTS.MOTS(7)='MX'
  116. MLMOTS.MOTS(8)='MY'
  117. MLMOTS.MOTS(9)='MZ'
  118. * Normale en M
  119. * vect(M,R) = U
  120. ENDIF
  121. CALL KRCHP1(TYPE,MELF,MCHPMR,MLMOTS)
  122. IF(IERR.NE.0)GOTO 9999
  123. CALL LICHT(MCHPMR,MPOVMR,TYPE,IGEOM)
  124. IF(IERR.NE.0)GOTO 9999
  125. C SEGACT MPOVMR
  126. C
  127. SEGACT MELFP
  128. NBSOUS=MELFP.LISOUS(/1)
  129. IF(NBSOUS.EQ.0)NBSOUS=1
  130. SEGACT MELFL
  131. C**********************
  132. C CAS DE LA DIMENSION 2
  133. C**********************
  134. surf=0.d0
  135. xsurf=0.d0
  136. ysurf=0.d0
  137. zsurf=0.d0
  138. IF (IDIM.EQ.2) THEN
  139. C
  140. DO ISOUS=1,NBSOUS,1
  141. IPT1 = MELFP
  142. IF(NBSOUS .NE. 1)THEN
  143. IPT1 = MELFP.LISOUS(ISOUS)
  144. SEGACT IPT1
  145. ENDIF
  146. C
  147. NP=IPT1.NUM(/1)-1
  148. NEL=IPT1.NUM(/2)
  149. IF(NP .NE. 2)THEN
  150. WRITE(IOIMP,*) 'Subroutine knrf.eso'
  151. CALL ERREUR(5)
  152. ENDIF
  153. C
  154. DO IEL=1,NEL,1
  155. NF=IPT1.NUM(NP+1,IEL)
  156. XF = XCOOR((NF-1)*(IDIM+1)+1)
  157. YF = XCOOR((NF-1)*(IDIM+1)+2)
  158. *
  159. IPO=IPT1.NUM(1,IEL)
  160. X1=XCOOR((IPO-1)*(IDIM+1)+1)
  161. Y1=XCOOR((IPO-1)*(IDIM+1)+2)
  162. DSURFX=Y1-YF
  163. DSURFY=XF-X1
  164. XSURF=DSURFX
  165. YSURF=DSURFY
  166. SURF=((DSURFX*DSURFX)+(DSURFY*DSURFY))**0.5D0
  167. *
  168. IPO=IPT1.NUM(2,IEL)
  169. X1=XCOOR((IPO-1)*(IDIM+1)+1)
  170. Y1=XCOOR((IPO-1)*(IDIM+1)+2)
  171. DSURFX=YF-Y1
  172. DSURFY=X1-XF
  173. XSURF=XSURF+DSURFX
  174. YSURF=YSURF+DSURFY
  175. SURF=SURF+(((DSURFX*DSURFX)+(DSURFY*DSURFY))**0.5D0)
  176. C
  177. NLCF=MLENTI.LECT(NF)
  178. MPOVSU.VPOCHA(NLCF,1)=SURF
  179. C
  180. C************* Orientation selon FACEL
  181. C
  182. IPO=MELFL.NUM(1,NLCF)
  183. X1=XCOOR((IPO-1)*(IDIM+1)+1)
  184. Y1=XCOOR((IPO-1)*(IDIM+1)+2)
  185. DSURFX=XF-X1
  186. DSURFY=YF-Y1
  187. ORIENT=SIGN(1.0D0,((DSURFX*XSURF)+(DSURFY*YSURF)))
  188. C
  189. MPOVNO.VPOCHA(NLCF,1)=XSURF/SURF*ORIENT
  190. MPOVNO.VPOCHA(NLCF,2)=YSURF/SURF*ORIENT
  191. C
  192. MPOVMR.VPOCHA(NLCF,3)=XSURF/SURF*ORIENT
  193. MPOVMR.VPOCHA(NLCF,4)=YSURF/SURF*ORIENT
  194. MPOVMR.VPOCHA(NLCF,1)=-1*YSURF/SURF*ORIENT
  195. MPOVMR.VPOCHA(NLCF,2)=XSURF/SURF*ORIENT
  196. C
  197. ENDDO
  198. IF(NBSOUS .NE. 1) SEGDES IPT1
  199. ENDDO
  200. C**********************
  201. C CAS DE LA DIMENSION 3
  202. C**********************
  203. ELSE
  204. C
  205. DO ISOUS=1,NBSOUS,1
  206. IPT1 = MELFP
  207. IF(NBSOUS .NE. 1)THEN
  208. IPT1 = MELFP.LISOUS(ISOUS)
  209. SEGACT IPT1
  210. ENDIF
  211. C
  212. NP=IPT1.NUM(/1)-1
  213. NEL=IPT1.NUM(/2)
  214. C
  215. DO IEL=1,NEL,1
  216. NF=IPT1.NUM(NP+1,IEL)
  217. XF = XCOOR((NF-1)*(IDIM+1)+1)
  218. YF = XCOOR((NF-1)*(IDIM+1)+2)
  219. ZF = XCOOR((NF-1)*(IDIM+1)+3)
  220. *
  221. IPO=IPT1.NUM(NP,IEL)
  222. DXP = XCOOR((IPO-1)*(IDIM+1)+1) - XF
  223. DYP = XCOOR((IPO-1)*(IDIM+1)+2) - YF
  224. DZP = XCOOR((IPO-1)*(IDIM+1)+3) - ZF
  225. XSURF=0.0D0
  226. YSURF=0.0D0
  227. ZSURF=0.0D0
  228. DO IFAC=1,NP,1
  229. DXPM1 = DXP
  230. DYPM1 = DYP
  231. DZPM1 = DZP
  232. IPO=IPT1.NUM(IFAC,IEL)
  233. DXP = XCOOR((IPO-1)*(IDIM+1)+1) - XF
  234. DYP = XCOOR((IPO-1)*(IDIM+1)+2) - YF
  235. DZP = XCOOR((IPO-1)*(IDIM+1)+3) - ZF
  236. DSURFX = 0.5D0 * ((DYPM1 * DZP) - (DZPM1 * DYP))
  237. DSURFY = 0.5D0 * ((DZPM1 * DXP) - (DXPM1 * DZP))
  238. DSURFZ = 0.5D0 * ((DXPM1 * DYP) - (DYPM1 * DXP))
  239. XSURF=XSURF+DSURFX
  240. YSURF=YSURF+DSURFY
  241. ZSURF=ZSURF+DSURFZ
  242. ENDDO
  243. *
  244. SURF=(XSURF*XSURF)+(YSURF*YSURF)+(ZSURF*ZSURF)
  245. surf=max(surf,xpetit)
  246. SURF=sqrt(SURF)
  247. NLCF=MLENTI.LECT(NF)
  248. MPOVSU.VPOCHA(NLCF,1)=SURF
  249. C
  250. C************* Orientation selon FACEL
  251. C
  252. IPO=MELFL.NUM(1,NLCF)
  253. DSURFX=XF-XCOOR((IPO-1)*(IDIM+1)+1)
  254. DSURFY=YF-XCOOR((IPO-1)*(IDIM+1)+2)
  255. DSURFZ=ZF-XCOOR((IPO-1)*(IDIM+1)+3)
  256. ORIENT=SIGN(1.0D0,((DSURFX*XSURF)+(DSURFY*YSURF)+(DSURFZ
  257. & *ZSURF)))
  258. C
  259. MPOVNO.VPOCHA(NLCF,1)=XSURF/SURF*ORIENT
  260. MPOVNO.VPOCHA(NLCF,2)=YSURF/SURF*ORIENT
  261. MPOVNO.VPOCHA(NLCF,3)=ZSURF/SURF*ORIENT
  262. C
  263. C************* MATROT
  264. C
  265. C Normal
  266. C
  267. MPOVMR.VPOCHA(NLCF,7)=XSURF/SURF*ORIENT
  268. MPOVMR.VPOCHA(NLCF,8)=YSURF/SURF*ORIENT
  269. MPOVMR.VPOCHA(NLCF,9)=ZSURF/SURF*ORIENT
  270.  
  271. C First direction (RX,RY,RZ) is normal to the
  272. C normal and FP (P = first point of FACEP)
  273. C
  274. IPO=IPT1.NUM(1,IEL)
  275. DXP = XCOOR((IPO-1)*(IDIM+1)+1) - XF
  276. DYP = XCOOR((IPO-1)*(IDIM+1)+2) - YF
  277. DZP = XCOOR((IPO-1)*(IDIM+1)+3) - ZF
  278. DSURFX = (ZSURF * DYP) - (YSURF * DZP)
  279. DSURFY = (XSURF * DZP) - (ZSURF * DXP)
  280. DSURFZ = (YSURF * DXP) - (XSURF * DYP)
  281. C
  282. C DZP=modulus of the RX,RY,RZ
  283. C
  284. DZP=(((DSURFX*DSURFX)+(DSURFY*DSURFY)+
  285. & (DSURFZ*DSURFZ))**0.5D0)
  286. C
  287. MPOVMR.VPOCHA(NLCF,4)=DSURFX/DZP
  288. MPOVMR.VPOCHA(NLCF,5)=DSURFY/DZP
  289. MPOVMR.VPOCHA(NLCF,6)=DSURFZ/DZP
  290. C
  291. C (UX,UY,UZ,RX,RY,RZ,MX,MY,MZ)=(1,2,3,4,5,6,7,8,9)
  292. C M,R,U is a right-hand normal frame
  293. C
  294. RMX=MPOVMR.VPOCHA(NLCF,7)
  295. RMY=MPOVMR.VPOCHA(NLCF,8)
  296. RMZ=MPOVMR.VPOCHA(NLCF,9)
  297. RRX=MPOVMR.VPOCHA(NLCF,4)
  298. RRY=MPOVMR.VPOCHA(NLCF,5)
  299. RRZ=MPOVMR.VPOCHA(NLCF,6)
  300. C
  301. MPOVMR.VPOCHA(NLCF,1)=(RMY*RRZ) - (RMZ*RRY)
  302. MPOVMR.VPOCHA(NLCF,2)=(RMZ*RRX) - (RMX*RRZ)
  303. MPOVMR.VPOCHA(NLCF,3)=(RMX*RRY) - (RMY*RRX)
  304. ENDDO
  305. IF(NBSOUS .NE. 1) SEGDES IPT1
  306. ENDDO
  307. ENDIF
  308. C
  309. SEGDES MPOVSU
  310. SEGDES MPOVNO
  311. SEGDES MPOVMR
  312. SEGDES MELFP
  313. C
  314. SEGDES MELFL
  315. SEGSUP MLENTI
  316. C
  317. 9999 RETURN
  318. END
  319.  
  320.  
  321.  
  322.  
  323.  
  324.  
  325.  
  326.  
  327.  
  328.  
  329.  
  330.  
  331.  
  332.  
  333.  
  334.  
  335.  
  336.  
  337.  

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