Télécharger iplcur.eso

Retour à la liste

Numérotation des lignes :

iplcur
  1. C IPLCUR SOURCE SP204843 23/01/16 21:15:03 11552
  2. SUBROUTINE IPLCUR(ICHPO1,FLOT1,IPOIN1)
  3. C----------------------------------------------------------------------C
  4. C Interpolation d'un point d'abscisse curviligne FLOT1. C
  5. C----------------------------------------------------------------------C
  6. C Syntaxe : POIN1 = IPOL CHPO1 FLOT1 ;
  7. C
  8. C Entrees :
  9. C - CHPO1 : CHPOINT d'abscisses curvilignes
  10. C - FLOT1 : FLOTTANT, valeur de l'abscisse du point a interpoler
  11. C
  12. C Sorties :
  13. C - POIN1 : POINT le long de la ligne GEO1 (SEG2) d'abscisse curviligne
  14. C FLOT1 dans CHPO1.
  15. C
  16. C----------------------------------------------------------------------C
  17. IMPLICIT REAL*8(A-H,O-Z)
  18. IMPLICIT INTEGER(I-N)
  19. C
  20.  
  21. -INC PPARAM
  22. -INC CCOPTIO
  23. -INC SMELEME
  24. -INC SMCHPOI
  25. -INC SMCOORD
  26. -INC CCREEL
  27. C
  28. C
  29. MCHPO1 = ICHPO1
  30. CALL ACTOBJ('CHPOINT ',MCHPO1,1)
  31. C
  32. IPOIN1 = 0
  33. C
  34. C ON DETERMINE LES POINTS D'ABSCISSE INF ET SUP DE FLOT1
  35. C
  36. IPINF1 = 0
  37. IPSUP1 = 0
  38. NSOUP1 = MCHPO1.IPCHP(/1)
  39. DO 10 I=1,NSOUP1
  40. MSOUPO = MCHPO1.IPCHP(I)
  41. C SEGACT, MSOUPO
  42. NC = MSOUPO.NOCOMP(/2)
  43. IF (NC.NE.1) THEN
  44. CALL ERREUR(180)
  45. RETURN
  46. ENDIF
  47. C
  48. IPT2 = MSOUPO.IGEOC
  49. MPOVAL = MSOUPO.IPOVAL
  50. C SEGACT, MPOVAL
  51. NBVAL1 = MPOVAL.VPOCHA(/1)
  52. DO 11 JJ=1,NBVAL1
  53. VALJ1 = MPOVAL.VPOCHA(JJ,1)
  54. IF ((VALJ1-FLOT1).LE.(ABS(VALJ1)*XZPREC)) THEN
  55. IF (IPINF1.EQ.0) IPINF1 = JJ
  56. IF (MPOVAL.VPOCHA(JJ,1).GT.MPOVAL.VPOCHA(IPINF1,1))
  57. & IPINF1 = JJ
  58. ENDIF
  59. IF ((VALJ1-FLOT1).GE.(-1.D0*ABS(VALJ1)*XZPREC)) THEN
  60. IF (IPSUP1.EQ.0) IPSUP1 = JJ
  61. IF (MPOVAL.VPOCHA(JJ,1).LT.MPOVAL.VPOCHA(IPSUP1,1))
  62. & IPSUP1 = JJ
  63. ENDIF
  64. 11 CONTINUE
  65. 10 CONTINUE
  66. * write(6,*) 'IPINF1,IPSUP1,FLOT1=',IPINF1,IPSUP1,FLOT1
  67. IF (IPINF1.EQ.0.OR.IPSUP1.EQ.0) THEN
  68. REAERR(1) = FLOT1
  69. CALL ERREUR(1009)
  70. RETURN
  71. ENDIF
  72. C
  73. C
  74. C CREATION DU POINT
  75. C
  76. CALL ACTOBJ('MAILLAGE',IPT2,1)
  77. C SEGACT, IPT2
  78. NPINF1 = IPT2.NUM(1,IPINF1)
  79. NPSUP1 = IPT2.NUM(1,IPSUP1)
  80. C write(6,*) 'IPINF1,IPSUP1',IPINF1,IPSUP1
  81. C write(6,*) 'NPINF1,NPSUP1',NPINF1,NPSUP1
  82. IF (NPINF1.EQ.NPSUP1) THEN
  83. IPOIN1 = NPINF1
  84. ELSE
  85. XV1 = MPOVAL.VPOCHA(IPINF1,1)
  86. XV2 = MPOVAL.VPOCHA(IPSUP1,1)
  87. DXV = XV2 - XV1
  88. XXV = MAX(ABS(XV1),ABS(XV2))
  89. TOL1 = 100.D0*XZPREC*XXV
  90. IF (TOL1.EQ.0.D0) TOL1 = 10.D0*XZPREC
  91. IF (ABS(DXV).LE.TOL1) THEN
  92. CALL ERREUR(75)
  93. RETURN
  94. ENDIF
  95. SEGACT, MCOORD*mod
  96. NBPTS = NBPTS+1
  97. SEGADJ, MCOORD
  98. XPOI1 = (XV2 - FLOT1) / DXV
  99. XPOI2 = (FLOT1 - XV1) / DXV
  100. XPOIX = XPOI1 * XPOI2
  101. c write(6,*) 'NPINF1,NPSUP1,XPOI1,XPOI2,TOL1',
  102. c & NPINF1,NPSUP1,XPOI1,XPOI2,TOL1
  103. IF (XPOIX.LT.(0.D0-TOL1).OR.XPOIX.GT.(1.D0+TOL1)) THEN
  104. REAERR(1) = FLOT1
  105. CALL ERREUR(1009)
  106. RETURN
  107. ELSEIF (XPOI1.LE.TOL1) THEN
  108. IPOIN1 = NPSUP1
  109. ELSEIF (XPOI2.LE.TOL1) THEN
  110. IPOIN1 = NPINF1
  111. ELSE
  112. DO 20 I=1,IDIM
  113. XX1 = XCOOR((NPINF1-1)*(IDIM+1)+I)
  114. XX2 = XCOOR((NPSUP1-1)*(IDIM+1)+I)
  115. XX0 = XPOI1 * XX1 + XPOI2 * XX2
  116. XCOOR((NBPTS-1)*(IDIM+1)+I) = XX0
  117. 20 CONTINUE
  118. IPOIN1 = NBPTS
  119. ENDIF
  120. ENDIF
  121. C
  122. RETURN
  123. END
  124.  
  125.  
  126.  
  127.  
  128.  
  129.  

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