6 * @author Sam Moore (205030628)
7 * @purpose N-Body simulator: declarations of simulation related parameters
10 #define SINGLE_THREADED
12 #define M_PI 3.14159265358979323846264338327950288 /* pi */
16 #define square(x) ((x)*(x))
20 * Structure to represent a single Body
21 * @param mass - Mass of the body
22 * @param x - Position vector (array)
23 * @param v - Velocity vector (array)
24 * @param F - Net force vector (array)
37 * Structure to store an array of bodies, along with the size of the array.
38 * The universe is represented in a single System.
39 * @param N - Size of the array
40 * @param body - The array of bodies
49 void Body_Print(Body * a); //Print body a
50 void Body_Force(Body * a, System * s); //Compute force on body a due to system of bodies s
51 void Body_Velocity(Body * a); //Compute velocity of body a
52 void Body_Position(Body * a); //Compute position of body a
54 void System_Init(System * s, char * fileName); //Initialise System (array of bodies) from a text file
56 void System_Compute(System * system); //Perform a single computation step for a System of bodies
58 void Universe_Cleanup();
61 extern System universe; // The main array of bodies; global variable.