Télécharger gamt3.eso

Retour à la liste

Numérotation des lignes :

gamt3
  1. C GAMT3 SOURCE CHAT 05/01/13 00:15:41 5004
  2. SUBROUTINE GAMT3(S,DS,R3,YUNG,GAMA,KERRE)
  3. C
  4. IMPLICIT INTEGER(I-N)
  5. IMPLICIT REAL*8 (A-H,O-Z)
  6. -INC PPARAM
  7. -INC CCOPTIO
  8. C
  9. DIMENSION S(*),DS(*)
  10. RF=YUNG*YUNG*YUNG*1.D-24
  11. GAMRF=1.D-7
  12. C
  13. C***********************************************************************
  14. C*********** CALCUL DES COEFICIENTS DE L EQUATION DU 3: DEGRE **********
  15. C*********** AAA GAMA **3 + BBB GAMA **2 + CCC GAMA + DDD =0 ***********
  16. C***********************************************************************
  17. C
  18. AA1=DS(1)*DS(2)*DS(3)+2.D0*DS(4)*DS(5)*DS(6)
  19. AA2=DS(1)*DS(5)*DS(5)+DS(2)*DS(6)*DS(6)+DS(3)*DS(4)*DS(4)
  20. AAA=AA1-AA2
  21. C
  22. BB1=DS(1)*DS(2)*R3+DS(2)*DS(3)*R3+DS(3)*DS(1)*R3
  23. BB2=DS(4)*DS(4)*R3+DS(5)*DS(5)*R3+DS(6)*DS(6)*R3
  24. BB3=S(1)*DS(5)*DS(5)+S(2)*DS(6)*DS(6)+S(3)*DS(4)*DS(4)
  25. BB4=S(1)*DS(2)*DS(3)+S(2)*DS(3)*DS(1)+S(3)*DS(1)*DS(2)
  26. BB5=S(4)*DS(5)*DS(6)+S(5)*DS(6)*DS(4)+S(6)*DS(4)*DS(5)
  27. BB6=S(4)*DS(4)*DS(3)+S(5)*DS(5)*DS(1)+S(6)*DS(6)*DS(2)
  28. BBB=-BB1+BB2-BB3+BB4+2.D0*BB5-2.D0*BB6
  29. C
  30. CC1=DS(1)*R3*R3+DS(2)*R3*R3+DS(3)*R3*R3
  31. CC2=S(1)*DS(2)*R3+S(2)*DS(3)*R3+S(3)*DS(1)*R3
  32. CC3=S(1)*DS(3)*R3+S(2)*DS(1)*R3+S(3)*DS(2)*R3
  33. CC4=S(4)*DS(4)*R3+S(5)*DS(5)*R3+S(6)*DS(6)*R3
  34. CC5=S(1)*S(2)*DS(3)+S(2)*S(3)*DS(1)+S(3)*S(1)*DS(2)
  35. CC6=S(4)*S(4)*DS(3)+S(5)*S(5)*DS(1)+S(6)*S(6)*DS(2)
  36. CC7=S(4)*S(5)*DS(6)+S(5)*S(6)*DS(4)+S(6)*S(4)*DS(5)
  37. CC8=S(1)*S(5)*DS(5)+S(2)*S(6)*DS(6)+S(3)*S(4)*DS(4)
  38. CCC=CC1-CC2-CC3+2.D0*CC4+CC5-CC6+2.D0*CC7-2.D0*CC8
  39. C
  40. DD1=-R3*R3*R3+S(1)*R3*R3+S(2)*R3*R3+S(3)*R3*R3
  41. DD2=S(4)*S(4)*R3+S(5)*S(5)*R3+S(6)*S(6)*R3
  42. DD3=S(1)*S(2)*R3+S(2)*S(3)*R3+S(3)*S(1)*R3
  43. DD4=S(1)*S(5)*S(5)+S(2)*S(6)*S(6)+S(3)*S(4)*S(4)
  44. DD5=S(1)*S(2)*S(3)+2.D0*S(4)*S(5)*S(6)
  45. DDD=DD1+DD2-DD3-DD4+DD5
  46. C
  47. IF(IIMPI.EQ.9) THEN
  48. WRITE(6,*) 'AA1',AA1
  49. WRITE(6,*) 'AA2',AA2
  50. WRITE(6,*) 'AAA',AAA
  51. WRITE(6,*) '***********************************************'
  52. C
  53. WRITE(6,*) 'BB1',BB1
  54. WRITE(6,*) 'BB2',BB2
  55. WRITE(6,*) 'BB3',BB3
  56. WRITE(6,*) 'BB4',BB4
  57. WRITE(6,*) 'BB5',BB5
  58. WRITE(6,*) 'BB6',BB6
  59. WRITE(6,*) 'BBB',BBB
  60. WRITE(6,*) '***********************************************'
  61. C
  62. WRITE(6,*) 'CC1',CC1
  63. WRITE(6,*) 'CC2',CC2
  64. WRITE(6,*) 'CC3',CC3
  65. WRITE(6,*) 'CC4',CC4
  66. WRITE(6,*) 'CC5',CC5
  67. WRITE(6,*) 'CC6',CC6
  68. WRITE(6,*) 'CC7',CC7
  69. WRITE(6,*) 'CC8',CC8
  70. WRITE(6,*) 'CCC',CCC
  71. WRITE(6,*) '***********************************************'
  72. C
  73. WRITE(6,*) 'DD1',DD1
  74. WRITE(6,*) 'DD2',DD2
  75. WRITE(6,*) 'DD3',DD3
  76. WRITE(6,*) 'DD4',DD4
  77. WRITE(6,*) 'DD5',DD5
  78. WRITE(6,*) 'DDD',DDD
  79. WRITE(6,*) '***********************************************'
  80. C
  81. ENDIF
  82. C
  83. IF(ABS(AAA).LT.RF) AAA=0.D0
  84. IF(ABS(BBB).LT.RF) BBB=0.D0
  85. IF(ABS(CCC).LT.RF) CCC=0.D0
  86. IF(ABS(DDD).LT.RF) DDD=0.D0
  87. C
  88. C***********************************************************************
  89. C******* CALCUL DES RACINES REELLES DE L EQUATION DU 3: DEGRE **********
  90. C***********************************************************************
  91. C
  92. CALL RSEQ3D (AAA,BBB,CCC,DDD,YUNG,X1,X2,X3,KERRE)
  93. IF(KERRE.NE.0) RETURN
  94. C
  95. C***********************************************************************
  96. C************** LA PLUS PETITE VALEUR DE GAMMA POSITIVE ****************
  97. C***********************************************************************
  98. C
  99. IF(ABS(X1).LE.GAMRF) X1=0.D0
  100. IF(ABS(X2).LE.GAMRF) X2=0.D0
  101. IF(ABS(X3).LE.GAMRF) X3=0.D0
  102. IF(X1.LT.0.D0) X1=1.D0
  103. IF(X2.LT.0.D0) X2=1.D0
  104. IF(X3.LT.0.D0) X3=1.D0
  105. GAMA=MIN(X1,X2,X3)
  106. C
  107. RETURN
  108. END
  109.  
  110.  

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