Télécharger gradi2.eso

Retour à la liste

Numérotation des lignes :

gradi2
  1. C GRADI2 SOURCE CHAT 05/01/13 00:20:35 5004
  2. SUBROUTINE GRADI2(ICEN,ISOMM,IFACL0,IFACEP,ISGLI1,ISGLI2,
  3. & INORM,ICHELM)
  4. C************************************************************************
  5. C
  6. C PROJET : CASTEM 2000
  7. C
  8. C NOM : GRADI2
  9. C
  10. C DESCRIPTION : Appelle par PENDI2
  11. C
  12. C LANGAGE : FORTRAN 77 + ESOPE 2000 (avec extensions CISI)
  13. C
  14. C AUTEUR : A. BECCANTINI
  15. C
  16. C************************************************************************
  17. C
  18. C Inputs:
  19. C
  20. C ICEN : MELEME CENTRE
  21. C
  22. C ISOMM : MELEME SOMMET
  23. C
  24. C IFACL0 : MELEME FACEL (centre G + F + CENTRE D)
  25. C
  26. C IFACEP : MELEME FACEP (SOMMET belonging to a face + F)
  27. C
  28. C ISGLI1 : SPG of Dirichlet BC
  29. C
  30. C ISGLI2 : SPG of von Neumann BC
  31. C
  32. C INORM : interfaces normales
  33. C
  34. C Output :
  35. C
  36. C ICHELM : MCHAML which contains coeff. to compute gradients
  37. C
  38. C
  39. C
  40. C**** Variables de COOPTIO
  41. C
  42. C INTEGER IPLLB, IERPER, IERMAX, IERR, INTERR
  43. C & ,IOTER, IOLEC, IOIMP, IOCAR, IOACQ
  44. C & ,IOPER, IOSGB, IOGRA, IOSAU, IORES
  45. C & ,IECHO, IIMPI, IOSPI
  46. C & ,IDIM
  47. C & ,MCOORD
  48. C & ,IFOMOD, NIFOUR, IFOUR, NSDPGE, IONIVE
  49. C & ,NGMAXY, IZROSF, ISOTYP, IOSCR,LTEXLU
  50. C & ,NORINC,NORVAL,NORIND,NORVAD
  51. C & ,NUCROU, IPSAUV, IFICLE, IPREFI
  52. C
  53. IMPLICIT INTEGER(I-N)
  54.  
  55. -INC PPARAM
  56. -INC CCOPTIO
  57. -INC SMLENTI
  58. -INC SMELEME
  59. C
  60. POINTEUR MLEPOI.MLENTI, MLECOE.MLENTI, MLECOF.MLENTI
  61. & ,MLEPOF.MLENTI
  62. C
  63. INTEGER ICEN,ISOMM,IFACL0,IFACEP,IFACE,IFACEL
  64. & ,ICHELM,ISGLI1,ISGLI2,INORM
  65. C & ,I1,I2,IELEM,JG,NBE,NBN,NBSOUS,NGF,NGF1
  66. C
  67. C
  68. C**** FACE, FACEL, FACEP must have the same order, i.e.
  69. C the i-th point of FACE belongs also to the i-th element of
  70. C FACEP and to the i-th element of FACEL
  71. C
  72. CALL RLEORD(IFACL0,IFACEP,IFACE,IFACEL)
  73. IF(IERR .NE. 0)GOTO 9999
  74. C
  75. C**** test RLEORD
  76. C
  77. C MELEME= IFACEP
  78. C IPT1 = IFACEL
  79. C SEGACT MELEME
  80. C SEGACT IPT1
  81. C NBSOUS=MELEME.LISOUS(/1)
  82. C JG=MAX(1,NBSOUS)
  83. C SEGINI MLENTI
  84. C IF(NBSOUS.EQ.0)THEN
  85. C MLENTI.LECT(1)=IFACEP
  86. C ELSE
  87. C DO I1 = 1, NBSOUS, 1
  88. C MLENTI.LECT(I1)=MELEME.LISOUS(I1)
  89. C ENDDO
  90. C ENDIF
  91. C NBSOUS=JG
  92. C IELEM=0
  93. C DO I1 = 1, NBSOUS, 1
  94. C IPT2=MLENTI.LECT(I1)
  95. C SEGACT IPT2
  96. C NBN=IPT2.NUM(/1)
  97. C NBE=IPT2.NUM(/2)
  98. C DO I2 = 1, NBE, 1
  99. C IELEM=IELEM+1
  100. C NGF=IPT2.NUM(NBN,I2)
  101. C NGF1=IPT1.NUM(2,IELEM)
  102. C write(ioimp,*) ngf, ngf1
  103. C ENDDO
  104. C ENDDO
  105. C
  106. C**** Fin test
  107. C
  108. C
  109. C**** N.B: IFACEL has the same order of face as IFACEP. At the end
  110. C we have to destroy IFACEL
  111. C
  112. C**** The neighbors of each points 'SOMMET'
  113. C Two cases:
  114. C - If the 'sommet' point is on the border, the 'FACE'
  115. C and the 'CENTRE' points are both neighbors
  116. C - If the 'sommet' point does not belongs to the border, the
  117. C 'CENTRE' points are both neighbors
  118. C
  119. CALL RLENSO(IFACEL,IFACEP,ISOMM,MLEPOI)
  120. IF(IERR.NE.0) GOTO 9999
  121. C
  122. C RLENSO creates MLEPOI
  123. C MLEPOI : list of integers.
  124. C MLEPOI.LECT(I) is the pointer of the list of integers
  125. C MLENTI which contains the neighbors of the i-th sommet
  126. C point.
  127. C
  128. CALL RLENCO(ISOMM,ICEN,ISGLI1,ISGLI2,INORM,MLEPOI,MLECOE)
  129. IF(IERR.NE.0) GOTO 9999
  130. C
  131. C RLENCO creates MRECOE
  132. C MLECOE : list of integers.
  133. C MLECOE.LECT(I) is the pointer of the list of real
  134. C MLREEL which contains the coefficient of the i-th sommet
  135. C to compute its value as function of the values on
  136. C its neighbors.
  137. C Note that ISGLI1 is the support of the Dirichlet boundary
  138. C conditions; ISGLI2 is the support of the von Neumann boundary
  139. C conditions. Their intersection is 0 and their union is
  140. C the total boundary. This is checked in the subroutine
  141. C RLENCO
  142. C
  143. CALL RLENCF(IFACEL,IFACEP,MLEPOF,MLECOF)
  144. IF(IERR.NE.0) GOTO 9999
  145. C
  146. C RLENCF creates MLEPOF,MLECOF
  147. C
  148. C MLEPOF : list of integers.
  149. C MLEPOF.LECT(I) is the pointer of the list of the neighbors
  150. C of the I-th FACE. Neighbors are 'CENTRE' points and
  151. C 'VERTEX' points.
  152. C
  153. C MLECOF : list of integers.
  154. C MLECOF.LECT(I) is the pointer of the matrix of real
  155. C which contains the coefficient of the i-th face
  156. C to compute its gradient as function of the values on
  157. C its neighbors.
  158. C
  159. CALL RLENCT(IFACEL,ISOMM,MLEPOI,MLECOE,MLEPOF,MLECOF)
  160. IF(IERR.NE.0) GOTO 9999
  161. C
  162. C RLENCT adjusts MLEPOF,MLECOF such that
  163. C
  164. C MLEPOF : list of integers.
  165. C MLEPOF.LECT(I) is the pointer of the list of the neighbors
  166. C of the I-th FACE. Neighbors are just 'CENTRE' points and
  167. C 'boundary conditions' points.
  168. C
  169. C MLECOF : list of integers.
  170. C MLECOF.LECT(I) is the pointer of the matrix of real
  171. C which contains the coefficient of the i-th face
  172. C to compute its gradient as function of the values on
  173. C its neighbors.
  174. C
  175. C N.B.: segments MLEPOI,MLECOE are destroyed into RLENCT
  176. C
  177. C
  178. C**** Creation de MCHAML
  179. C MLECOE, MLEPOF -> MCHAML
  180. C
  181. CALL RLEXC1(MLEPOF,MLECOF,ICHELM)
  182. IF(IERR.NE.0)GOTO 9999
  183. C
  184. C**** On detrui le IFACEL et IFAC ici crée
  185. C
  186. MELEME=IFACEL
  187. SEGSUP MELEME
  188. MELEME=IFACE
  189. SEGSUP MELEME
  190. C
  191. 9999 CONTINUE
  192. RETURN
  193. END
  194.  
  195.  
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202.  
  203.  

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