double x[DIMENSIONS];
double v[DIMENSIONS];
double F[DIMENSIONS];
- int colour;
} Body;
/**
- * Structure to store an array of bodies, along with the size of the array
+ * Structure to store an array of bodies, along with the size of the array.
+ * The universe is represented in a single System.
* @param N - Size of the array
* @param body - The array of bodies
*/
void Body_Velocity(Body * a); //Compute velocity of body a
void Body_Position(Body * a); //Compute position of body a
-System * System_Init(char * fileName); //Initialise System (array of bodies) from a text file
-
-void System_Step(System * system); //Perform a single computation step for a System
+void System_Init(System * s, char * fileName); //Initialise System (array of bodies) from a text file
+void System_Compute(System * system); //Perform a single computation step for a System of bodies
+extern System universe; // The main array of bodies; global variable.
#endif //_NBODY_H