Télécharger pave.eso

Retour à la liste

Numérotation des lignes :

pave
  1. C PAVE SOURCE PV 20/03/24 21:20:01 10554
  2. C PROCEDURE UTILISEE PAR PRPAVE POUR LE MAILLAGE DE CUBES.
  3. C
  4. SUBROUTINE PAVE(NX,NY,NZ,IPT1,IPT2,IPT3,IPT4,IPT5,IPT6)
  5. IMPLICIT INTEGER(I-N)
  6. -INC SMELEME
  7.  
  8. -INC PPARAM
  9. -INC CCOPTIO
  10. -INC SMCOORD
  11. -INC CCGEOME
  12. IF (ILCOUR.NE.14.AND.ILCOUR.NE.15) CALL ERREUR(16)
  13. IF (IERR.NE.0) RETURN
  14. NBSOUS=0
  15. NBREF=6
  16. NBNN=8
  17. NBC=NX*NY
  18. NBELEM=NBC*NZ
  19. SEGINI IPT7
  20. IPT7.ITYPEL=14
  21. C
  22. NN1=IPT1.NUM(/1)/4
  23. NN2=IPT2.NUM(/1)/4
  24. NN3=IPT3.NUM(/1)/4
  25. NN4=IPT4.NUM(/1)/4
  26. NN5=IPT5.NUM(/1)/4
  27. NN6=IPT6.NUM(/1)/4
  28. I1=IPT1.NUM(1,1)
  29. I2=IPT4.NUM(1,1)
  30. I3=IPT6.NUM(NN6+1,NX)
  31. I4=IPT6.NUM(1,1)
  32. I5=IPT2.NUM(1,1)
  33. I6=IPT2.NUM(NN2+1,NX)
  34. I7=IPT2.NUM(2*NN2+1,NBC)
  35. I8=IPT3.NUM(2*NN3+1,NY*NZ)
  36. C
  37. C NUMEROTATION FACE 1
  38. C
  39. IPT7.NUM(1,1)=I1
  40. IF(NX.EQ.1) GOTO 15
  41. C
  42. DO 10 I=2,NX
  43. IPT7.NUM(1,I)=IPT1.NUM(1,I)
  44. IPT7.NUM(2,I-1)=IPT1.NUM(NN1+1,I-1)
  45. 10 CONTINUE
  46. 15 IPT7.NUM(2,NX)=I2
  47. IF(NY.EQ.1) GOTO 35
  48. C
  49. DO 30 N=2,NY
  50. IPT7.NUM(4,(N-2)*NX+1)=IPT1.NUM(3*NN1+1,(N-2)*NX+1)
  51. IPT7.NUM(1,(N-1)*NX+1)=IPT1.NUM(1,(N-1)*NX+1)
  52. IF(NX.EQ.1) GOTO 25
  53. C
  54. DO 20 I=2,NX
  55. IPOINT=IPT1.NUM(3*NN1+1,(N-2)*NX+I)
  56. IPT7.NUM(4,(N-2)*NX+I)=IPOINT
  57. IPT7.NUM(3,(N-2)*NX+I-1)=IPOINT
  58. IPT7.NUM(1,(N-1)*NX+I)=IPOINT
  59. IPT7.NUM(2,(N-1)*NX+I-1)=IPOINT
  60. 20 CONTINUE
  61. 25 IPT7.NUM(3,(N-1)*NX)=IPT1.NUM(2*NN1+1,(N-1)*NX)
  62. IPT7.NUM(2,N*NX)=IPT1.NUM(NN1+1,N*NX)
  63. 30 CONTINUE
  64. 35 IPT7.NUM(4,(NY-1)*NX+1)=I4
  65. IF(NX.EQ.1) GOTO 45
  66. C
  67. DO 40 N=2,NX
  68. IPT7.NUM(4,(NY-1)*NX+N)=IPT1.NUM(3*NN1+1,(NY-1)*NX+N)
  69. IPT7.NUM(3,(NY-1)*NX+N-1)=IPT1.NUM(2*NN1+1,(NY-1)*NX+N-1)
  70. 40 CONTINUE
  71. 45 IPT7.NUM(3,NBC)=I3
  72. C
  73. C `COUCHES` INTERMEDIAIRES
  74. C
  75. IF(NZ.EQ.1) GOTO 105
  76. C
  77. segact mcoord*mod
  78. NBPTA=nbpts
  79. NBPTS=NBPTA+(NY-1)*(NX-1)*(NZ-1)
  80. SEGADJ MCOORD
  81. DO 100 J=2,NZ
  82. C
  83. C 1ERE RANGEE
  84. IPT7.NUM(1,(J-1)*NBC+1)=IPT5.NUM(1,(J-1)*NX+1)
  85. IPT7.NUM(5,(J-2)*NBC+1)=IPT5.NUM(1,(J-1)*NX+1)
  86. IF(NX.EQ.1) GOTO 55
  87. C
  88. DO 50 I=2,NX
  89. IPOINT=IPT5.NUM(1,(J-1)*NX+I)
  90. IPT7.NUM(1,(J-1)*NBC+I)=IPOINT
  91. IPT7.NUM(5,(J-2)*NBC+I)=IPOINT
  92. IPT7.NUM(2,(J-1)*NBC+I-1)=IPOINT
  93. IPT7.NUM(6,(J-2)*NBC+I-1)=IPOINT
  94. 50 CONTINUE
  95. 55 IPT7.NUM(2,(J-1)*NBC+NX)=IPT5.NUM(NN5+1,J*NX)
  96. IPT7.NUM(6,(J-2)*NBC+NX)=IPT5.NUM(NN5+1,J*NX)
  97. C
  98. C RANGEES SUIVANTES
  99. IF(NY.EQ.1) GOTO 85
  100. C
  101. DO 80 N=2,NY
  102. IPOINT=IPT3.NUM(1,(J-1)*NY+N)
  103. IPT7.NUM(1,(J-1)*NBC+(N-1)*NX+1)=IPOINT
  104. IPT7.NUM(5,(J-2)*NBC+(N-1)*NX+1)=IPOINT
  105. IPT7.NUM(4,(J-1)*NBC+(N-2)*NX+1)=IPOINT
  106. IPT7.NUM(8,(J-2)*NBC+(N-2)*NX+1)=IPOINT
  107. IF (NX.EQ.1) GOTO 75
  108. C
  109. DO 70 I=2,NX
  110. C
  111. C CREATION DU POINT COURANT
  112. IPL=I-1
  113. JPL=J-1
  114. NPL=N-1
  115. C
  116. DO 60 K=1,4
  117. XINT=(XCOOR(4*(I1-1)+K)*(NX-IPL)*(NZ-JPL)*(NY-NPL)
  118. 1 +XCOOR(4*(I5-1)+K)*(NX-IPL)*JPL*(NY-NPL)
  119. 2 +XCOOR(4*(I2-1)+K)*IPL*(NZ-JPL)*(NY-NPL)
  120. 3 +XCOOR(4*(I6-1)+K)*IPL*JPL*(NY-NPL)
  121. 4 +XCOOR(4*(I3-1)+K)*IPL*(NZ-JPL)*NPL
  122. 5 +XCOOR(4*(I7-1)+K)*IPL*JPL*NPL
  123. 6 +XCOOR(4*(I4-1)+K)*(NX-IPL)*(NZ-JPL)*NPL
  124. 7 +XCOOR(4*(I8-1)+K)*(NX-IPL)*JPL*NPL)/NBELEM
  125. C
  126. IND1=IPT1.NUM(NN1+1,NPL*NX+IPL)
  127. IND2=IPT2.NUM(NN2+1,NPL*NX+IPL)
  128. IND3=IPT3.NUM(NN3+1,JPL*NY+NPL)
  129. IND4=IPT4.NUM(NN4+1,JPL*NY+NPL)
  130. IND5=IPT5.NUM(NN5+1,JPL*NX+IPL)
  131. IND6=IPT6.NUM(NN6+1,JPL*NX+IPL)
  132. COFAC=(XCOOR(4*(IND1-1)+K)*(NZ-JPL)+XCOOR(4*
  133. 1 (IND2-1)+K)*JPL)/NZ+(XCOOR(4*(IND3-1)+K)*(NX-IPL)+
  134. 2 XCOOR(4*(IND4-1)+K)*IPL)/NX+(XCOOR(4*(IND5-1)+K)*
  135. 3 (NY-NPL)+XCOOR(4*(IND6-1)+K)*NPL)/NY
  136. C
  137. I13=IPT3.NUM(NN3+1,NPL)
  138. I14=IPT4.NUM(NN4+1,NPL)
  139. I15=IPT5.NUM(NN5+1,IPL)
  140. I16=IPT6.NUM(NN6+1,IPL)
  141. I23=IPT2.NUM(1,NPL*NX+1)
  142. I24=IPT2.NUM(NN2+1,(NPL+1)*NX)
  143. I25=IPT2.NUM(NN2+1,IPL)
  144. I26=IPT2.NUM(2*NN2+1,(NY-1)*NX+IPL)
  145. I35=IPT3.NUM(1,JPL*NY+1)
  146. I36=IPT3.NUM(NN3+1,(JPL+1)*NY)
  147. I45=IPT4.NUM(1,JPL*NY+1)
  148. I46=IPT4.NUM(NN4+1,(JPL+1)*NY)
  149. COAR=((XCOOR(4*(I35-1)+K)*(NX-IPL)+XCOOR(4*(I45-1)+K)
  150. 1 *IPL)*(NY-NPL)+(XCOOR(4*(I36-1)+K)*(NX-IPL)+
  151. 2 XCOOR(4*(I46-1)+K)*IPL)*NPL)/NBC
  152. COAR=COAR+((XCOOR(4*(I13-1)+K)*(NX-IPL)+XCOOR(4*(I14
  153. 1 -1)+K)*IPL)*(NZ-JPL)+(XCOOR(4*(I23-1)+K)*(NX-IPL)
  154. 2 +XCOOR(4*(I24-1)+K)*IPL)*JPL)/(NX*NZ)
  155. COAR=COAR+((XCOOR(4*(I15-1)+K)*(NY-NPL)+XCOOR(4*(I16
  156. 1 -1)+K)*NPL)*(NZ-JPL)+(XCOOR(4*(I25-1)+K)*(NY-NPL)
  157. 2 +XCOOR(4*(I26-1)+K)*NPL)*JPL)/(NY*NZ)
  158. C
  159. XCOOR(NBPTA*4+K)=XINT+COFAC-COAR
  160. 60 CONTINUE
  161. NBPTA=NBPTA+1
  162. C
  163. IPOINT=NBPTA
  164. IPT7.NUM(1,(N-1)*NX+(J-1)*NBC+I)=IPOINT
  165. IPT7.NUM(5,(N-1)*NX+(J-2)*NBC+I)=IPOINT
  166. IPT7.NUM(2,(N-1)*NX+(J-1)*NBC+I-1)=IPOINT
  167. IPT7.NUM(6,(N-1)*NX+(J-2)*NBC+I-1)=IPOINT
  168. IPT7.NUM(3,(N-2)*NX+(J-1)*NBC+I-1)=IPOINT
  169. IPT7.NUM(7,(N-2)*NX+(J-2)*NBC+I-1)=IPOINT
  170. IPT7.NUM(4,(N-2)*NX+(J-1)*NBC+I)=IPOINT
  171. IPT7.NUM(8,(N-2)*NX+(J-2)*NBC+I)=IPOINT
  172. 70 CONTINUE
  173. 75 IPOINT=IPT4.NUM(1,(J-1)*NY+N)
  174. IPT7.NUM(3,(N-1)*NX+(J-1)*NBC)=IPOINT
  175. IPT7.NUM(2,N*NX+(J-1)*NBC)=IPOINT
  176. IPT7.NUM(7,(N-1)*NX+(J-2)*NBC)=IPOINT
  177. IPT7.NUM(6,N*NX+(J-2)*NBC)=IPOINT
  178. 80 CONTINUE
  179. C
  180. C DERNIERE RANGEE
  181. 85 IPT7.NUM(4,(NY-1)*NX+(J-1)*NBC+1)=IPT6.NUM(1,(J-1)*NX+1)
  182. IPT7.NUM(8,(NY-1)*NX+(J-2)*NBC+1)=IPT6.NUM(1,(J-1)*NX+1)
  183. IF(NX.EQ.1) GOTO 95
  184. C
  185. DO 90 I=2,NX
  186. IPOINT=IPT6.NUM(1,(J-1)*NX+I)
  187. IPT7.NUM(4,(NY-1)*NX+(J-1)*NBC+I)=IPOINT
  188. IPT7.NUM(8,(NY-1)*NX+(J-2)*NBC+I)=IPOINT
  189. IPT7.NUM(3,(NY-1)*NX+(J-1)*NBC+I-1)=IPOINT
  190. IPT7.NUM(7,(NY-1)*NX+(J-2)*NBC+I-1)=IPOINT
  191. 90 CONTINUE
  192. 95 IPT7.NUM(3,J*NBC)=IPT6.NUM(NN6+1,J*NX)
  193. IPT7.NUM(7,(J-1)*NBC)=IPT6.NUM(NN6+1,J*NX)
  194. 100 CONTINUE
  195. C
  196. C DERNIERE COUCHE = FACE 2
  197. C
  198. 105 IND=NBC*(NZ-1)
  199. IPT7.NUM(5,IND+1)=I5
  200. IF(NX.EQ.1) GOTO 115
  201. C
  202. DO 110 I=2,NX
  203. IPT7.NUM(5,IND+I)=IPT2.NUM(1,I)
  204. IPT7.NUM(6,IND+I-1)=IPT2.NUM(NN2+1,I-1)
  205. 110 CONTINUE
  206. 115 IPT7.NUM(6,NX+IND)=I6
  207. IF(NY.EQ.1) GOTO 135
  208. C
  209. DO 130 N=2,NY
  210. IPT7.NUM(8,IND+(N-2)*NX+1)=IPT2.NUM(3*NN2+1,(N-2)*NX+1)
  211. IPT7.NUM(5,IND+(N-1)*NX+1)=IPT2.NUM(1,(N-1)*NX+1)
  212. IF(NX.EQ.1) GOTO 125
  213. C
  214. DO 120 I=2,NX
  215. IPOINT=IPT2.NUM(3*NN2+1,(N-2)*NX+I)
  216. IPT7.NUM(8,IND+(N-2)*NX+I)=IPOINT
  217. IPT7.NUM(7,IND+(N-2)*NX+I-1)=IPOINT
  218. IPT7.NUM(5,IND+(N-1)*NX+I)=IPOINT
  219. IPT7.NUM(6,IND+(N-1)*NX+I-1)=IPOINT
  220. 120 CONTINUE
  221. 125 IPT7.NUM(7,IND+(N-1)*NX)=IPT2.NUM(2*NN2+1,(N-1)*NX)
  222. IPT7.NUM(6,IND+N*NX)=IPT2.NUM(NN2+1,N*NX)
  223. 130 CONTINUE
  224. 135 IPT7.NUM(8,IND+(NY-1)*NX+1)=I8
  225. IF(NX.EQ.1) GOTO 145
  226. C
  227. DO 140 N=2,NX
  228. IPT7.NUM(8,IND+(NY-1)*NX+N)=IPT2.NUM(3*NN2+1,(NY-1)*NX+N)
  229. IPT7.NUM(7,IND+(NY-1)*NX+N-1)=IPT2.NUM(2*NN2+1,(NY-1)*NX+N-1)
  230. 140 CONTINUE
  231. 145 IPT7.NUM(7,IND+NBC)=I7
  232. C
  233. IPT7.LISREF(1)=IPT1
  234. IPT7.LISREF(2)=IPT2
  235. IPT7.LISREF(3)=IPT3
  236. IPT7.LISREF(4)=IPT4
  237. IPT7.LISREF(5)=IPT5
  238. IPT7.LISREF(6)=IPT6
  239. ITY=ILCOUR
  240. CALL CHANGE(IPT7,ITY)
  241. CALL ECROBJ('MAILLAGE',IPT7)
  242. SEGDES IPT7
  243. RETURN
  244. END
  245.  
  246.  
  247.  
  248.  
  249.  
  250.  
  251.  
  252.  
  253.  
  254.  
  255.  

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