lyap2_drift_tp.f 2.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. c*************************************************************************
  2. c LYAP2_DRIFT_TP.F
  3. c*************************************************************************
  4. c This subroutine loops thorugh the TEST particles and calls the danby routine
  5. c
  6. c INPUT:
  7. c ntp ==> number of test particles (int scalar)
  8. c msun ==> mass of the sun (real scalar)
  9. c xjt,yjt,zjt ==> initial position in jacobi coord
  10. c (real arrays)
  11. c vxjt,vyjt,vzjt ==> initial position in jacobi coord
  12. c (real arrays)
  13. c dxjt,dyjt,dzjt ==> initial separation in position
  14. c (real arrays)
  15. c dvxjt,dvyjt,dvzjt ==> initial separation in velocity
  16. c (real arrays)
  17. c istat ==> status of the test paricles
  18. c (2d integer array)
  19. c istat(i,1) = 0 ==> active: = 1 not
  20. c istat(i,2) = -1 ==> Danby did not work
  21. c dt ==> time step
  22. c OUTPUT:
  23. c xjt,yjt,zjt ==> final position in jacobi coord
  24. c (real arrays)
  25. c vxjt,vyjt,vzjt ==> final position in jacobi coord
  26. c (real arrays)
  27. c dxjt,dyjt,dzjt ==> final separation in position
  28. c (real arrays)
  29. c dvxjt,dvyjt,dvzjt ==> final separation in velocity
  30. c (real arrays)
  31. c
  32. c Comments: based on drift_tp.f
  33. c Authors: Hal Levison
  34. c Date: 7/11/95
  35. c Last revision:
  36. subroutine lyap2_drift_tp(ntp,msun,xjt,yjt,zjt,vxjt,vyjt,
  37. & vzjt,dxjt,dyjt,dzjt,dvxjt,dvyjt,dvzjt,dt,istat)
  38. include '../swift.inc'
  39. c... Inputs Only:
  40. integer ntp
  41. real*8 msun,dt
  42. c... Inputs and Outputs:
  43. integer istat(NTPMAX,NSTAT)
  44. real*8 xjt(ntp),yjt(ntp),zjt(ntp)
  45. real*8 vxjt(ntp),vyjt(ntp),vzjt(ntp)
  46. real*8 dxjt(ntp),dyjt(ntp),dzjt(ntp)
  47. real*8 dvxjt(ntp),dvyjt(ntp),dvzjt(ntp)
  48. c... Internals:
  49. integer j,iflg
  50. c----
  51. c... Executable code
  52. c Take a drift forward dth
  53. do j = 1,ntp
  54. if(istat(j,1).eq.0) then
  55. call lyap2_drift_one(msun,xjt(j),yjt(j),zjt(j),
  56. & vxjt(j),vyjt(j),vzjt(j),dxjt(j),dyjt(j),dzjt(j),
  57. & dvxjt(j),dvyjt(j),dvzjt(j),dt,iflg)
  58. if(iflg.ne.0) then
  59. istat(j,1) = 1
  60. istat(j,2) = -1
  61. endif
  62. endif
  63. enddo
  64. return
  65. end
  66. c--------------------------------------------------------------------------