Télécharger rlexc1.eso

Retour à la liste

Numérotation des lignes :

rlexc1
  1. C RLEXC1 SOURCE OF166741 24/10/03 21:15:39 12022
  2. SUBROUTINE RLEXC1(MLEPOI,MLECOE,MCHELM)
  3. C************************************************************************
  4. C
  5. C PROJET : CASTEM 2000
  6. C
  7. C NOM : RLEXC1
  8. C
  9. C DESCRIPTION : Appelle par GRADI2
  10. C
  11. C LANGAGE : FORTRAN 77 + ESOPE 2000 (avec extensions CISI)
  12. C
  13. C AUTEUR : A. BECCANTINI
  14. C
  15. C************************************************************************
  16. C
  17. C Inputs:
  18. C
  19. C MLEPOI : pointers of list of points (FACE + neighbors)
  20. C
  21. C MLECOE : pointers of the list of coeff
  22. C
  23. C Output
  24. C
  25. C MCHELM : MCHAML which contains the coeff. to compute gradients
  26. C
  27. IMPLICIT INTEGER(I-N)
  28. IMPLICIT REAL*8 (A-H,O-Z)
  29.  
  30. -INC PPARAM
  31. -INC CCOPTIO
  32.  
  33. -INC SMCHAML
  34. -INC SMLREEL
  35. -INC SMLENTI
  36. -INC SMELEME
  37. POINTEUR MLELAS.MLENTI, MLECON.MLENTI, MLEELT.MLENTI
  38. & ,MLEPOI.MLENTI,MLECOE.MLENTI
  39.  
  40. SEGMENT MATRIX
  41. REAL*8 MAT(N1,N2)
  42. ENDSEGMENT
  43.  
  44. INTEGER N1,N2
  45. INTEGER N3,L1,N1PTEL,N1EL,N2PTEL,N2EL
  46. INTEGER NBNN,NBELEM,NBSOUS,NBREF
  47. INTEGER JG
  48. C
  49. INTEGER NFAC,NMAX,IFAC, NTSOUS, I1, NBNN0, I3, I2, NG, ISOUS
  50. C
  51. SEGACT MLEPOI
  52. SEGACT MLECOE
  53. NFAC=MLEPOI.LECT(/1)
  54. C
  55. C**** NMAX = maximum number of points in the element
  56. C 'FACE'-neighbors
  57. NMAX=0
  58. DO IFAC = 1, NFAC, 1
  59. MLENTI=MLEPOI.LECT(IFAC)
  60. SEGACT MLENTI
  61. NBNN=MLENTI.LECT(/1)
  62. NMAX=MAX(NMAX,NBNN)
  63. ENDDO
  64. C
  65. C**** We create the following MLENTI
  66. C
  67. C MLECON : dimension = NMAX
  68. C MLECON.LECT(I) = number of elements with I points
  69. C
  70. C MLELAS : dimension = NMAX
  71.  
  72. C MLELAS.LECT(I) = 0 -> there are no elements with I
  73. C points
  74. C
  75. C J -> the J-th element has I points
  76. C
  77. C
  78. C The other elements with I points are into the chaining list
  79. C MLEELT.
  80. C
  81. C MLEELT : dimension = NFAC
  82. C MLEELT+MLELAS allows to rapidly recover the elements
  83. C with the same number of points
  84. C For example, the elements with I points are:
  85. C IELEM = MLELAS.LECT(I)
  86. C IELEM2 = MLEELT.LECT(IELEM)
  87. C ...
  88. C IELEM_K+1 = MLEELT.LECT(IELEM_K)
  89. C ...
  90. C until IELEM_K+1 = 0
  91. C
  92. JG=NMAX
  93. SEGINI MLELAS
  94. SEGINI MLECON
  95. JG=NFAC
  96. SEGINI MLEELT
  97. DO IFAC = 1, NFAC, 1
  98. MLENTI=MLEPOI.LECT(IFAC)
  99. NBNN=MLENTI.LECT(/1)
  100. MLECON.LECT(NBNN)=MLECON.LECT(NBNN)+1
  101. MLEELT.LECT(IFAC)= MLELAS.LECT(NBNN)
  102. MLELAS.LECT(NBNN)=IFAC
  103. ENDDO
  104. C
  105. C**** Les supports
  106. C
  107. NTSOUS=0
  108. DO ISOUS=1,NMAX,1
  109. IF(MLECON.LECT(ISOUS).NE.0) NTSOUS=NTSOUS+1
  110. ENDDO
  111. C
  112. C**** Initialisation du MCHELM
  113. C
  114. N1=NTSOUS
  115. N2=IDIM
  116. N3=6
  117. L1=8
  118. SEGINI MCHELM
  119. MCHELM.TITCHE='Gradient'
  120. MCHELM.IFOCHE=IFOUR
  121. C
  122. ISOUS=0
  123. NBSOUS=0
  124. NBREF=0
  125. DO I1 = 1, NMAX, 1
  126. NBELEM=MLECON.LECT(I1)
  127. IF(NBELEM .GT. 0)THEN
  128. ISOUS=ISOUS+1
  129. NBNN=I1
  130. SEGINI MELEME
  131. C ITYPEL=32 -> 'POLY'
  132. ITYPEL=32
  133. MCHELM.IMACHE(ISOUS)=MELEME
  134. MCHELM.CONCHE(ISOUS)=' '
  135. MCHELM.INFCHE(ISOUS,6)=1
  136. SEGINI MCHAML
  137. MCHELM.ICHAML(ISOUS)=MCHAML
  138. MCHAML.NOMCHE(1)='alphax'
  139. MCHAML.NOMCHE(2)='alphay'
  140. MCHAML.TYPCHE(1)='REAL*8 '
  141. MCHAML.TYPCHE(2)='REAL*8 '
  142. N1PTEL=NBNN
  143. N1EL=NBELEM
  144. N2PTEL=0
  145. N2EL=0
  146. SEGINI MELVA1
  147. SEGINI MELVA2
  148. MCHAML.IELVAL(1)=MELVA1
  149. MCHAML.IELVAL(2)=MELVA2
  150. IF(IDIM.EQ.3)THEN
  151. MCHAML.NOMCHE(3)='alphaz'
  152. MCHAML.TYPCHE(3)='REAL*8 '
  153. SEGINI MELVA3
  154. MCHAML.IELVAL(3)=MELVA3
  155. ENDIF
  156. IFAC=MLELAS.LECT(I1)
  157. MLENTI=MLEPOI.LECT(IFAC)
  158. MATRIX=MLECOE.LECT(IFAC)
  159. SEGACT MATRIX
  160. NBNN0=MLENTI.LECT(/1)
  161. IF(NBNN0.NE.NBNN)THEN
  162. WRITE(IOIMP,*) 'subroutine rlexc1.eso'
  163. CALL ERREUR(5)
  164. GOTO 9999
  165. ENDIF
  166. C
  167. C********** The first point of MLENTI is a FACE point
  168. C In the same way, MELEME.NUM(1,*) is the FACE point
  169. C
  170. C N.B. the first element is stored into MLELAS
  171. C the others are stored into MLEELT
  172. C
  173. DO I3=1,NBNN,1
  174. NG=MLENTI.LECT(I3)
  175. MELEME.NUM(I3,1)=NG
  176. MELVA1.VELCHE(I3,1)=MATRIX.MAT(2,I3)
  177. MELVA2.VELCHE(I3,1)=MATRIX.MAT(3,I3)
  178. IF(IDIM.EQ.3) MELVA3.VELCHE(I3,1)=MATRIX.MAT(4,I3)
  179. ENDDO
  180. SEGSUP MLENTI
  181. SEGSUP MATRIX
  182. C
  183. DO I2=2,NBELEM,1
  184. IFAC=MLEELT.LECT(IFAC)
  185. MLENTI=MLEPOI.LECT(IFAC)
  186. MATRIX=MLECOE.LECT(IFAC)
  187. SEGACT MATRIX
  188. NBNN0=MLENTI.LECT(/1)
  189. IF(NBNN0.NE.NBNN)THEN
  190. WRITE(IOIMP,*) 'subroutine rlexc1.eso'
  191. CALL ERREUR(5)
  192. GOTO 9999
  193. ENDIF
  194. C
  195. DO I3=1,NBNN,1
  196. NG=MLENTI.LECT(I3)
  197. MELEME.NUM(I3,I2)=NG
  198. MELVA1.VELCHE(I3,I2)=MATRIX.MAT(2,I3)
  199. MELVA2.VELCHE(I3,I2)=MATRIX.MAT(3,I3)
  200. IF(IDIM.EQ.3) MELVA3.VELCHE(I3,I2)=MATRIX.MAT(4,I3)
  201. ENDDO
  202. SEGSUP MLENTI
  203. SEGSUP MATRIX
  204. ENDDO
  205. C
  206. IFAC=MLEELT.LECT(IFAC)
  207. IF(IFAC.NE.0)THEN
  208. WRITE(IOIMP,*) 'subroutine rlexc1.eso'
  209. CALL ERREUR(5)
  210. GOTO 9999
  211. ENDIF
  212. SEGDES MCHAML
  213. SEGDES MELEME
  214. SEGDES MELVA1
  215. SEGDES MELVA2
  216. IF(IDIM.EQ.3) SEGDES MELVA3
  217. ENDIF
  218. ENDDO
  219. C
  220. SEGDES MCHELM
  221. C
  222. SEGSUP MLEPOI
  223. SEGSUP MLECOE
  224. SEGSUP MLEELT
  225. SEGSUP MLECON
  226. SEGSUP MLELAS
  227. C
  228. 9999 RETURN
  229. END
  230.  
  231.  
  232.  
  233.  
  234. C
  235.  
  236.  
  237.  
  238.  
  239.  
  240.  
  241.  
  242.  
  243.  

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