Télécharger kpro.eso

Retour à la liste

Numérotation des lignes :

kpro
  1. C KPRO SOURCE PV 22/01/04 06:13:28 11250
  2. SUBROUTINE KPRO
  3. IMPLICIT INTEGER(I-N)
  4. IMPLICIT REAL*8 (A-H,O-Z)
  5. C*************************************************************************
  6. C
  7. C Operateur KPRO
  8. C
  9. C OBJET : to project CHAMPOINT
  10. C SYNTAXE : CHR = KPRO CHP GEO ;
  11. C
  12. C CHP : CHPOINT
  13. C CHR : CHPOINT
  14. C GEO : MAILLAGE (SEG2 or SEG3)
  15. C
  16. C CHR is the projection of CHP following the connectivities GEO.
  17. C The value of CHP at point 1 of each element of GEO (if exists)
  18. C is projected to the point 2 of the same element of GEO thus to
  19. C constitute CHR.
  20. C
  21. C*************************************************************************
  22. CHARACTER*8 TYPE
  23.  
  24.  
  25. -INC PPARAM
  26. -INC CCOPTIO
  27. -INC SMCOORD
  28. -INC SMCHPOI
  29. POINTEUR MCHP.MCHPOI,MSPO.MSOUPO,MVAL.MPOVAL
  30. POINTEUR NCHP.MCHPOI,NSPO.MSOUPO,NVAL.MPOVAL
  31. -INC SMELEME
  32. POINTEUR MGEO.MELEME,MSPG.MELEME,NSPG.MELEME
  33.  
  34. SEGMENT LOCSGM
  35. INTEGER ICHP(NPART)
  36. ENDSEGMENT
  37.  
  38. C***
  39.  
  40. C Reading the CHPOINT
  41.  
  42. TYPE='CHPOINT '
  43. CALL LIROBJ(TYPE,MCHP,0,IRET)
  44. IF(IRET.EQ.0) THEN
  45. WRITE(6,*)'On attend un CHAMPOINT'
  46. RETURN
  47. ENDIF
  48.  
  49. C Reading the MAILLAGE
  50.  
  51. TYPE='MAILLAGE'
  52. CALL LIROBJ(TYPE,MGEO,0,IRET)
  53. IF(IRET.EQ.0) THEN
  54. WRITE(6,*)'On attend un MAILLAGE'
  55. RETURN
  56. ENDIF
  57.  
  58. C Veryfing the MAILLAGE
  59. inoeu = 2
  60. SEGACT MGEO
  61. ITIPO=MGEO.ITYPEL
  62. IF(ITIPO.LT.2.OR.ITIPO.GT.3) THEN
  63. WRITE(6,*)'On attend un MAILLAGE compose de SEG2 ou SEG3'
  64. RETURN
  65. ENDIF
  66. if(itipo.eq.3) inoeu = 3
  67. NELGEO=MGEO.NUM(/2)
  68. NBNN =1
  69. NBSOUS=0
  70. NBREF =0
  71.  
  72. SEGACT MCHP
  73.  
  74. NPART=MCHP.IPCHP(/1)
  75. NAT =MCHP.JATTRI(/1)
  76. SEGINI LOCSGM
  77.  
  78. IPART=0
  79. DO I=1,NPART
  80.  
  81. MSPO=MCHP.IPCHP(I)
  82. SEGACT MSPO
  83.  
  84. MSPG=MSPO.IGEOC
  85. MVAL=MSPO.IPOVAL
  86. SEGACT MSPG,MVAL
  87.  
  88. NC =MVAL.VPOCHA(/2)
  89. NELSPG=MSPG.NUM(/2)
  90. N =NELGEO
  91. NBELEM=NELGEO
  92. SEGINI NSPG,NVAL
  93. NSPG.ITYPEL=1
  94.  
  95. NPUNTO=0
  96. DO J=1,NELGEO
  97. DO K=1,NELSPG
  98. IELGEO=MGEO.NUM(1,J)
  99. IELSPG=MSPG.NUM(1,K)
  100. IF(IELGEO.EQ.IELSPG) THEN
  101. NPUNTO=NPUNTO+1
  102. NSPG.NUM(1,NPUNTO)=MGEO.NUM(inoeu,J)
  103. DO L=1,NC
  104. NVAL.VPOCHA(NPUNTO,L)=MVAL.VPOCHA(K,L)
  105. ENDDO
  106. GO TO 100
  107. ENDIF
  108. ENDDO
  109. 100 CONTINUE
  110. ENDDO
  111.  
  112. IF(NPUNTO.EQ.0) THEN
  113. SEGSUP NSPG,NVAL
  114. SEGDES MSPG,MVAL,MSPO
  115. GO TO 200
  116. ELSEIF(NPUNTO.NE.NBELEM) THEN
  117. NBELEM=NPUNTO
  118. N =NPUNTO
  119. SEGADJ NSPG,NVAL
  120. ENDIF
  121.  
  122. SEGINI NSPO
  123. NSPO.IGEOC =NSPG
  124. NSPO.IPOVAL=NVAL
  125. DO L=1,NC
  126. NSPO.NOCOMP(L)=MSPO.NOCOMP(L)
  127. NSPO.NOHARM(L)=MSPO.NOHARM(L)
  128. ENDDO
  129.  
  130. NSOUPO=1
  131. SEGINI NCHP
  132. NCHP.MTYPOI =MCHP.MTYPOI
  133. NCHP.MOCHDE =MCHP.MOCHDE
  134. NCHP.IFOPOI =MCHP.IFOPOI
  135. NCHP.IPCHP(1)=NSPO
  136. DO L=1,NAT
  137. NCHP.JATTRI(L)=MCHP.JATTRI(L)
  138. ENDDO
  139.  
  140. IPART=IPART+1
  141. ICHP(IPART)=NCHP
  142.  
  143. SEGDES NCHP,NSPO,NSPG,NVAL,MSPG,MVAL,MSPO
  144.  
  145. 200 CONTINUE
  146.  
  147. ENDDO
  148.  
  149. SEGDES MCHP
  150.  
  151. IF(IPART.EQ.0) THEN
  152. WRITE(ioimp,*) 'Le CHPOINT et le MAILLAGE n''ont pas ',
  153. & 'de point commun'
  154. SEGSUP LOCSGM
  155. RETURN
  156. ENDIF
  157.  
  158. NCHP=ICHP(1)
  159. CALL ECROBJ('CHPOINT ',NCHP)
  160.  
  161. IF(IPART.GT.1) THEN
  162. DO I=2,IPART
  163. NCHP=ICHP(I)
  164. CALL ECROBJ('CHPOINT ',NCHP)
  165. CALL PRFUSE
  166. ENDDO
  167. ENDIF
  168.  
  169. SEGSUP LOCSGM
  170.  
  171. RETURN
  172. END
  173.  
  174.  
  175.  
  176.  

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