Télécharger chanl2.eso

Retour à la liste

Numérotation des lignes :

chanl2
  1. C CHANL2 SOURCE GOUNAND 24/10/08 21:15:02 12025
  2. SUBROUTINE CHANL2(IPT1,IPT2)
  3. *
  4. * ce sub fait passer tous les elemnts quadratique en lineaire,
  5. * il conserve le nombre d'elements
  6. * modif SG 01/2014 : passage des QUAFs aux linéaires
  7.  
  8. IMPLICIT INTEGER(I-N)
  9.  
  10. -INC PPARAM
  11. -INC CCOPTIO
  12. -INC SMELEME
  13. logical ltelq
  14. SEGMENT INOO
  15. INTEGER INOU(NA)
  16. ENDSEGMENT
  17.  
  18. CALL ACTOBJ('MAILLAGE',IPT1,1)
  19. MELEME=IPT1
  20. NBNN= NUM(/1)
  21. NBELEM=NUM(/2)
  22. NBSOUS=LISOUS(/1)
  23. NBREF=0
  24. NA= MAX(NBSOUS,1)
  25. SEGINI INOO
  26. DO 100 I=1,MAX(IPT1.LISOUS(/1),1)
  27. IF( IPT1.LISOUS(/1).NE.0) THEN
  28. MELEME=IPT1.LISOUS(I)
  29. ENDIF
  30. NBELEM=NUM(/2)
  31. NBSOUS=0
  32. NBREF=0
  33. IF( ITYPEL.EQ.3)THEN
  34. * cas des seg3 ---> seg2
  35. NBNN=2
  36. SEGINI IPT2
  37. IPT2.ITYPEL=2
  38. INOU(I) = IPT2
  39. DO 1 K=1,NBELEM
  40. IPT2.NUM(1,K)=NUM(1,K)
  41. IPT2.NUM(2,K)=NUM(3,K)
  42. IPT2.ICOLOR(K)=ICOLOR(K)
  43. 1 CONTINUE
  44. ELSEIF( ITYPEL.EQ.6. OR. ITYPEL.EQ.7) THEN
  45. * cas des tri6,tri7 ---> tri3
  46. NBNN=3
  47. SEGINI IPT2
  48. IPT2.ITYPEL=4
  49. INOU(I) = IPT2
  50. DO 2 K=1,NBELEM
  51. IPT2.NUM(1,K)=NUM(1,K)
  52. IPT2.NUM(2,K)=NUM(3,K)
  53. IPT2.NUM(3,K)=NUM(5,K)
  54. IPT2.ICOLOR(K)=ICOLOR(K)
  55. 2 CONTINUE
  56. ELSEIF( ITYPEL.EQ.10 . OR. ITYPEL.EQ.11) THEN
  57. * cas des qua8,qua9-----> qua4
  58. NBNN=4
  59. SEGINI IPT2
  60. IPT2.ITYPEL=8
  61. INOU(I) = IPT2
  62. DO 3 K=1,NBELEM
  63. IPT2.NUM(1,K)=NUM(1,K)
  64. IPT2.NUM(2,K)=NUM(3,K)
  65. IPT2.NUM(3,K)=NUM(5,K)
  66. IPT2.NUM(4,K)=NUM(7,K)
  67. IPT2.ICOLOR(K)=ICOLOR(K)
  68. 3 CONTINUE
  69. ELSEIF( ITYPEL.EQ.13) THEN
  70. *4 cas des rac3 ---> rac2
  71. NBNN=4
  72. SEGINI IPT2
  73. IPT2.ITYPEL=12
  74. INOU(I) = IPT2
  75. DO 4 K=1,NBELEM
  76. IPT2.NUM(1,K)=NUM(1,K)
  77. IPT2.NUM(2,K)=NUM(3,K)
  78. IPT2.NUM(3,K)=NUM(4,K)
  79. IPT2.NUM(4,K)=NUM(6,K)
  80. IPT2.ICOLOR(K)=ICOLOR(K)
  81. 4 CONTINUE
  82. ELSEIF( ITYPEL.EQ.15.OR.ITYPEL.EQ.33) THEN
  83. *5 cas des cu20, cu27 ---> cub8
  84. NBNN=8
  85. SEGINI IPT2
  86. IPT2.ITYPEL=14
  87. INOU(I) = IPT2
  88. DO 5 K=1,NBELEM
  89. IPT2.NUM(1,K)=NUM(1,K)
  90. IPT2.NUM(2,K)=NUM(3,K)
  91. IPT2.NUM(3,K)=NUM(5,K)
  92. IPT2.NUM(4,K)=NUM(7,K)
  93. IPT2.NUM(5,K)=NUM(13,K)
  94. IPT2.NUM(6,K)=NUM(15,K)
  95. IPT2.NUM(7,K)=NUM(17,K)
  96. IPT2.NUM(8,K)=NUM(19,K)
  97. IPT2.ICOLOR(K)=ICOLOR(K)
  98. 5 CONTINUE
  99. ELSEIF( ITYPEL.EQ.17.OR.ITYPEL.EQ.34) THEN
  100. *6 cas des pr15, pr21 ---> pri6
  101. NBNN=6
  102. SEGINI IPT2
  103. IPT2.ITYPEL=16
  104. INOU(I) = IPT2
  105. DO 6 K=1,NBELEM
  106. IPT2.NUM(1,K)=NUM(1,K)
  107. IPT2.NUM(2,K)=NUM(3,K)
  108. IPT2.NUM(3,K)=NUM(5,K)
  109. IPT2.NUM(4,K)=NUM(10,K)
  110. IPT2.NUM(5,K)=NUM(12,K)
  111. IPT2.NUM(6,K)=NUM(14,K)
  112. IPT2.ICOLOR(K)=ICOLOR(K)
  113. 6 CONTINUE
  114. ELSEIF( ITYPEL.EQ.20. OR. itypel.eq.21) THEN
  115. *7 cas des lia6,lia8 ---> lia3,lia4
  116. NBNN=6
  117. IF(ITYPEL.EQ.21) NBNN=8
  118. SEGINI IPT2
  119. IPT2.ITYPEL=18
  120. IF(ITYPEL.EQ.21)IPT2.ITYPEL=19
  121. INOU(I) = IPT2
  122. DO 7 K=1,NBELEM
  123. IPT2.NUM(1,K)=NUM(1,K)
  124. IPT2.NUM(2,K)=NUM(3,K)
  125. IPT2.NUM(3,K)=NUM(5,K)
  126. IPT2.NUM(4,K)=NUM(7,K)
  127. IPT2.NUM(5,K)=NUM(9,K)
  128. IPT2.NUM(6,K)=NUM(11,K)
  129. IPT2.ICOLOR(K)=ICOLOR(K)
  130. IF( ITYPEL.EQ.21) THEN
  131. IPT2.NUM(7,K)=NUM(13,K)
  132. IPT2.NUM(8,K)=NUM(15,K)
  133. ENDIF
  134. 7 CONTINUE
  135. SEGDES IPT2
  136. ELSEIF( ITYPEL.EQ.24.OR.ITYPEL.EQ.35) THEN
  137. *8 cas des te10, te15 ---> te4
  138. NBNN=4
  139. SEGINI IPT2
  140. IPT2.ITYPEL=23
  141. INOU(I) = IPT2
  142. DO 8 K=1,NBELEM
  143. IPT2.NUM(1,K)=NUM(1,K)
  144. IPT2.NUM(2,K)=NUM(3,K)
  145. IPT2.NUM(3,K)=NUM(5,K)
  146. IPT2.NUM(4,K)=NUM(10,K)
  147. IPT2.ICOLOR(K)=ICOLOR(K)
  148. 8 CONTINUE
  149. SEGDES IPT2
  150. ELSEIF( ITYPEL.EQ.26.OR.ITYPEL.EQ.36) THEN
  151. *9 cas des py13, py19 ---> pyr5
  152. NBNN=5
  153. SEGINI IPT2
  154. IPT2.ITYPEL=25
  155. INOU(I) = IPT2
  156. DO 9 K=1,NBELEM
  157. IPT2.NUM(1,K)=NUM(1,K)
  158. IPT2.NUM(2,K)=NUM(3,K)
  159. IPT2.NUM(3,K)=NUM(5,K)
  160. IPT2.NUM(4,K)=NUM(7,K)
  161. IPT2.NUM(5,K)=NUM(13,K)
  162. IPT2.ICOLOR(K)=ICOLOR(K)
  163. 9 CONTINUE
  164. ELSE
  165. *tous les autres elements : on engrange
  166. INOU(I) = MELEME
  167. ENDIF
  168. 100 CONTINUE
  169. * on fusionne les sous parties
  170. II=INOU(/1)
  171. IRETOU=INOU(1)
  172. IF(II.EQ.1) GO TO 15
  173. DO 16 J=2,II
  174. INN=INOU(J)
  175. ltelq=.false.
  176. CALL FUSE( IRETOU,INN,IPT5,ltelq)
  177. IRETOU=IPT5
  178. 16 CONTINUE
  179. 15 CONTINUE
  180. IPT2=IRETOU
  181. CALL ACTOBJ('MAILLAGE',IPT2,1)
  182. RETURN
  183. END
  184.  
  185.  

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