Télécharger trj702.eso

Retour à la liste

Numérotation des lignes :

trj702
  1. C TRJ702 SOURCE CHAT 05/01/13 03:48:21 5004
  2. SUBROUTINE TRJ702(XNOEU,X,G,IER)
  3. C
  4. C
  5. C
  6. CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
  7. C
  8. C CALCUL DES COORDONNEES DE REFERENCES DANS UN TRI7
  9. C XNOEU COORDONNEES DES SOMMETS
  10. C X REELLES
  11. C G REFERENCES
  12. C
  13. CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
  14. C
  15. C
  16. IMPLICIT INTEGER(I-N)
  17. IMPLICIT REAL*8 ( A-H,O-Z)
  18.  
  19. DIMENSION XNOEU(2,7),X(2),XN(7),G(2),DX(2),DG(2)
  20. DIMENSION Y(2),D1XN(7),D2XN(7),A(2,2),B(2,2)
  21.  
  22. -INC PPARAM
  23. -INC CCOPTIO
  24. C
  25. C
  26. C IDIM=2
  27. NOEL=7
  28. C
  29. C
  30. G(1)=1.D0/3.D0
  31. G(2)=1.D0/3.D0
  32. C
  33. N1=15
  34. DO 10 K=1,N1
  35. C
  36. XN(1)=1.D0-3.D0*G(1)-3.D0*G(2)+2.D0*G(1)*G(1)+
  37. * 7.D0*G(1)*G(2)+2.D0*G(2)*G(2)
  38. * -3.D0*G(1)*G(2)*(G(1)+G(2))
  39. XN(2)= 4.D0*G(1)*(1.D0-G(1)-4.D0*G(2)+3.D0*G(2)*(G(1)+G(2)))
  40. XN(3)=G(1)*(-1.D0+2.D0*G(1)+3.D0*G(2)-3.D0*G(2)*(G(1)+G(2)))
  41. XN(4)=4.D0*G(1)*G(2)*(-2.D0+3.D0*(G(1)+G(2)))
  42. XN(5)=G(2)*(-1.D0+3.D0*G(1)+2.D0*G(2)-3.D0*G(1)*(G(1)+G(2)))
  43. XN(6)=4.D0*G(2)*(1.D0-4.D0*G(1)-G(2)+3.D0*G(1)*(G(1)+G(2)))
  44. XN(7)=27.D0*G(2)*G(1)*(1.D0-G(1)-G(2))
  45. C WRITE(6,*)' XN ',XN(1),XN(2),XN(3),XN(4),XN(5),XN(6),XN(7)
  46. C
  47. Y(1)=0.D0
  48. Y(2)=0.D0
  49. DO 11 I =1,NOEL
  50. Y(1)=Y(1)+XN(I)*XNOEU(1,I)
  51. Y(2)=Y(2)+XN(I)*XNOEU(2,I)
  52. 11 CONTINUE
  53. C WRITE(6,*)' X1 ',X1,' Y1 ',Y1
  54. C
  55. DX(1)=X(1)-Y(1)
  56. DX(2)=X(2)-Y(2)
  57. D1XN(1)=-3.D0+4.D0*G(1)+7.D0*G(2)-6.D0*G(1)*G(2)-3.D0*G(2)*G(2)
  58. D1XN(2)=4.D0*(1.D0-2.D0*G(1)-4.D0*G(2)+
  59. * 6.D0*G(1)*G(2)+3.D0*G(2)*G(2))
  60. D1XN(3)=-1.D0+4.D0*G(1)+3.D0*G(2)-6.D0*G(1)*G(2)-3.D0*G(2)*G(2)
  61. D1XN(4)=4.D0*G(2)*(-2.D0+6.D0*G(1)+3.D0*G(2))
  62. D1XN(5)=3.D0*G(2)*(1.D0-2.D0*G(1)-G(2))
  63. D1XN(6)=4.D0*G(2)*(-4.D0+6.D0*G(1)+3.D0*G(2))
  64. D1XN(7)=27.D0*G(2)*(1.D0-2.D0*G(1)-G(2))
  65. C
  66. D2XN(1)=-3.D0+4.D0*G(2)+7.D0*G(1)-3.D0*G(1)*G(1)-6.D0*G(1)*G(2)
  67. D2XN(2)=4.D0*G(1)*(-4.D0+3.D0*G(1)+6.D0*G(2))
  68. D2XN(3)=3.D0*G(1)*(1.D0-G(1)-2.D0*G(2))
  69. D2XN(4)=4.D0*G(1)*(-2.D0+3.D0*G(1)+6.D0*G(2))
  70. D2XN(5)=-1.D0+3.D0*G(1)+4.D0*G(2)-3.D0*G(1)*G(1)-6.D0*G(1)*G(2)
  71. D2XN(6)=4.D0*(1.D0-4.D0*G(1)-2.D0*G(2)+
  72. * 3.D0*G(1)*G(1)+6.D0*G(1)*G(2))
  73. D2XN(7)=27.D0*G(1)*(1.D0-G(1)-2.D0*G(2))
  74. C
  75. A(1,1)=0.D0
  76. A(1,2)=0.D0
  77. A(2,1)=0.D0
  78. A(2,2)=0.D0
  79. C
  80. DO 4 I=1,NOEL
  81. A(1,1)=D1XN(I)*XNOEU(1,I)+A(1,1)
  82. A(1,2)=D1XN(I)*XNOEU(2,I)+A(1,2)
  83. A(2,1)=D2XN(I)*XNOEU(1,I)+A(2,1)
  84. A(2,2)=D2XN(I)*XNOEU(2,I)+A(2,2)
  85. 4 CONTINUE
  86. C
  87. DEL=A(1,1)*A(2,2)-A(2,1)*A(1,2)
  88. B(1,1)=1.D0/DEL*A(2,2)
  89. B(2,2)=1.D0/DEL*A(1,1)
  90. B(1,2)=-1.D0/DEL*A(2,1)
  91. B(2,1)=-1.D0/DEL*A(1,2)
  92. C
  93. DG(1)=B(1,1)*DX(1)+B(1,2)*DX(2)
  94. DG(2)=B(2,1)*DX(1)+B(2,2)*DX(2)
  95. C
  96. G(1)=DG(1)+G(1)
  97. G(2)=DG(2)+G(2)
  98. C
  99. DA1=ABS(DG(1))
  100. DA2=ABS(DG(2))
  101. IF(DA1.LE.0.0001.AND.DA2.LE.0.0001)GO TO 51
  102. A(1,1)=0.D0
  103. C
  104. 10 CONTINUE
  105. C
  106. C IF(K.GE.N1)WRITE(6,101)X(1),X(2),DA1,DA2
  107. MOTERR(1:8)='TRJ702 '
  108. REAERR(1)=X(1)
  109. REAERR(2)=X(2)
  110. REAERR(3)=0.
  111. C CALL ERREUR(-300)
  112. IER=-300
  113. 51 CONTINUE
  114. C
  115. C G(1)=XG1
  116. C G(2)=YG1
  117. C
  118. RETURN
  119. 101 FORMAT(//,3X,' PB DE CONVERGENCE TRJ702 AU POINT SITUE EN '
  120. *,2(1PE12.5),/,3X,' CONVERGENCE RELATIVE ',2(1PE12.5))
  121. C
  122. END
  123.  
  124.  
  125.  

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