Nbody6
 All Files Functions Variables
vector.f
Go to the documentation of this file.
1  SUBROUTINE vector(Q,P,W)
2 *
3 *
4 * KS matrix of Q times P.
5 * -----------------------
6 *
7  IMPLICIT REAL*8 (a-h,o-z)
8  REAL*8 q(4),p(4),w(4)
9 *
10 *
11 * Evaluate W = L(Q)P; the KS matrix of Q times P.
12  w(1)=(+q(1)*p(1)+q(2)*p(2)+q(3)*p(3)+q(4)*p(4))
13  w(2)=(-q(2)*p(1)+q(1)*p(2)+q(4)*p(3)-q(3)*p(4))
14  w(3)=(-q(3)*p(1)-q(4)*p(2)+q(1)*p(3)+q(2)*p(4))
15  w(4)=(+q(4)*p(1)-q(3)*p(2)+q(2)*p(3)-q(1)*p(4))
16 *
17  RETURN
18  END