Basic HTML version of Foils prepared
22 February 1998
Foil 44 Data Parallel Pipeline Algorithm Grav -- Part I
From
Fox Presentation Fall 1995 CPS615 Basic Simulation Track for Computational Science --
1998 Enhancements
.
by
Geoffrey C. Fox
1
function Grav(X,M)
2
C accepts positions of particles X and masses of particles M
3
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
4
! 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
Mc=M ! circulating masses
in Table To:
©
Northeast Parallel Architectures Center, Syracuse University, npac@npac.syr.edu
If you have any comments about this server, send e-mail to
webmaster@npac.syr.edu
.
Page produced by
wwwfoil
on Sun Feb 22 1998