Télécharger rlexc1.eso

Retour à la liste

Numérotation des lignes :

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

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