Parallel Programming - Single threaded version done
[matches/honours.git] / course / semester2 / pprog / assignment1 / nbody.h
index 3723205..0853c2b 100644 (file)
@@ -28,12 +28,12 @@ typedef struct
        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
  */
@@ -49,10 +49,10 @@ void Body_Force(Body * a, System * s); //Compute force on body a due to system o
 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

UCC git Repository :: git.ucc.asn.au