HTML version of Scripted Foils prepared 12 November 1996

Foil 11 Pipeline Algorithm Grav -- Part I

From CPS615-End of N-Body Discussion and Beginning of Numerical Integration Delivered Lectures of CPS615 Basic Simulation Track for Computational Science -- 15 October 96. by Geoffrey C. Fox *
Secs 84.9
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

Table Font Size


© 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 Fri Aug 15 1997