lyap2_drift_one.f 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. c*************************************************************************
  2. c LYAP2_DRIFT_ONE.F
  3. c*************************************************************************
  4. c This subroutine does the danby-type drift for one particle, using
  5. c appropriate vbles and redoing a drift if the accuracy is too poor
  6. c (as flagged by the integer iflg). Also integrates the difference equations.
  7. c
  8. c Input:
  9. c nbod ==> number of massive bodies (int scalar)
  10. c mu ==> mass of central body (real scalar)
  11. c x,y,z ==> initial position in jacobi coord
  12. c (real scalar)
  13. c vx,vy,vz ==> initial position in jacobi coord
  14. c (real scalar)
  15. c dx,dy,dz ==> initial difference in position
  16. c (real scalar)
  17. c dvx,dvy,dvz ==> initial difference in velocity
  18. c (real scalar)
  19. c dt ==> time step
  20. c Output:
  21. c x,y,z ==> final position in jacobi coord
  22. c (real scalars)
  23. c vx,vy,vz ==> final position in jacobi coord
  24. c (real scalars)
  25. c dx,dy,dz ==> final difference in position
  26. c (real scalar)
  27. c dvx,dvy,dvz ==> final difference in velocity
  28. c (real scalar)
  29. c iflg ==> integer (zero for successful step)
  30. c
  31. c Comment: Based on drift_one.f
  32. c Authors: Hal Levison
  33. c Date: 7/11/95
  34. c Last revision:
  35. c
  36. subroutine lyap2_drift_one(mu,x,y,z,vx,vy,vz,dx,dy,dz,
  37. & dvx,dvy,dvz,dt,iflg)
  38. include '../swift.inc'
  39. c... Inputs Only:
  40. real*8 mu,dt
  41. c... Inputs and Outputs:
  42. real*8 x,y,z
  43. real*8 vx,vy,vz
  44. real*8 dx,dy,dz
  45. real*8 dvx,dvy,dvz
  46. c... Output
  47. integer iflg
  48. c... Internals:
  49. integer i
  50. real*8 dttmp
  51. c----
  52. c... Executable code
  53. call lyap2_drift_dan(mu,x,y,z,vx,vy,vz,dx,dy,dz,
  54. & dvx,dvy,dvz,dt,iflg)
  55. if(iflg .ne. 0) then
  56. do i = 1,10
  57. dttmp = dt/10.d0
  58. call lyap2_drift_dan(mu,x,y,z,vx,vy,vz,dx,dy,dz,
  59. & dvx,dvy,dvz,dttmp,iflg)
  60. if(iflg .ne. 0) return
  61. enddo
  62. endif
  63. return
  64. end ! lyap2_drift_one
  65. c-------------------------------------------------------------------