Nbody6
Main Page
Files
File List
File Members
All
Files
Functions
Variables
transx.f
Go to the documentation of this file.
1
SUBROUTINE
transx
2
*
3
*
4
* Transformations from KS to chain variables.
5
* ---------------------------------------------
6
*
7
include
'commonc.h'
8
include
'common2.h'
9
REAL*8
q0(3)
10
*
11
*
12
* Transform to chain coordinates.
13
DO
i=1,n-1
14
l1=3*(i-1)+1
15
ks1=4*(i-1)+1
16
CALL
ksphys
(q(ks1),p(ks1),xc(l1),wc(l1))
17
END DO
18
*
19
* Obtain physical variables from chain quantities.
20
l=3*(n-2)
21
DO
k=1,3
22
pi(k)=-wc(k)
23
pi(l+k+3)=wc(l+k)
24
END DO
25
DO
i=2,n-1
26
l=3*(i-1)
27
DO
k=1,3
28
pi(l+k)=wc(l+k-3)-wc(l+k)
29
END DO
30
END DO
31
*
32
DO
k=1,3
33
xi(k)=0.0
34
q0(k)=0.0
35
END DO
36
*
37
DO
i=1,n-1
38
l=3*(i-1)
39
DO
k=1,3
40
xi(l+3+k)=xi(l+k)+xc(l+k)
41
END DO
42
END DO
43
*
44
DO
i=1,n
45
l=3*(i-1)
46
DO
k=1,3
47
q0(k)=q0(k)+xi(l+k)*mc(i)/mass
48
END DO
49
END DO
50
*
51
* Rearrange according to INAME(I) and add CM (if required).
52
DO
i=1,n
53
l=3*(i-1)
54
lf=3*(iname(i)-1)
55
DO
k=1,3
56
x(lf+k)=xi(l+k)-q0(k)
57
* & +CMX(K)
58
v(lf+k)=pi(l+k)/mc(i)
59
* & +CMV(K)
60
END DO
61
END DO
62
*
63
RETURN
64
END
Nbody6
Chain
transx.f
Generated on Sat Nov 30 2013 19:04:36 for Nbody6 by
1.8.2