Télécharger gradi2.eso

Retour à la liste

Numérotation des lignes :

gradi2
  1. C GRADI2 SOURCE OF166741 24/12/13 21:15:55 12097
  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. IMPLICIT INTEGER(I-N)
  39.  
  40. -INC PPARAM
  41. -INC CCOPTIO
  42. -INC SMLENTI
  43. -INC SMELEME
  44. C
  45. POINTEUR MLEPOI.MLENTI, MLECOE.MLENTI, MLECOF.MLENTI
  46. & ,MLEPOF.MLENTI
  47. C
  48. INTEGER ICEN,ISOMM,IFACL0,IFACEP,IFACE,IFACEL
  49. & ,ICHELM,ISGLI1,ISGLI2,INORM
  50. C & ,I1,I2,IELEM,JG,NBE,NBN,NBSOUS,NGF,NGF1
  51. C
  52. C
  53. C**** FACE, FACEL, FACEP must have the same order, i.e.
  54. C the i-th point of FACE belongs also to the i-th element of
  55. C FACEP and to the i-th element of FACEL
  56. C
  57. CALL RLEORD(IFACL0,IFACEP,IFACE,IFACEL)
  58. IF(IERR .NE. 0)GOTO 9999
  59. C
  60. C**** test RLEORD
  61. C
  62. C MELEME= IFACEP
  63. C IPT1 = IFACEL
  64. C SEGACT MELEME
  65. C SEGACT IPT1
  66. C NBSOUS=MELEME.LISOUS(/1)
  67. C JG=MAX(1,NBSOUS)
  68. C SEGINI MLENTI
  69. C IF(NBSOUS.EQ.0)THEN
  70. C MLENTI.LECT(1)=IFACEP
  71. C ELSE
  72. C DO I1 = 1, NBSOUS, 1
  73. C MLENTI.LECT(I1)=MELEME.LISOUS(I1)
  74. C ENDDO
  75. C ENDIF
  76. C NBSOUS=JG
  77. C IELEM=0
  78. C DO I1 = 1, NBSOUS, 1
  79. C IPT2=MLENTI.LECT(I1)
  80. C SEGACT IPT2
  81. C NBN=IPT2.NUM(/1)
  82. C NBE=IPT2.NUM(/2)
  83. C DO I2 = 1, NBE, 1
  84. C IELEM=IELEM+1
  85. C NGF=IPT2.NUM(NBN,I2)
  86. C NGF1=IPT1.NUM(2,IELEM)
  87. C write(ioimp,*) ngf, ngf1
  88. C ENDDO
  89. C ENDDO
  90. C
  91. C**** Fin test
  92. C
  93. C
  94. C**** N.B: IFACEL has the same order of face as IFACEP. At the end
  95. C we have to destroy IFACEL
  96. C
  97. C**** The neighbors of each points 'SOMMET'
  98. C Two cases:
  99. C - If the 'sommet' point is on the border, the 'FACE'
  100. C and the 'CENTRE' points are both neighbors
  101. C - If the 'sommet' point does not belongs to the border, the
  102. C 'CENTRE' points are both neighbors
  103. C
  104. CALL RLENSO(IFACEL,IFACEP,ISOMM,MLEPOI)
  105. IF(IERR.NE.0) GOTO 9999
  106. C
  107. C RLENSO creates MLEPOI
  108. C MLEPOI : list of integers.
  109. C MLEPOI.LECT(I) is the pointer of the list of integers
  110. C MLENTI which contains the neighbors of the i-th sommet
  111. C point.
  112. C
  113. CALL RLENCO(ISOMM,ICEN,ISGLI1,ISGLI2,INORM,MLEPOI,MLECOE)
  114. IF(IERR.NE.0) GOTO 9999
  115. C
  116. C RLENCO creates MRECOE
  117. C MLECOE : list of integers.
  118. C MLECOE.LECT(I) is the pointer of the list of real
  119. C MLREEL which contains the coefficient of the i-th sommet
  120. C to compute its value as function of the values on
  121. C its neighbors.
  122. C Note that ISGLI1 is the support of the Dirichlet boundary
  123. C conditions; ISGLI2 is the support of the von Neumann boundary
  124. C conditions. Their intersection is 0 and their union is
  125. C the total boundary. This is checked in the subroutine
  126. C RLENCO
  127. C
  128. CALL RLENCF(IFACEL,IFACEP,MLEPOF,MLECOF)
  129. IF(IERR.NE.0) GOTO 9999
  130. C
  131. C RLENCF creates MLEPOF,MLECOF
  132. C
  133. C MLEPOF : list of integers.
  134. C MLEPOF.LECT(I) is the pointer of the list of the neighbors
  135. C of the I-th FACE. Neighbors are 'CENTRE' points and
  136. C 'VERTEX' points.
  137. C
  138. C MLECOF : list of integers.
  139. C MLECOF.LECT(I) is the pointer of the matrix of real
  140. C which contains the coefficient of the i-th face
  141. C to compute its gradient as function of the values on
  142. C its neighbors.
  143. C
  144. CALL RLENCT(IFACEL,ISOMM,MLEPOI,MLECOE,MLEPOF,MLECOF)
  145. IF(IERR.NE.0) GOTO 9999
  146. C
  147. C RLENCT adjusts MLEPOF,MLECOF such that
  148. C
  149. C MLEPOF : list of integers.
  150. C MLEPOF.LECT(I) is the pointer of the list of the neighbors
  151. C of the I-th FACE. Neighbors are just 'CENTRE' points and
  152. C 'boundary conditions' points.
  153. C
  154. C MLECOF : list of integers.
  155. C MLECOF.LECT(I) is the pointer of the matrix of real
  156. C which contains the coefficient of the i-th face
  157. C to compute its gradient as function of the values on
  158. C its neighbors.
  159. C
  160. C N.B.: segments MLEPOI,MLECOE are destroyed into RLENCT
  161. C
  162. C
  163. C**** Creation de MCHAML
  164. C MLECOE, MLEPOF -> MCHAML
  165. C
  166. CALL RLEXC1(MLEPOF,MLECOF,ICHELM)
  167. IF(IERR.NE.0)GOTO 9999
  168. C
  169. C**** On detrui le IFACEL et IFAC ici crée
  170. C
  171. MELEME=IFACEL
  172. SEGSUP MELEME
  173. MELEME=IFACE
  174. SEGSUP MELEME
  175. C
  176. 9999 CONTINUE
  177. RETURN
  178. END
  179.  
  180.  
  181.  
  182.  
  183.  
  184.  
  185.  
  186.  
  187.  
  188.  
  189.  

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