Télécharger cubrot.eso

Retour à la liste

Numérotation des lignes :

cubrot
  1. C CUBROT SOURCE CHAT 07/10/22 21:15:36 5921
  2. SUBROUTINE CUBROT(X,RR)
  3. implicit real*8(A-H,O-Z)
  4. implicit integer (I-N)
  5.  
  6.  
  7. * SUBROUTINE CUBEROT(X,RR)
  8. *
  9. *
  10. * IMPLICIT NONE
  11. *
  12. *
  13. * --- VARIABLES GLOBALES
  14. *
  15. * REAL *8 X(24)
  16. *
  17. * REAL *8 RR(3,3)
  18. dimension X(24),RR(3,3)
  19. *
  20. *
  21. * --- VARIABLES LOCALES
  22. *
  23. * REAL *8 AUX,AA
  24. *
  25. *
  26. DIMENSION VB(8,3)
  27. DATA VB/-1.D0, 1.D0, 1.D0,-1.D0,-1.D0, 1.D0, 1.D0,-1.D0,
  28. & -1.D0,-1.D0, 1.D0, 1.D0,-1.D0,-1.D0, 1.D0, 1.D0,
  29. & -1.D0,-1.D0,-1.D0,-1.D0, 1.D0, 1.D0, 1.D0, 1.D0/
  30. *
  31. RR(1,1)= - X(1) + X(4) + X(7) - X(10)
  32. & - X(13) + X(16) + X(19) - X(22)
  33. RR(1,2)= - X(2) + X(5) + X(8) - X(11)
  34. & - X(14) + X(17) + X(20) - X(23)
  35. RR(1,3)= - X(3) + X(6) + X(9) - X(12)
  36. & - X(15) + X(18) + X(21) - X(24)
  37. *
  38. RR(2,1)= - X(1) - X(4) + X(7) + X(10)
  39. & - X(13) - X(16) + X(19) + X(22)
  40. RR(2,2)= - X(2) - X(5) + X(8) + X(11)
  41. & - X(14) - X(17) + X(20) + X(23)
  42. RR(2,3)= - X(3) - X(6) + X(9) + X(12)
  43. & - X(15) - X(18) + X(21) + X(24)
  44. *
  45. AUX= RR(1,1)*RR(1,1)+RR(1,2)*RR(1,2)+RR(1,3)*RR(1,3)
  46. AA = RR(1,1)*RR(2,1)+RR(1,2)*RR(2,2)+RR(1,3)*RR(2,3)
  47. AA = -(AA/AUX)
  48. *
  49. RR(2,1)= RR(2,1) + AA*RR(1,1)
  50. RR(2,2)= RR(2,2) + AA*RR(1,2)
  51. RR(2,3)= RR(2,3) + AA*RR(1,3)
  52. *
  53. RR(3,1)= RR(1,2)*RR(2,3) - RR(1,3)*RR(2,2)
  54. RR(3,2)= RR(1,3)*RR(2,1) - RR(1,1)*RR(2,3)
  55. RR(3,3)= RR(1,1)*RR(2,2) - RR(1,2)*RR(2,1)
  56. *
  57. AUX = SQRT(AUX)
  58. RR(1,1)= RR(1,1)/AUX
  59. RR(1,2)= RR(1,2)/AUX
  60. RR(1,3)= RR(1,3)/AUX
  61. *
  62. AUX = SQRT(RR(2,1)*RR(2,1)+RR(2,2)*RR(2,2)+RR(2,3)*RR(2,3))
  63. RR(2,1)= RR(2,1)/AUX
  64. RR(2,2)= RR(2,2)/AUX
  65. RR(2,3)= RR(2,3)/AUX
  66. *
  67. AUX = SQRT(RR(3,1)*RR(3,1)+RR(3,2)*RR(3,2)+RR(3,3)*RR(3,3))
  68. RR(3,1)= RR(3,1)/AUX
  69. RR(3,2)= RR(3,2)/AUX
  70. RR(3,3)= RR(3,3)/AUX
  71. *
  72. *
  73. RETURN
  74. END
  75.  
  76.  
  77.  

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