Nbody6
 All Files Functions Variables
stumpf.f
Go to the documentation of this file.
1  SUBROUTINE stumpf(IPAIR,Z)
2 *
3 * Modified Stumpff functions.
4 * ---------------------------
5 *
6 * Developed by Seppo Mikkola 10/1997.
7 * ns is the max order included in z^n.
8 *
9  include 'common6.h'
10  parameter(ns=12)
11  real*8 c(12)
12 *
13 *
14 * Generate Stumpff functions for argument Z (SCOEFF set by START).
15  c(ns)=1-z*scoeff(12)
16  c(ns-1)=1-z*scoeff(11)
17  do i=ns-2,3,-1
18  c(i)=1-z*c(i+2)*scoeff(i)
19  end do
20  c(1) = 1.0
21  c(2) = 1.0
22 *
23 * Copy the five first coefficients (for predictor & corrector).
24  DO 2 i = 1,5
25  sf(i,ipair) = c(i)
26 * SF(I,IPAIR) = 1.0
27  2 CONTINUE
28 *
29 * Generate Stumpff functions for argument 4*Z (only down to c_5).
30  z4 = 4.0d0*z
31  c(ns)=1-z4*scoeff(12)
32  c(ns-1)=1-z4*scoeff(11)
33  do i=ns-2,5,-1
34  c(i)=1-z4*c(i+2)*scoeff(i)
35  end do
36 *
37 * Copy c_5 & c_6 to sixth & seventh location (for time integration).
38  DO 3 i = 6,7
39  sf(i,ipair) = c(i-1)
40 * SF(I,IPAIR) = 1.0
41  3 CONTINUE
42 *
43  RETURN
44 *
45  END