tu4_vkickb.f 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. c*************************************************************************
  2. c TU4_VKICKB.F
  3. c*************************************************************************
  4. c VKICKB gives a 'kick' to the bary. velocities for use in the symplectic
  5. c code based on Ham. of the form T(p) + V(x).
  6. c
  7. c Input:
  8. c nbod ==> number of massive bodies (int scalar)
  9. c vxb,vyb,vzb ==> initial velocity in beri coord
  10. c (real arrays)
  11. c axb,ayb,azb ==> accel in beri coord (real arrays)
  12. c dt ==> time step
  13. c Output:
  14. c vxb,vyb,vzb ==> final velocity in beri coord
  15. c (real arrays)
  16. c
  17. c Remarks: Based on Martin's NB4M routines
  18. c Authors: Martin Duncan
  19. c Date: 3/8/93
  20. c Last revision:
  21. subroutine tu4_vkickb(nbod,vxb,vyb,vzb,axb,ayb,azb,dt)
  22. include '../swift.inc'
  23. c... Inputs Only:
  24. integer nbod
  25. real*8 axb(nbod),ayb(nbod),azb(nbod),dt
  26. c... Inputs and Outputs:
  27. real*8 vxb(nbod),vyb(nbod),vzb(nbod)
  28. c... Internals
  29. integer i
  30. c---
  31. c... Executable code
  32. do i=1,nbod
  33. vxb(i) = vxb(i) + axb(i)*dt
  34. vyb(i) = vyb(i) + ayb(i)*dt
  35. vzb(i) = vzb(i) + azb(i)*dt
  36. enddo
  37. return
  38. end ! tu4_vkickb
  39. c____________________________________________________________________________