Basic HTML version of Foils prepared 14 October 1997
Foil 40 Data Parallel Pipeline Algorithm Grav -- Part I
From Fox Presentation Fall 1995 CPS615 Basic Simulation Track for Computational Science -- Fall Semester 95/96/97. byNancy McCracken and Geoffrey C. Fox
function Grav(X,M)
C accepts positions of particles X and masses of particles M
C returns accelerations in Grav
integer, parameter :: N =number of particles
real, parameter :: G = gravitational constant
real, dimension (1:3, 1:N) :: X,M,Grav
real, dimension (1:3,1:N) :: A, Xc, Mc, Ac, D, R
integer k
! A is fixed accelerations - X and M are used for fixed positions and masses
A=0.0
Ac=0.0 ! circulating accelerations
Xc=X ! circulating positions
M=G*M ! precalculate mass * gravitational constant