Nbody6
 All Files Functions Variables
tstep.f
Go to the documentation of this file.
1  REAL*8 FUNCTION tstep(F,FDOT,F2DOT,F3DOT,ETA)
2 *
3 *
4 * General time-step criterion.
5 * ----------------------------
6 *
7  IMPLICIT REAL*8 (a-h,o-z)
8  REAL*8 f(3),fdot(3),f2dot(3),f3dot(3)
9 *
10 * Obtain new integration step using composite expression.
11 * STEP = (ETA*(F*F2DOT + FDOT**2)/(FDOT*F3DOT + F2DOT**2))**0.5.
12 *
13  f2 = f(1)**2 + f(2)**2 + f(3)**2
14  fdot2 = fdot(1)**2 + fdot(2)**2 + fdot(3)**2
15  f2dot2 = f2dot(1)**2 + f2dot(2)**2 + f2dot(3)**2
16  f3dot2 = f3dot(1)**2 + f3dot(2)**2 + f3dot(3)**2
17 *
18  tstep = (sqrt(f2*f2dot2) + fdot2)/(sqrt(fdot2*f3dot2) + f2dot2)
19  tstep = sqrt(eta*tstep)
20 *
21  RETURN
22 *
23  END