lyap2_kepu_mikk.f 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. c*************************************************************************
  2. c LYAP2_KEPU_MIKK
  3. c*************************************************************************
  4. c Given an s, returns mikkola's c1,c2,c3,c4,c5
  5. c
  6. c Input:
  7. c alpha ==> Twice the binding energy (real scalar)
  8. c s ==> Approx. root of f
  9. c Output:
  10. c c1,c2,c3 ==> c's from p171-172
  11. c (real scalors)
  12. c c4,c5 ==> Mikkola's extra c'c
  13. c (real scalors)
  14. c
  15. c Based on Mikkola's code
  16. c Author: Hal Levison
  17. c Date: 7/11/95
  18. c Last revision:
  19. subroutine lyap2_kepu_mikk(s,alpha,c1,c2,c3,c4,c5)
  20. include '../swift.inc'
  21. c... Inputs:
  22. real*8 alpha,s
  23. c... Outputs:
  24. real*8 c1,c2,c3,c4,c5
  25. c... Internals:
  26. real*8 x,h
  27. real*8 cc6,cc132,cc56,cc30,cc24,cc156,cc90,cc110,cc16
  28. real*8 cc8,cc72,cc42,cc120,cc2,cc3
  29. integer k,i
  30. parameter(cc6=1.d0/6.d0,cc132=1.d0/132.d0,cc56=1.d0/56.d0,
  31. & cc30=1.d0/30d0,cc24=1.d0/24.d0,cc156=1.d0/156.d0,
  32. & cc90=1.d0/90.d0,cc110=1.d0/110.d0,cc16=1.d0/16.d0,
  33. & cc8=1.d0/8.d0,cc72=1.d0/72.d0,cc42=1.d0/42.d0,
  34. & cc120=1.d0/120.d0)
  35. c----
  36. c... Executable code
  37. x=s*s*alpha
  38. c... From Mikkola's code
  39. h=x
  40. do k=0,10
  41. if(abs(h) .ge. 0.1) goto 1
  42. h=0.25d0*h
  43. enddo
  44. 1 continue
  45. c4 = (1.0d0-h*(1.0d0-h*(1.0d0-h*cc90/(1.0d0+h*cc132))*
  46. & cc56)*cc30)*cc24
  47. c5 = (1.0d0-h*(1.0d0-h*(1.0d0-h*cc110/(1.0d0+h*cc156))*
  48. & cc72)*cc42)*cc120
  49. do i=1,k
  50. cc3 = cc6 - h*c5
  51. cc2 = 0.5D0 - h*c4
  52. c5 = (c5 + c4+cc2*cc3)*cc16
  53. c4 = cc3*(2.d0-h*cc3)*cc8
  54. h=4.d0*h
  55. enddo
  56. c3 = cc6 - x*c5
  57. c2 = 0.5d0 - x*c4
  58. c1 = 1.d0 - x*c3
  59. c... End of Mikkola's code
  60. c1=c1*s
  61. c2 = c2*s*s
  62. c3 = c3*s*s*s
  63. c4 = c4*s*s*s*s
  64. c5 = c5*s*s*s*s*s
  65. return
  66. end ! lyap2_kepu_mikk
  67. c-------------------------------------------------------------------