Télécharger kdom9.eso

Retour à la liste

Numérotation des lignes :

kdom9
  1. C KDOM9 SOURCE KK2000 14/04/10 21:15:15 8032
  2. SUBROUTINE KDOM9(NN1,NN2,NN3,NN4,NN5,NN6,NN7,NN8,NN9,NN10,
  3. & NN11,NN12,NN13,NN14,NN15,NN16,NN17,NN18,NN19,NN20,
  4. & NN21,NN22,NN23,NN24,NN25,NN26,NN27)
  5. C
  6. C************************************************************************
  7. C
  8. C PROJET : CASTEM 2000
  9. C
  10. C NOM : KDOM9
  11. C
  12. C DESCRIPTION : This subroutine check whether NN27 is inside of
  13. C the CU27
  14. C
  15. C LANGAGE : FORTRAN 77 + ESOPE 2000 (avec estensions CISI)
  16. C
  17. C AUTEUR : A. BECCANTINI, DRN/DMT/SEMT/LTMF
  18. C
  19. C************************************************************************
  20. C
  21. C
  22.  
  23. IMPLICIT INTEGER(I-N)
  24. IMPLICIT REAL*8(A-H,O-Z)
  25.  
  26. INTEGER NN1,NN2,NN3,NN4,NN5,NN6,NN7,NN8,NN9,NN10,
  27. & NN11,NN12,NN13,NN14,NN15,NN16,NN17,NN18,NN19,NN20,
  28. & NN21,NN22,NN23,NN24,NN25,NN26,NN27, I1, IPCEN, IPL, IPR
  29. REAL*8 DX0,DY0,DZ0,DX1,DY1,DZ1,NORX1,NORY1,NORZ1,PSCA0,PSCA1
  30. C
  31.  
  32. -INC PPARAM
  33. -INC CCOPTIO
  34. -INC SMCOORD
  35. C
  36. C**** First triangle
  37. C
  38. IPCEN=NN1
  39. IPR=NN25
  40. IPL=NN7
  41. DX0=XCOOR((IPR-1)*(IDIM+1)+1)-
  42. & XCOOR((IPCEN-1)*(IDIM+1)+1)
  43. DY0=XCOOR((IPR-1)*(IDIM+1)+2)-
  44. & XCOOR((IPCEN-1)*(IDIM+1)+2)
  45. DZ0=XCOOR((IPR-1)*(IDIM+1)+3)-
  46. & XCOOR((IPCEN-1)*(IDIM+1)+3)
  47. DX1=XCOOR((IPL-1)*(IDIM+1)+1)-
  48. & XCOOR((IPCEN-1)*(IDIM+1)+1)
  49. DY1=XCOOR((IPL-1)*(IDIM+1)+2)-
  50. & XCOOR((IPCEN-1)*(IDIM+1)+2)
  51. DZ1=XCOOR((IPL-1)*(IDIM+1)+3)-
  52. & XCOOR((IPCEN-1)*(IDIM+1)+3)
  53. NORX1=(DY0*DZ1-DY1*DZ0)
  54. NORY1=(DZ0*DX1-DZ1*DX0)
  55. NORZ1=(DX0*DY1-DX1*DY0)
  56. C
  57. C The scalar product between this normal and
  58. C CENTRE-IPCEN
  59. C
  60. DX1=XCOOR((IPCEN-1)*(IDIM+1)+1)-
  61. & XCOOR((NN27-1)*(IDIM+1)+1)
  62. DY1=XCOOR((IPCEN-1)*(IDIM+1)+2)-
  63. & XCOOR((NN27-1)*(IDIM+1)+2)
  64. DZ1=XCOOR((IPCEN-1)*(IDIM+1)+3)-
  65. & XCOOR((NN27-1)*(IDIM+1)+3)
  66. PSCA0=DX1*NORX1+DY1*NORY1+DZ1*NORZ1
  67. C
  68. C The other triangles
  69. C
  70. DO I1=1,23
  71. IF(I1.EQ.1)THEN
  72. IPCEN=NN3
  73. IPR=NN25
  74. IPL=NN1
  75. ELSEIF(I1.EQ.2)THEN
  76. IPCEN=NN5
  77. IPR=NN25
  78. IPL=NN3
  79. ELSEIF(I1.EQ.3)THEN
  80. IPCEN=NN7
  81. IPR=NN25
  82. IPL=NN5
  83. ELSEIF(I1.EQ.4)THEN
  84. IPCEN=NN13
  85. IPR=NN26
  86. IPL=NN15
  87. ELSEIF(I1.EQ.5)THEN
  88. IPCEN=NN19
  89. IPR=NN26
  90. IPL=NN13
  91. ELSEIF(I1.EQ.6)THEN
  92. IPCEN=NN17
  93. IPR=NN26
  94. IPL=NN19
  95. ELSEIF(I1.EQ.7)THEN
  96. IPCEN=NN15
  97. IPR=NN26
  98. IPL=NN17
  99. ELSEIF(I1.EQ.8)THEN
  100. IPCEN=NN1
  101. IPR=NN21
  102. IPL=NN3
  103. ELSEIF(I1.EQ.9)THEN
  104. IPCEN=NN13
  105. IPR=NN21
  106. IPL=NN1
  107. ELSEIF(I1.EQ.10)THEN
  108. IPCEN=NN15
  109. IPR=NN21
  110. IPL=NN13
  111. ELSEIF(I1.EQ.11)THEN
  112. IPCEN=NN3
  113. IPR=NN21
  114. IPL=NN15
  115. ELSEIF(I1.EQ.12)THEN
  116. IPCEN=NN3
  117. IPR=NN22
  118. IPL=NN5
  119. ELSEIF(I1.EQ.13)THEN
  120. IPCEN=NN15
  121. IPR=NN22
  122. IPL=NN3
  123. ELSEIF(I1.EQ.14)THEN
  124. IPCEN=NN17
  125. IPR=NN22
  126. IPL=NN15
  127. ELSEIF(I1.EQ.15)THEN
  128. IPCEN=NN5
  129. IPR=NN22
  130. IPL=NN17
  131. ELSEIF(I1.EQ.16)THEN
  132. IPCEN=NN7
  133. IPR=NN23
  134. IPL=NN19
  135. ELSEIF(I1.EQ.17)THEN
  136. IPCEN=NN5
  137. IPR=NN23
  138. IPL=NN7
  139. ELSEIF(I1.EQ.18)THEN
  140. IPCEN=NN17
  141. IPR=NN23
  142. IPL=NN5
  143. ELSEIF(I1.EQ.19)THEN
  144. IPCEN=NN19
  145. IPR=NN23
  146. IPL=NN17
  147. ELSEIF(I1.EQ.20)THEN
  148. IPCEN=NN1
  149. IPR=NN24
  150. IPL=NN13
  151. ELSEIF(I1.EQ.21)THEN
  152. IPCEN=NN7
  153. IPR=NN24
  154. IPL=NN1
  155. ELSEIF(I1.EQ.22)THEN
  156. IPCEN=NN19
  157. IPR=NN24
  158. IPL=NN7
  159. ELSEIF(I1.EQ.23)THEN
  160. IPCEN=NN13
  161. IPR=NN24
  162. IPL=NN19
  163. ENDIF
  164. DX0=XCOOR((IPR-1)*(IDIM+1)+1)-
  165. & XCOOR((IPCEN-1)*(IDIM+1)+1)
  166. DY0=XCOOR((IPR-1)*(IDIM+1)+2)-
  167. & XCOOR((IPCEN-1)*(IDIM+1)+2)
  168. DZ0=XCOOR((IPR-1)*(IDIM+1)+3)-
  169. & XCOOR((IPCEN-1)*(IDIM+1)+3)
  170. DX1=XCOOR((IPL-1)*(IDIM+1)+1)-
  171. & XCOOR((IPCEN-1)*(IDIM+1)+1)
  172. DY1=XCOOR((IPL-1)*(IDIM+1)+2)-
  173. & XCOOR((IPCEN-1)*(IDIM+1)+2)
  174. DZ1=XCOOR((IPL-1)*(IDIM+1)+3)-
  175. & XCOOR((IPCEN-1)*(IDIM+1)+3)
  176. NORX1=(DY0*DZ1-DY1*DZ0)
  177. NORY1=(DZ0*DX1-DZ1*DX0)
  178. NORZ1=(DX0*DY1-DX1*DY0)
  179. C
  180. C The scalar product between this normal and
  181. C CENTRE-IPCEN
  182. C
  183. DX1=XCOOR((IPCEN-1)*(IDIM+1)+1)-
  184. & XCOOR((NN27-1)*(IDIM+1)+1)
  185. DY1=XCOOR((IPCEN-1)*(IDIM+1)+2)-
  186. & XCOOR((NN27-1)*(IDIM+1)+2)
  187. DZ1=XCOOR((IPCEN-1)*(IDIM+1)+3)-
  188. & XCOOR((NN27-1)*(IDIM+1)+3)
  189. PSCA1=DX1*NORX1+DY1*NORY1+DZ1*NORZ1
  190. IF((PSCA1*PSCA0) .LT.0)THEN
  191. C
  192. WRITE(IOIMP,*) 'CU27'
  193. C
  194. C Erreur -107 0
  195. C Liste des noeuds de l'élément :
  196. C
  197. WRITE(IOIMP,*) 'Subroutine kdom9.eso'
  198. CALL ERREUR(-107)
  199. WRITE(IOIMP,*) NN1,NN2,NN3,NN4,NN5,NN6,NN7,NN8,NN9,NN10
  200. WRITE(IOIMP,*) NN11,NN12,NN13,NN14,NN15,NN16,NN17,NN18,NN19
  201. $ ,NN20
  202. WRITE(IOIMP,*) NN21,NN22,NN23,NN24,NN25,NN26,NN27
  203. C
  204. C Erreur 845 2
  205. C Maillage donné incorrect ?!!!
  206. C
  207. CALL ERREUR(845)
  208. C
  209. GOTO 9999
  210. ENDIF
  211. ENDDO
  212. C
  213. 9999 RETURN
  214. END
  215.  
  216.  
  217.  
  218.  

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