From: Sam Moore Date: Thu, 6 Sep 2012 10:54:17 +0000 (+0800) Subject: Parallel Programming - Single threaded version done X-Git-Url: https://git.ucc.asn.au/?a=commitdiff_plain;h=8050cacaa489292c82977b3d87971eaf9ca3c39b;p=matches%2Fhonours.git Parallel Programming - Single threaded version done Graphics and simulation code seperated as much as possible. Got rid of inconsistancies in original style, made it as similar to my own as possible without insane over engineering. Only minor amount of over engineering done! --- diff --git a/course/semester2/pprog/assignment1/Makefile b/course/semester2/pprog/assignment1/Makefile index b1a9b132..c1646243 100644 --- a/course/semester2/pprog/assignment1/Makefile +++ b/course/semester2/pprog/assignment1/Makefile @@ -1,20 +1,23 @@ #Makefile for nbody program -CXX = gcc --std=c99 -Wall -pedantic -g -lm -lGL -lglut -lGLU -lpthread -fopenmp +CXX = gcc +LIBRARIES = -lm -lGL -lglut -lGLU -lpthread +FLAGS = --std=c99 -Wall -pedantic -g +PREPROCESSOR_FLAGS = -fopenmp LINK_OBJ = main.o nbody.o graphics.o BIN = nbody -$(BIN) : $(OBJ) - $(CXX) -o $(BIN) $(OBJ) +$(BIN) : $(LINK_OBJ) + $(CXX) -o $(BIN) $(LINK_OBJ) $(LIBRARIES) %.o : %.c - $(CXX) -c $< + $(CXX) $(FLAGS) $(PREPROCESSOR_FLAGS) -c $< clean : - $(RM) $(BIN) $(OBJ) $(LINKOBJ) + $(RM) $(BIN) $(OBJ) $(LINK_OBJ) clean_full: #cleans up all backup files - $(RM) $(BIN) $(OBJ) $(LINKOBJ) + $(RM) $(BIN) $(OBJ) $(LINK_OBJ) $(RM) *.*~ $(RM) *~ diff --git a/course/semester2/pprog/assignment1/fields/10 b/course/semester2/pprog/assignment1/fields/10 new file mode 100644 index 00000000..6ef79370 --- /dev/null +++ b/course/semester2/pprog/assignment1/fields/10 @@ -0,0 +1,11 @@ +10 +1e11 0 0 0 0 0 0 +1e7 -7.000000 73.000000 0.000000 0.800000 0.076712 0.003000 +1e7 -23.000000 -40.000000 0.200000 0.400000 -0.230000 0.003000 +1e7 -27.000000 40.000000 -0.300000 0.800000 0.540000 0.002000 +1e7 -60.000000 99.000000 -0.600000 0.400000 0.242424 0.001000 +1e7 -12.000000 -10.000000 -0.900000 0.800000 -0.960000 0.001000 +1e7 67.000000 93.000000 -0.500000 0.600000 -0.432258 0.001000 +1e7 -94.000000 -1.000000 0.800000 0.600000 -56.400000 0.001000 +1e7 24.000000 -30.000000 0.200000 0.800000 0.640000 0.004000 +1e7 -1.000000 77.000000 -0.800000 0.600000 0.007792 0.001000 diff --git a/course/semester2/pprog/assignment1/fields/100 b/course/semester2/pprog/assignment1/fields/100 new file mode 100644 index 00000000..72a4325a --- /dev/null +++ b/course/semester2/pprog/assignment1/fields/100 @@ -0,0 +1,101 @@ +100 +1e11 0 0 0 0 0 0 +1e7 -7.000000 73.000000 0.000000 0.800000 0.076712 0.003000 +1e7 -23.000000 -40.000000 0.200000 0.400000 -0.230000 0.003000 +1e7 -27.000000 40.000000 -0.300000 0.800000 0.540000 0.002000 +1e7 -60.000000 99.000000 -0.600000 0.400000 0.242424 0.001000 +1e7 -12.000000 -10.000000 -0.900000 0.800000 -0.960000 0.001000 +1e7 67.000000 93.000000 -0.500000 0.600000 -0.432258 0.001000 +1e7 -94.000000 -1.000000 0.800000 0.600000 -56.400000 0.001000 +1e7 24.000000 -30.000000 0.200000 0.800000 0.640000 0.004000 +1e7 -1.000000 77.000000 -0.800000 0.600000 0.007792 0.001000 +1e7 -35.000000 65.000000 0.300000 0.200000 0.107692 0.004000 +1e7 15.000000 -29.000000 -0.700000 0.200000 0.103448 0.004000 +1e7 51.000000 -88.000000 0.500000 0.400000 0.231818 0.001000 +1e7 -16.000000 38.000000 -0.100000 0.200000 0.084211 0.003000 +1e7 37.000000 -77.000000 0.400000 0.800000 0.384416 0.001000 +1e7 -45.000000 35.000000 -0.200000 0.600000 0.771429 0.002000 +1e7 -60.000000 94.000000 0.500000 0.600000 0.382979 0.001000 +1e7 6.000000 -42.000000 0.200000 0.400000 0.057143 0.001000 +1e7 95.000000 -71.000000 -0.000000 0.600000 0.802817 0.002000 +1e7 16.000000 -40.000000 0.500000 0.400000 0.160000 0.003000 +1e7 -95.000000 -54.000000 0.900000 0.200000 -0.351852 0.001000 +1e7 23.000000 13.000000 0.800000 0.200000 -0.353846 0.004000 +1e7 66.000000 26.000000 0.300000 0.800000 -2.030769 0.001000 +1e7 -50.000000 -23.000000 -0.500000 0.400000 -0.869565 0.004000 +1e7 -47.000000 -96.000000 0.300000 0.800000 -0.391667 0.003000 +1e7 -35.000000 25.000000 -0.200000 0.800000 1.120000 0.002000 +1e7 -44.000000 18.000000 -0.200000 0.200000 0.488889 0.003000 +1e7 -69.000000 -53.000000 0.500000 0.400000 -0.520755 0.001000 +1e7 -8.000000 -61.000000 0.500000 0.200000 -0.026230 0.001000 +1e7 -67.000000 -74.000000 -0.600000 0.400000 -0.362162 0.001000 +1e7 94.000000 -55.000000 -0.700000 0.600000 1.025455 0.004000 +1e7 -80.000000 55.000000 0.300000 0.200000 0.290909 0.003000 +1e7 -49.000000 44.000000 -0.800000 0.200000 0.222727 0.004000 +1e7 -3.000000 31.000000 -0.900000 0.800000 0.077419 0.001000 +1e7 -29.000000 54.000000 -0.700000 0.400000 0.214815 0.001000 +1e7 0.000000 -64.000000 0.800000 0.200000 0.000000 0.001000 +1e7 76.000000 -54.000000 -0.400000 0.600000 0.844444 0.001000 +1e7 -78.000000 -9.000000 -0.300000 0.400000 -3.466667 0.002000 +1e7 73.000000 5.000000 0.300000 0.200000 -2.920000 0.001000 +1e7 0.000000 -70.000000 0.600000 0.200000 0.000000 0.003000 +1e7 57.000000 78.000000 -0.700000 0.600000 -0.438462 0.004000 +1e7 -19.000000 -33.000000 0.000000 0.600000 -0.345455 0.002000 +1e7 31.000000 -89.000000 0.700000 0.600000 0.208989 0.001000 +1e7 54.000000 -15.000000 0.000000 0.200000 0.720000 0.001000 +1e7 7.000000 1.000000 -0.500000 0.600000 -4.200000 0.004000 +1e7 93.000000 54.000000 -0.700000 0.800000 -1.377778 0.001000 +1e7 63.000000 -17.000000 -0.900000 0.400000 1.482353 0.004000 +1e7 -95.000000 -73.000000 -0.800000 0.600000 -0.780822 0.004000 +1e7 6.000000 24.000000 -0.300000 0.400000 -0.100000 0.001000 +1e7 -50.000000 -80.000000 0.000000 0.600000 -0.375000 0.003000 +1e7 3.000000 50.000000 -0.000000 0.400000 -0.024000 0.004000 +1e7 49.000000 -49.000000 -0.000000 0.600000 0.600000 0.001000 +1e7 -40.000000 -50.000000 0.900000 0.200000 -0.160000 0.004000 +1e7 -30.000000 76.000000 0.400000 0.200000 0.078947 0.001000 +1e7 64.000000 -98.000000 -0.000000 0.200000 0.130612 0.001000 +1e7 5.000000 18.000000 -0.900000 0.200000 -0.055556 0.001000 +1e7 -12.000000 -88.000000 0.800000 0.800000 -0.109091 0.001000 +1e7 -57.000000 90.000000 -0.000000 0.600000 0.380000 0.001000 +1e7 60.000000 3.000000 -0.700000 0.200000 -4.000000 0.001000 +1e7 -99.000000 -71.000000 -0.400000 0.200000 -0.278873 0.002000 +1e7 48.000000 15.000000 -0.500000 0.200000 -0.640000 0.001000 +1e7 39.000000 -5.000000 -0.300000 0.200000 1.560000 0.001000 +1e7 4.000000 98.000000 0.000000 0.200000 -0.008163 0.002000 +1e7 -52.000000 -98.000000 0.100000 0.200000 -0.106122 0.001000 +1e7 -28.000000 -61.000000 0.000000 0.600000 -0.275410 0.003000 +1e7 27.000000 -11.000000 -0.400000 0.400000 0.981818 0.002000 +1e7 -95.000000 42.000000 -0.600000 0.800000 1.809524 0.001000 +1e7 -97.000000 3.000000 0.800000 0.200000 6.466667 0.001000 +1e7 10.000000 -5.000000 0.100000 0.200000 0.400000 0.004000 +1e7 -65.000000 36.000000 0.500000 0.400000 0.722222 0.004000 +1e7 76.000000 76.000000 0.700000 0.800000 -0.800000 0.001000 +1e7 10.000000 11.000000 0.800000 0.800000 -0.727273 0.001000 +1e7 -67.000000 18.000000 0.500000 0.600000 2.233333 0.004000 +1e7 -34.000000 40.000000 0.000000 0.200000 0.170000 0.003000 +1e7 -48.000000 11.000000 0.400000 0.400000 1.745455 0.001000 +1e7 45.000000 15.000000 -0.000000 0.400000 -1.200000 0.004000 +1e7 -47.000000 -93.000000 0.900000 0.800000 -0.404301 0.001000 +1e7 -25.000000 -58.000000 -0.000000 0.200000 -0.086207 0.002000 +1e7 46.000000 43.000000 -0.600000 0.800000 -0.855814 0.001000 +1e7 47.000000 -59.000000 -0.500000 0.400000 0.318644 0.004000 +1e7 89.000000 -34.000000 -0.900000 0.200000 0.523529 0.001000 +1e7 -61.000000 -19.000000 0.300000 0.600000 -1.926316 0.004000 +1e7 -4.000000 -79.000000 -0.100000 0.800000 -0.040506 0.001000 +1e7 21.000000 6.000000 0.300000 0.400000 -1.400000 0.001000 +1e7 -54.000000 17.000000 -0.900000 0.400000 1.270588 0.002000 +1e7 -79.000000 16.000000 -0.200000 0.800000 3.950000 0.003000 +1e7 -3.000000 61.000000 -0.600000 0.400000 0.019672 0.001000 +1e7 55.000000 -94.000000 0.100000 0.600000 0.351064 0.002000 +1e7 32.000000 91.000000 0.200000 0.200000 -0.070330 0.003000 +1e7 39.000000 99.000000 -0.500000 0.600000 -0.236364 0.002000 +1e7 -86.000000 50.000000 -0.300000 0.200000 0.344000 0.003000 +1e7 -11.000000 92.000000 -0.900000 0.800000 0.095652 0.001000 +1e7 -36.000000 -57.000000 -0.800000 0.200000 -0.126316 0.003000 +1e7 -76.000000 91.000000 0.100000 0.200000 0.167033 0.001000 +1e7 90.000000 64.000000 -0.400000 0.200000 -0.281250 0.002000 +1e7 79.000000 37.000000 -0.100000 0.200000 -0.427027 0.002000 +1e7 32.000000 -54.000000 -0.700000 0.400000 0.237037 0.001000 +1e7 19.000000 -77.000000 0.600000 0.800000 0.197403 0.002000 +1e7 59.000000 90.000000 0.800000 0.800000 -0.524444 0.003000 +1e7 -50.000000 -95.000000 -0.100000 0.200000 -0.105263 0.001000 diff --git a/course/semester2/pprog/assignment1/fields/500 b/course/semester2/pprog/assignment1/fields/500 new file mode 100644 index 00000000..65a13606 --- /dev/null +++ b/course/semester2/pprog/assignment1/fields/500 @@ -0,0 +1,501 @@ +500 +1e11 0 0 0 0 0 0 +1e7 -7.000000 73.000000 0.000000 0.800000 0.076712 0.003000 +1e7 -23.000000 -40.000000 0.200000 0.400000 -0.230000 0.003000 +1e7 -27.000000 40.000000 -0.300000 0.800000 0.540000 0.002000 +1e7 -60.000000 99.000000 -0.600000 0.400000 0.242424 0.001000 +1e7 -12.000000 -10.000000 -0.900000 0.800000 -0.960000 0.001000 +1e7 67.000000 93.000000 -0.500000 0.600000 -0.432258 0.001000 +1e7 -94.000000 -1.000000 0.800000 0.600000 -56.400000 0.001000 +1e7 24.000000 -30.000000 0.200000 0.800000 0.640000 0.004000 +1e7 -1.000000 77.000000 -0.800000 0.600000 0.007792 0.001000 +1e7 -35.000000 65.000000 0.300000 0.200000 0.107692 0.004000 +1e7 15.000000 -29.000000 -0.700000 0.200000 0.103448 0.004000 +1e7 51.000000 -88.000000 0.500000 0.400000 0.231818 0.001000 +1e7 -16.000000 38.000000 -0.100000 0.200000 0.084211 0.003000 +1e7 37.000000 -77.000000 0.400000 0.800000 0.384416 0.001000 +1e7 -45.000000 35.000000 -0.200000 0.600000 0.771429 0.002000 +1e7 -60.000000 94.000000 0.500000 0.600000 0.382979 0.001000 +1e7 6.000000 -42.000000 0.200000 0.400000 0.057143 0.001000 +1e7 95.000000 -71.000000 -0.000000 0.600000 0.802817 0.002000 +1e7 16.000000 -40.000000 0.500000 0.400000 0.160000 0.003000 +1e7 -95.000000 -54.000000 0.900000 0.200000 -0.351852 0.001000 +1e7 23.000000 13.000000 0.800000 0.200000 -0.353846 0.004000 +1e7 66.000000 26.000000 0.300000 0.800000 -2.030769 0.001000 +1e7 -50.000000 -23.000000 -0.500000 0.400000 -0.869565 0.004000 +1e7 -47.000000 -96.000000 0.300000 0.800000 -0.391667 0.003000 +1e7 -35.000000 25.000000 -0.200000 0.800000 1.120000 0.002000 +1e7 -44.000000 18.000000 -0.200000 0.200000 0.488889 0.003000 +1e7 -69.000000 -53.000000 0.500000 0.400000 -0.520755 0.001000 +1e7 -8.000000 -61.000000 0.500000 0.200000 -0.026230 0.001000 +1e7 -67.000000 -74.000000 -0.600000 0.400000 -0.362162 0.001000 +1e7 94.000000 -55.000000 -0.700000 0.600000 1.025455 0.004000 +1e7 -80.000000 55.000000 0.300000 0.200000 0.290909 0.003000 +1e7 -49.000000 44.000000 -0.800000 0.200000 0.222727 0.004000 +1e7 -3.000000 31.000000 -0.900000 0.800000 0.077419 0.001000 +1e7 -29.000000 54.000000 -0.700000 0.400000 0.214815 0.001000 +1e7 0.000000 -64.000000 0.800000 0.200000 0.000000 0.001000 +1e7 76.000000 -54.000000 -0.400000 0.600000 0.844444 0.001000 +1e7 -78.000000 -9.000000 -0.300000 0.400000 -3.466667 0.002000 +1e7 73.000000 5.000000 0.300000 0.200000 -2.920000 0.001000 +1e7 0.000000 -70.000000 0.600000 0.200000 0.000000 0.003000 +1e7 57.000000 78.000000 -0.700000 0.600000 -0.438462 0.004000 +1e7 -19.000000 -33.000000 0.000000 0.600000 -0.345455 0.002000 +1e7 31.000000 -89.000000 0.700000 0.600000 0.208989 0.001000 +1e7 54.000000 -15.000000 0.000000 0.200000 0.720000 0.001000 +1e7 7.000000 1.000000 -0.500000 0.600000 -4.200000 0.004000 +1e7 93.000000 54.000000 -0.700000 0.800000 -1.377778 0.001000 +1e7 63.000000 -17.000000 -0.900000 0.400000 1.482353 0.004000 +1e7 -95.000000 -73.000000 -0.800000 0.600000 -0.780822 0.004000 +1e7 6.000000 24.000000 -0.300000 0.400000 -0.100000 0.001000 +1e7 -50.000000 -80.000000 0.000000 0.600000 -0.375000 0.003000 +1e7 3.000000 50.000000 -0.000000 0.400000 -0.024000 0.004000 +1e7 49.000000 -49.000000 -0.000000 0.600000 0.600000 0.001000 +1e7 -40.000000 -50.000000 0.900000 0.200000 -0.160000 0.004000 +1e7 -30.000000 76.000000 0.400000 0.200000 0.078947 0.001000 +1e7 64.000000 -98.000000 -0.000000 0.200000 0.130612 0.001000 +1e7 5.000000 18.000000 -0.900000 0.200000 -0.055556 0.001000 +1e7 -12.000000 -88.000000 0.800000 0.800000 -0.109091 0.001000 +1e7 -57.000000 90.000000 -0.000000 0.600000 0.380000 0.001000 +1e7 60.000000 3.000000 -0.700000 0.200000 -4.000000 0.001000 +1e7 -99.000000 -71.000000 -0.400000 0.200000 -0.278873 0.002000 +1e7 48.000000 15.000000 -0.500000 0.200000 -0.640000 0.001000 +1e7 39.000000 -5.000000 -0.300000 0.200000 1.560000 0.001000 +1e7 4.000000 98.000000 0.000000 0.200000 -0.008163 0.002000 +1e7 -52.000000 -98.000000 0.100000 0.200000 -0.106122 0.001000 +1e7 -28.000000 -61.000000 0.000000 0.600000 -0.275410 0.003000 +1e7 27.000000 -11.000000 -0.400000 0.400000 0.981818 0.002000 +1e7 -95.000000 42.000000 -0.600000 0.800000 1.809524 0.001000 +1e7 -97.000000 3.000000 0.800000 0.200000 6.466667 0.001000 +1e7 10.000000 -5.000000 0.100000 0.200000 0.400000 0.004000 +1e7 -65.000000 36.000000 0.500000 0.400000 0.722222 0.004000 +1e7 76.000000 76.000000 0.700000 0.800000 -0.800000 0.001000 +1e7 10.000000 11.000000 0.800000 0.800000 -0.727273 0.001000 +1e7 -67.000000 18.000000 0.500000 0.600000 2.233333 0.004000 +1e7 -34.000000 40.000000 0.000000 0.200000 0.170000 0.003000 +1e7 -48.000000 11.000000 0.400000 0.400000 1.745455 0.001000 +1e7 45.000000 15.000000 -0.000000 0.400000 -1.200000 0.004000 +1e7 -47.000000 -93.000000 0.900000 0.800000 -0.404301 0.001000 +1e7 -25.000000 -58.000000 -0.000000 0.200000 -0.086207 0.002000 +1e7 46.000000 43.000000 -0.600000 0.800000 -0.855814 0.001000 +1e7 47.000000 -59.000000 -0.500000 0.400000 0.318644 0.004000 +1e7 89.000000 -34.000000 -0.900000 0.200000 0.523529 0.001000 +1e7 -61.000000 -19.000000 0.300000 0.600000 -1.926316 0.004000 +1e7 -4.000000 -79.000000 -0.100000 0.800000 -0.040506 0.001000 +1e7 21.000000 6.000000 0.300000 0.400000 -1.400000 0.001000 +1e7 -54.000000 17.000000 -0.900000 0.400000 1.270588 0.002000 +1e7 -79.000000 16.000000 -0.200000 0.800000 3.950000 0.003000 +1e7 -3.000000 61.000000 -0.600000 0.400000 0.019672 0.001000 +1e7 55.000000 -94.000000 0.100000 0.600000 0.351064 0.002000 +1e7 32.000000 91.000000 0.200000 0.200000 -0.070330 0.003000 +1e7 39.000000 99.000000 -0.500000 0.600000 -0.236364 0.002000 +1e7 -86.000000 50.000000 -0.300000 0.200000 0.344000 0.003000 +1e7 -11.000000 92.000000 -0.900000 0.800000 0.095652 0.001000 +1e7 -36.000000 -57.000000 -0.800000 0.200000 -0.126316 0.003000 +1e7 -76.000000 91.000000 0.100000 0.200000 0.167033 0.001000 +1e7 90.000000 64.000000 -0.400000 0.200000 -0.281250 0.002000 +1e7 79.000000 37.000000 -0.100000 0.200000 -0.427027 0.002000 +1e7 32.000000 -54.000000 -0.700000 0.400000 0.237037 0.001000 +1e7 19.000000 -77.000000 0.600000 0.800000 0.197403 0.002000 +1e7 59.000000 90.000000 0.800000 0.800000 -0.524444 0.003000 +1e7 -50.000000 -95.000000 -0.100000 0.200000 -0.105263 0.001000 +1e7 57.000000 -28.000000 -0.300000 0.800000 1.628571 0.001000 +1e7 -3.000000 75.000000 -0.000000 0.400000 0.016000 0.004000 +1e7 -63.000000 89.000000 -0.500000 0.800000 0.566292 0.004000 +1e7 63.000000 52.000000 0.600000 0.200000 -0.242308 0.001000 +1e7 50.000000 -41.000000 -0.600000 0.200000 0.243902 0.004000 +1e7 -28.000000 -48.000000 -0.300000 0.800000 -0.466667 0.003000 +1e7 -19.000000 20.000000 0.900000 0.200000 0.190000 0.001000 +1e7 13.000000 38.000000 0.400000 0.600000 -0.205263 0.001000 +1e7 80.000000 -96.000000 -0.000000 0.600000 0.500000 0.003000 +1e7 -52.000000 24.000000 0.000000 0.400000 0.866667 0.003000 +1e7 98.000000 45.000000 0.900000 0.800000 -1.742222 0.003000 +1e7 -90.000000 -43.000000 0.500000 0.200000 -0.418605 0.001000 +1e7 51.000000 -51.000000 0.300000 0.400000 0.400000 0.004000 +1e7 98.000000 -37.000000 0.800000 0.400000 1.059459 0.001000 +1e7 -60.000000 -40.000000 0.600000 0.400000 -0.600000 0.003000 +1e7 69.000000 23.000000 -0.300000 0.200000 -0.600000 0.001000 +1e7 78.000000 -94.000000 -0.600000 0.200000 0.165957 0.001000 +1e7 -44.000000 76.000000 0.200000 0.800000 0.463158 0.004000 +1e7 19.000000 71.000000 -0.300000 0.800000 -0.214085 0.003000 +1e7 54.000000 81.000000 -0.800000 0.800000 -0.533333 0.004000 +1e7 79.000000 -61.000000 -0.300000 0.600000 0.777049 0.004000 +1e7 80.000000 83.000000 -0.600000 0.400000 -0.385542 0.004000 +1e7 39.000000 -51.000000 -0.600000 0.200000 0.152941 0.004000 +1e7 -27.000000 -81.000000 0.600000 0.200000 -0.066667 0.001000 +1e7 72.000000 98.000000 -0.700000 0.800000 -0.587755 0.001000 +1e7 -90.000000 -12.000000 -0.200000 0.200000 -1.500000 0.001000 +1e7 -21.000000 28.000000 -0.000000 0.800000 0.600000 0.002000 +1e7 94.000000 -32.000000 -0.700000 0.400000 1.175000 0.002000 +1e7 -83.000000 53.000000 0.100000 0.600000 0.939623 0.001000 +1e7 0.000000 20.000000 -0.900000 0.800000 -0.000000 0.001000 +1e7 70.000000 99.000000 0.800000 0.400000 -0.282828 0.003000 +1e7 0.000000 -40.000000 -0.500000 0.200000 0.000000 0.004000 +1e7 -78.000000 61.000000 0.800000 0.200000 0.255738 0.001000 +1e7 70.000000 51.000000 -0.900000 0.800000 -1.098039 0.001000 +1e7 -72.000000 -25.000000 -0.000000 0.600000 -1.728000 0.001000 +1e7 69.000000 94.000000 0.200000 0.800000 -0.587234 0.001000 +1e7 19.000000 -62.000000 0.500000 0.800000 0.245161 0.001000 +1e7 22.000000 93.000000 -0.200000 0.200000 -0.047312 0.003000 +1e7 23.000000 -39.000000 0.300000 0.600000 0.353846 0.001000 +1e7 -71.000000 55.000000 0.900000 0.200000 0.258182 0.002000 +1e7 12.000000 47.000000 0.100000 0.200000 -0.051064 0.003000 +1e7 -36.000000 -7.000000 -0.600000 0.400000 -2.057143 0.001000 +1e7 -40.000000 -57.000000 -0.500000 0.200000 -0.140351 0.003000 +1e7 94.000000 -38.000000 0.500000 0.400000 0.989474 0.003000 +1e7 62.000000 36.000000 0.300000 0.800000 -1.377778 0.002000 +1e7 19.000000 -28.000000 -0.200000 0.200000 0.135714 0.002000 +1e7 72.000000 1.000000 0.800000 0.200000 -14.400000 0.003000 +1e7 -0.000000 -92.000000 0.300000 0.200000 -0.000000 0.004000 +1e7 21.000000 -13.000000 -0.100000 0.800000 1.292308 0.001000 +1e7 56.000000 54.000000 -0.400000 0.400000 -0.414815 0.001000 +1e7 -97.000000 60.000000 -0.100000 0.800000 1.293333 0.003000 +1e7 77.000000 -84.000000 -0.000000 0.800000 0.733333 0.004000 +1e7 9.000000 -64.000000 -0.200000 0.800000 0.112500 0.002000 +1e7 83.000000 59.000000 -0.300000 0.200000 -0.281356 0.001000 +1e7 -53.000000 -96.000000 0.100000 0.200000 -0.110417 0.003000 +1e7 20.000000 87.000000 -0.200000 0.200000 -0.045977 0.004000 +1e7 51.000000 45.000000 0.400000 0.200000 -0.226667 0.002000 +1e7 -26.000000 -44.000000 -0.900000 0.800000 -0.472727 0.003000 +1e7 48.000000 -17.000000 0.800000 0.800000 2.258824 0.001000 +1e7 68.000000 -99.000000 0.900000 0.600000 0.412121 0.001000 +1e7 19.000000 37.000000 -0.800000 0.600000 -0.308108 0.003000 +1e7 20.000000 -61.000000 -0.800000 0.200000 0.065574 0.001000 +1e7 78.000000 -63.000000 0.600000 0.600000 0.742857 0.004000 +1e7 -19.000000 77.000000 0.300000 0.600000 0.148052 0.001000 +1e7 -71.000000 4.000000 -0.200000 0.200000 3.550000 0.001000 +1e7 68.000000 10.000000 0.000000 0.200000 -1.360000 0.001000 +1e7 -79.000000 -27.000000 -0.300000 0.200000 -0.585185 0.004000 +1e7 -83.000000 -84.000000 -0.600000 0.800000 -0.790476 0.003000 +1e7 -86.000000 -24.000000 0.400000 0.400000 -1.433333 0.001000 +1e7 10.000000 5.000000 -0.200000 0.200000 -0.400000 0.001000 +1e7 6.000000 60.000000 0.300000 0.200000 -0.020000 0.001000 +1e7 -85.000000 84.000000 0.000000 0.200000 0.202381 0.001000 +1e7 99.000000 -28.000000 0.700000 0.400000 1.414286 0.004000 +1e7 -78.000000 89.000000 -0.500000 0.800000 0.701124 0.001000 +1e7 21.000000 14.000000 -0.600000 0.200000 -0.300000 0.004000 +1e7 1.000000 -44.000000 0.800000 0.200000 0.004545 0.001000 +1e7 20.000000 -24.000000 -0.800000 0.400000 0.333333 0.001000 +1e7 14.000000 -99.000000 0.300000 0.800000 0.113131 0.004000 +1e7 21.000000 36.000000 -0.200000 0.600000 -0.350000 0.001000 +1e7 -88.000000 -38.000000 -0.100000 0.200000 -0.463158 0.002000 +1e7 -92.000000 75.000000 -0.300000 0.200000 0.245333 0.001000 +1e7 -47.000000 32.000000 -0.800000 0.800000 1.175000 0.001000 +1e7 -54.000000 -37.000000 -0.100000 0.800000 -1.167568 0.004000 +1e7 -16.000000 38.000000 0.300000 0.200000 0.084211 0.001000 +1e7 24.000000 -63.000000 -0.200000 0.400000 0.152381 0.001000 +1e7 36.000000 8.000000 0.100000 0.200000 -0.900000 0.004000 +1e7 12.000000 -37.000000 -0.500000 0.200000 0.064865 0.001000 +1e7 -8.000000 -39.000000 0.900000 0.800000 -0.164103 0.001000 +1e7 -15.000000 22.000000 -0.000000 0.200000 0.136364 0.001000 +1e7 25.000000 -94.000000 -0.200000 0.200000 0.053191 0.001000 +1e7 -34.000000 -81.000000 -0.800000 0.400000 -0.167901 0.001000 +1e7 -51.000000 42.000000 -0.500000 0.400000 0.485714 0.003000 +1e7 -22.000000 -41.000000 0.900000 0.200000 -0.107317 0.004000 +1e7 55.000000 64.000000 -0.300000 0.600000 -0.515625 0.004000 +1e7 -55.000000 81.000000 -0.400000 0.200000 0.135802 0.001000 +1e7 -64.000000 -22.000000 0.300000 0.600000 -1.745455 0.004000 +1e7 -88.000000 39.000000 0.300000 0.800000 1.805128 0.002000 +1e7 17.000000 -82.000000 -0.900000 0.200000 0.041463 0.004000 +1e7 -10.000000 15.000000 -0.200000 0.200000 0.133333 0.002000 +1e7 -8.000000 -99.000000 0.300000 0.200000 -0.016162 0.001000 +1e7 -2.000000 -53.000000 0.600000 0.800000 -0.030189 0.002000 +1e7 -3.000000 -29.000000 0.200000 0.400000 -0.041379 0.004000 +1e7 -26.000000 -55.000000 0.200000 0.400000 -0.189091 0.004000 +1e7 -86.000000 79.000000 -0.000000 0.200000 0.217722 0.003000 +1e7 -27.000000 -98.000000 -0.700000 0.200000 -0.055102 0.001000 +1e7 63.000000 83.000000 -0.200000 0.200000 -0.151807 0.001000 +1e7 -42.000000 53.000000 0.000000 0.200000 0.158491 0.002000 +1e7 -10.000000 58.000000 0.300000 0.800000 0.137931 0.001000 +1e7 62.000000 54.000000 0.600000 0.200000 -0.229630 0.001000 +1e7 -77.000000 58.000000 -0.000000 0.400000 0.531034 0.001000 +1e7 62.000000 37.000000 -0.700000 0.400000 -0.670270 0.003000 +1e7 -58.000000 -43.000000 -0.100000 0.400000 -0.539535 0.001000 +1e7 17.000000 24.000000 -0.900000 0.200000 -0.141667 0.001000 +1e7 51.000000 -22.000000 -0.500000 0.200000 0.463636 0.004000 +1e7 31.000000 23.000000 0.400000 0.600000 -0.808696 0.001000 +1e7 -59.000000 -65.000000 -0.700000 0.600000 -0.544615 0.001000 +1e7 24.000000 -75.000000 0.900000 0.200000 0.064000 0.003000 +1e7 57.000000 61.000000 0.400000 0.200000 -0.186885 0.001000 +1e7 86.000000 -43.000000 0.800000 0.400000 0.800000 0.004000 +1e7 -25.000000 63.000000 0.000000 0.800000 0.317460 0.002000 +1e7 -14.000000 -89.000000 -0.500000 0.800000 -0.125843 0.001000 +1e7 -8.000000 -49.000000 0.900000 0.200000 -0.032653 0.003000 +1e7 85.000000 -18.000000 -0.900000 0.600000 2.833333 0.003000 +1e7 -59.000000 74.000000 0.500000 0.200000 0.159459 0.004000 +1e7 15.000000 13.000000 0.200000 0.600000 -0.692308 0.001000 +1e7 47.000000 6.000000 -0.600000 0.800000 -6.266667 0.001000 +1e7 70.000000 17.000000 0.400000 0.600000 -2.470588 0.002000 +1e7 98.000000 56.000000 -0.200000 0.200000 -0.350000 0.004000 +1e7 -4.000000 73.000000 -0.900000 0.800000 0.043836 0.002000 +1e7 -31.000000 -33.000000 0.000000 0.400000 -0.375758 0.004000 +1e7 71.000000 20.000000 -0.800000 0.400000 -1.420000 0.002000 +1e7 13.000000 56.000000 0.400000 0.200000 -0.046429 0.003000 +1e7 49.000000 -25.000000 0.100000 0.400000 0.784000 0.001000 +1e7 -54.000000 1.000000 0.200000 0.200000 10.800000 0.001000 +1e7 -87.000000 -65.000000 -0.100000 0.200000 -0.267692 0.001000 +1e7 -75.000000 -94.000000 0.400000 0.800000 -0.638298 0.004000 +1e7 -23.000000 -77.000000 0.700000 0.800000 -0.238961 0.002000 +1e7 -39.000000 -83.000000 0.000000 0.200000 -0.093976 0.001000 +1e7 -12.000000 38.000000 0.100000 0.400000 0.126316 0.003000 +1e7 60.000000 -87.000000 0.100000 0.800000 0.551724 0.001000 +1e7 95.000000 19.000000 0.300000 0.200000 -1.000000 0.003000 +1e7 93.000000 26.000000 -0.300000 0.200000 -0.715385 0.002000 +1e7 -61.000000 77.000000 0.200000 0.400000 0.316883 0.001000 +1e7 80.000000 51.000000 -0.300000 0.400000 -0.627451 0.001000 +1e7 -65.000000 -39.000000 -0.700000 0.200000 -0.333333 0.001000 +1e7 -25.000000 -27.000000 -0.700000 0.200000 -0.185185 0.004000 +1e7 22.000000 -53.000000 -0.800000 0.800000 0.332075 0.001000 +1e7 77.000000 1.000000 0.100000 0.600000 -46.200000 0.002000 +1e7 49.000000 27.000000 -0.900000 0.200000 -0.362963 0.001000 +1e7 24.000000 -20.000000 -0.900000 0.200000 0.240000 0.001000 +1e7 64.000000 -18.000000 -0.300000 0.800000 2.844444 0.003000 +1e7 -87.000000 13.000000 0.700000 0.400000 2.676923 0.002000 +1e7 62.000000 -40.000000 0.000000 0.200000 0.310000 0.004000 +1e7 20.000000 -17.000000 0.200000 0.200000 0.235294 0.001000 +1e7 -31.000000 -51.000000 0.100000 0.800000 -0.486275 0.002000 +1e7 34.000000 23.000000 0.100000 0.800000 -1.182609 0.001000 +1e7 45.000000 -23.000000 0.900000 0.200000 0.391304 0.002000 +1e7 92.000000 -46.000000 0.500000 0.200000 0.400000 0.004000 +1e7 -17.000000 95.000000 -0.400000 0.200000 0.035789 0.001000 +1e7 -56.000000 -97.000000 -0.900000 0.400000 -0.230928 0.001000 +1e7 -99.000000 20.000000 -0.800000 0.200000 0.990000 0.001000 +1e7 -33.000000 -93.000000 0.800000 0.200000 -0.070968 0.003000 +1e7 -30.000000 -86.000000 -0.900000 0.600000 -0.209302 0.001000 +1e7 -99.000000 14.000000 0.600000 0.600000 4.242857 0.003000 +1e7 -75.000000 55.000000 -0.800000 0.400000 0.545455 0.001000 +1e7 31.000000 -63.000000 0.900000 0.200000 0.098413 0.004000 +1e7 -82.000000 -96.000000 0.100000 0.200000 -0.170833 0.001000 +1e7 20.000000 -51.000000 0.000000 0.400000 0.156863 0.003000 +1e7 15.000000 61.000000 0.300000 0.200000 -0.049180 0.001000 +1e7 52.000000 79.000000 -0.200000 0.400000 -0.263291 0.001000 +1e7 -87.000000 -8.000000 0.600000 0.600000 -6.525000 0.003000 +1e7 88.000000 9.000000 0.300000 0.600000 -5.866667 0.001000 +1e7 -79.000000 74.000000 -0.100000 0.200000 0.213514 0.004000 +1e7 -94.000000 56.000000 -0.600000 0.600000 1.007143 0.004000 +1e7 57.000000 57.000000 -0.600000 0.600000 -0.600000 0.001000 +1e7 10.000000 66.000000 -0.800000 0.600000 -0.090909 0.002000 +1e7 -96.000000 24.000000 -0.800000 0.200000 0.800000 0.002000 +1e7 71.000000 14.000000 -0.900000 0.800000 -4.057143 0.003000 +1e7 94.000000 -27.000000 -0.200000 0.200000 0.696296 0.001000 +1e7 80.000000 9.000000 -0.300000 0.600000 -5.333333 0.004000 +1e7 38.000000 81.000000 0.000000 0.200000 -0.093827 0.003000 +1e7 -74.000000 42.000000 0.000000 0.200000 0.352381 0.004000 +1e7 20.000000 3.000000 -0.000000 0.400000 -2.666667 0.002000 +1e7 70.000000 -42.000000 -0.500000 0.800000 1.333333 0.002000 +1e7 74.000000 90.000000 -0.600000 0.600000 -0.493333 0.002000 +1e7 55.000000 75.000000 0.500000 0.400000 -0.293333 0.001000 +1e7 -37.000000 -83.000000 -0.600000 0.400000 -0.178313 0.002000 +1e7 -51.000000 -5.000000 0.700000 0.200000 -2.040000 0.001000 +1e7 -96.000000 -31.000000 -0.600000 0.200000 -0.619355 0.004000 +1e7 57.000000 -53.000000 -0.000000 0.600000 0.645283 0.004000 +1e7 -82.000000 -63.000000 -0.700000 0.400000 -0.520635 0.001000 +1e7 51.000000 22.000000 0.000000 0.200000 -0.463636 0.004000 +1e7 -17.000000 -39.000000 -0.200000 0.800000 -0.348718 0.003000 +1e7 -83.000000 -65.000000 0.700000 0.400000 -0.510769 0.002000 +1e7 79.000000 63.000000 -0.900000 0.200000 -0.250794 0.003000 +1e7 5.000000 44.000000 0.600000 0.800000 -0.090909 0.004000 +1e7 -88.000000 52.000000 -0.800000 0.200000 0.338462 0.002000 +1e7 -16.000000 45.000000 0.500000 0.600000 0.213333 0.002000 +1e7 5.000000 -54.000000 -0.000000 0.800000 0.074074 0.003000 +1e7 -39.000000 -45.000000 0.800000 0.400000 -0.346667 0.002000 +1e7 91.000000 -98.000000 0.400000 0.200000 0.185714 0.001000 +1e7 33.000000 92.000000 -0.000000 0.600000 -0.215217 0.003000 +1e7 -28.000000 -82.000000 -0.000000 0.200000 -0.068293 0.001000 +1e7 84.000000 47.000000 -0.800000 0.600000 -1.072340 0.003000 +1e7 -74.000000 61.000000 -0.400000 0.800000 0.970492 0.001000 +1e7 44.000000 -47.000000 -0.700000 0.200000 0.187234 0.003000 +1e7 -36.000000 46.000000 0.700000 0.200000 0.156522 0.003000 +1e7 -81.000000 94.000000 -0.400000 0.400000 0.344681 0.003000 +1e7 -17.000000 93.000000 -0.800000 0.400000 0.073118 0.001000 +1e7 80.000000 -26.000000 0.700000 0.400000 1.230769 0.001000 +1e7 38.000000 -45.000000 -0.500000 0.800000 0.675556 0.001000 +1e7 -41.000000 -81.000000 0.500000 0.600000 -0.303704 0.004000 +1e7 -63.000000 1.000000 -0.000000 0.800000 50.400000 0.002000 +1e7 -80.000000 74.000000 -0.600000 0.800000 0.864865 0.003000 +1e7 68.000000 66.000000 0.400000 0.200000 -0.206061 0.002000 +1e7 -15.000000 -41.000000 -0.800000 0.200000 -0.073171 0.001000 +1e7 61.000000 -72.000000 -0.400000 0.800000 0.677778 0.001000 +1e7 16.000000 83.000000 -0.300000 0.800000 -0.154217 0.003000 +1e7 -59.000000 72.000000 -0.200000 0.800000 0.655556 0.003000 +1e7 43.000000 -9.000000 -0.400000 0.200000 0.955556 0.004000 +1e7 83.000000 -85.000000 0.000000 0.800000 0.781176 0.003000 +1e7 33.000000 85.000000 0.500000 0.800000 -0.310588 0.001000 +1e7 -63.000000 3.000000 -0.300000 0.200000 4.200000 0.002000 +1e7 -89.000000 29.000000 0.900000 0.200000 0.613793 0.001000 +1e7 -11.000000 96.000000 -0.400000 0.600000 0.068750 0.002000 +1e7 20.000000 -65.000000 0.200000 0.200000 0.061538 0.001000 +1e7 -0.000000 -18.000000 -0.900000 0.600000 -0.000000 0.001000 +1e7 58.000000 67.000000 -0.100000 0.200000 -0.173134 0.002000 +1e7 -29.000000 91.000000 0.000000 0.400000 0.127473 0.001000 +1e7 -39.000000 84.000000 0.300000 0.600000 0.278571 0.001000 +1e7 -20.000000 -45.000000 -0.900000 0.400000 -0.177778 0.003000 +1e7 -67.000000 -69.000000 -0.900000 0.600000 -0.582609 0.003000 +1e7 -5.000000 -37.000000 0.900000 0.200000 -0.027027 0.001000 +1e7 72.000000 60.000000 -0.900000 0.800000 -0.960000 0.001000 +1e7 -80.000000 58.000000 0.500000 0.200000 0.275862 0.003000 +1e7 45.000000 -95.000000 0.000000 0.400000 0.189474 0.001000 +1e7 82.000000 1.000000 0.500000 0.800000 -65.600000 0.001000 +1e7 5.000000 77.000000 -0.900000 0.800000 -0.051948 0.001000 +1e7 -24.000000 -61.000000 -0.800000 0.400000 -0.157377 0.002000 +1e7 -13.000000 -51.000000 -0.800000 0.200000 -0.050980 0.001000 +1e7 -89.000000 99.000000 -0.400000 0.600000 0.539394 0.001000 +1e7 -47.000000 93.000000 -0.800000 0.200000 0.101075 0.004000 +1e7 53.000000 -87.000000 -0.900000 0.200000 0.121839 0.001000 +1e7 31.000000 49.000000 -0.900000 0.400000 -0.253061 0.004000 +1e7 84.000000 -53.000000 0.800000 0.600000 0.950943 0.003000 +1e7 7.000000 58.000000 -0.500000 0.400000 -0.048276 0.002000 +1e7 29.000000 -60.000000 -0.700000 0.800000 0.386667 0.001000 +1e7 -64.000000 -36.000000 0.100000 0.200000 -0.355556 0.001000 +1e7 -59.000000 -49.000000 0.200000 0.200000 -0.240816 0.001000 +1e7 42.000000 21.000000 -0.400000 0.600000 -1.200000 0.002000 +1e7 -1.000000 48.000000 0.200000 0.200000 0.004167 0.003000 +1e7 2.000000 19.000000 0.700000 0.200000 -0.021053 0.003000 +1e7 8.000000 -33.000000 0.700000 0.800000 0.193939 0.003000 +1e7 -10.000000 5.000000 -0.700000 0.800000 1.600000 0.004000 +1e7 7.000000 -14.000000 0.900000 0.400000 0.200000 0.001000 +1e7 -48.000000 -13.000000 -0.000000 0.200000 -0.738462 0.003000 +1e7 56.000000 26.000000 -0.200000 0.800000 -1.723077 0.001000 +1e7 -96.000000 41.000000 0.500000 0.200000 0.468293 0.003000 +1e7 7.000000 -92.000000 -0.200000 0.600000 0.045652 0.003000 +1e7 3.000000 17.000000 0.800000 0.600000 -0.105882 0.001000 +1e7 -88.000000 -66.000000 0.800000 0.400000 -0.533333 0.002000 +1e7 22.000000 -31.000000 -0.000000 0.800000 0.567742 0.001000 +1e7 -5.000000 42.000000 0.800000 0.200000 0.023810 0.002000 +1e7 -73.000000 -97.000000 0.200000 0.200000 -0.150515 0.003000 +1e7 17.000000 23.000000 -0.600000 0.800000 -0.591304 0.004000 +1e7 42.000000 97.000000 -0.100000 0.800000 -0.346392 0.002000 +1e7 25.000000 -72.000000 -0.700000 0.400000 0.138889 0.001000 +1e7 -82.000000 44.000000 -0.300000 0.200000 0.372727 0.004000 +1e7 -23.000000 -64.000000 -0.800000 0.600000 -0.215625 0.003000 +1e7 27.000000 33.000000 -0.100000 0.800000 -0.654545 0.004000 +1e7 -30.000000 -76.000000 0.700000 0.600000 -0.236842 0.004000 +1e7 15.000000 -47.000000 0.500000 0.200000 0.063830 0.004000 +1e7 47.000000 -38.000000 -0.200000 0.800000 0.989474 0.002000 +1e7 -46.000000 40.000000 0.100000 0.400000 0.460000 0.001000 +1e7 -69.000000 8.000000 -0.300000 0.200000 1.725000 0.001000 +1e7 2.000000 -70.000000 0.700000 0.600000 0.017143 0.001000 +1e7 -5.000000 -14.000000 -0.500000 0.800000 -0.285714 0.002000 +1e7 -90.000000 82.000000 -0.300000 0.800000 0.878049 0.001000 +1e7 4.000000 27.000000 0.400000 0.800000 -0.118519 0.002000 +1e7 48.000000 -4.000000 0.500000 0.200000 2.400000 0.002000 +1e7 25.000000 54.000000 -0.300000 0.200000 -0.092593 0.004000 +1e7 70.000000 -4.000000 0.900000 0.200000 3.500000 0.001000 +1e7 79.000000 20.000000 0.100000 0.800000 -3.160000 0.002000 +1e7 2.000000 -4.000000 0.000000 0.600000 0.300000 0.002000 +1e7 1.000000 82.000000 -0.500000 0.600000 -0.007317 0.001000 +1e7 68.000000 -27.000000 -0.400000 0.400000 1.007407 0.002000 +1e7 -20.000000 12.000000 0.300000 0.200000 0.333333 0.002000 +1e7 -67.000000 -88.000000 0.300000 0.200000 -0.152273 0.003000 +1e7 -32.000000 -50.000000 -0.000000 0.600000 -0.384000 0.001000 +1e7 -74.000000 -18.000000 0.000000 0.200000 -0.822222 0.002000 +1e7 -19.000000 93.000000 -0.900000 0.600000 0.122581 0.001000 +1e7 -98.000000 57.000000 0.800000 0.200000 0.343860 0.002000 +1e7 -52.000000 -93.000000 -0.100000 0.400000 -0.223656 0.003000 +1e7 -63.000000 -22.000000 0.800000 0.200000 -0.572727 0.004000 +1e7 -63.000000 10.000000 -0.300000 0.400000 2.520000 0.004000 +1e7 7.000000 84.000000 0.500000 0.600000 -0.050000 0.004000 +1e7 26.000000 -34.000000 -0.800000 0.800000 0.611765 0.001000 +1e7 -69.000000 96.000000 0.300000 0.200000 0.143750 0.003000 +1e7 0.000000 -79.000000 -0.900000 0.800000 0.000000 0.004000 +1e7 -84.000000 -44.000000 -0.700000 0.800000 -1.527273 0.002000 +1e7 95.000000 -91.000000 0.800000 0.600000 0.626374 0.003000 +1e7 -23.000000 80.000000 -0.300000 0.200000 0.057500 0.004000 +1e7 -93.000000 43.000000 -0.600000 0.200000 0.432558 0.001000 +1e7 76.000000 35.000000 -0.800000 0.400000 -0.868571 0.001000 +1e7 -47.000000 -14.000000 -0.000000 0.200000 -0.671429 0.001000 +1e7 43.000000 15.000000 -0.200000 0.600000 -1.720000 0.001000 +1e7 -12.000000 -80.000000 0.700000 0.600000 -0.090000 0.003000 +1e7 6.000000 76.000000 -0.800000 0.200000 -0.015789 0.004000 +1e7 9.000000 -96.000000 0.600000 0.200000 0.018750 0.001000 +1e7 -58.000000 3.000000 -0.600000 0.200000 3.866667 0.001000 +1e7 -27.000000 -52.000000 -0.400000 0.200000 -0.103846 0.002000 +1e7 51.000000 83.000000 0.900000 0.400000 -0.245783 0.001000 +1e7 36.000000 -60.000000 0.400000 0.200000 0.120000 0.002000 +1e7 99.000000 19.000000 0.300000 0.200000 -1.042105 0.001000 +1e7 46.000000 -20.000000 -0.900000 0.400000 0.920000 0.004000 +1e7 76.000000 78.000000 0.600000 0.800000 -0.779487 0.004000 +1e7 -79.000000 66.000000 -0.600000 0.200000 0.239394 0.003000 +1e7 46.000000 -33.000000 0.000000 0.600000 0.836364 0.002000 +1e7 94.000000 -97.000000 -0.500000 0.600000 0.581443 0.001000 +1e7 64.000000 88.000000 -0.300000 0.200000 -0.145455 0.003000 +1e7 56.000000 -12.000000 0.200000 0.200000 0.933333 0.001000 +1e7 -35.000000 24.000000 -0.600000 0.600000 0.875000 0.001000 +1e7 -33.000000 3.000000 -0.800000 0.800000 8.800000 0.004000 +1e7 -81.000000 23.000000 0.200000 0.200000 0.704348 0.004000 +1e7 -1.000000 93.000000 0.300000 0.200000 0.002151 0.001000 +1e7 56.000000 6.000000 0.400000 0.200000 -1.866667 0.001000 +1e7 19.000000 -34.000000 0.200000 0.800000 0.447059 0.004000 +1e7 -43.000000 -27.000000 -0.400000 0.200000 -0.318519 0.004000 +1e7 84.000000 21.000000 0.000000 0.400000 -1.600000 0.004000 +1e7 -29.000000 47.000000 0.000000 0.400000 0.246809 0.001000 +1e7 40.000000 -1.000000 0.100000 0.200000 8.000000 0.002000 +1e7 2.000000 11.000000 -0.500000 0.600000 -0.109091 0.002000 +1e7 37.000000 86.000000 0.400000 0.800000 -0.344186 0.001000 +1e7 -95.000000 -81.000000 0.800000 0.600000 -0.703704 0.001000 +1e7 -4.000000 26.000000 -0.000000 0.600000 0.092308 0.001000 +1e7 59.000000 -97.000000 -0.800000 0.400000 0.243299 0.001000 +1e7 -21.000000 71.000000 -0.200000 0.400000 0.118310 0.001000 +1e7 49.000000 4.000000 -0.700000 0.800000 -9.800000 0.002000 +1e7 59.000000 76.000000 0.600000 0.400000 -0.310526 0.001000 +1e7 42.000000 14.000000 -0.900000 0.400000 -1.200000 0.002000 +1e7 -31.000000 -85.000000 -0.900000 0.800000 -0.291765 0.003000 +1e7 53.000000 41.000000 -0.800000 0.200000 -0.258537 0.001000 +1e7 28.000000 -63.000000 0.700000 0.200000 0.088889 0.001000 +1e7 90.000000 -23.000000 -0.900000 0.600000 2.347826 0.004000 +1e7 -74.000000 -46.000000 -0.100000 0.200000 -0.321739 0.001000 +1e7 79.000000 84.000000 0.400000 0.200000 -0.188095 0.002000 +1e7 -45.000000 1.000000 -0.800000 0.400000 18.000000 0.002000 +1e7 50.000000 -85.000000 0.900000 0.600000 0.352941 0.001000 +1e7 -96.000000 73.000000 0.500000 0.800000 1.052055 0.002000 +1e7 -4.000000 29.000000 0.400000 0.200000 0.027586 0.001000 +1e7 69.000000 -99.000000 -0.500000 0.200000 0.139394 0.001000 +1e7 20.000000 -75.000000 0.800000 0.400000 0.106667 0.004000 +1e7 44.000000 -90.000000 0.500000 0.600000 0.293333 0.003000 +1e7 -12.000000 96.000000 0.300000 0.400000 0.050000 0.001000 +1e7 -3.000000 -43.000000 -0.000000 0.800000 -0.055814 0.003000 +1e7 -97.000000 -16.000000 -0.900000 0.600000 -3.637500 0.002000 +1e7 48.000000 60.000000 -0.200000 0.400000 -0.320000 0.001000 +1e7 88.000000 45.000000 -0.900000 0.200000 -0.391111 0.001000 +1e7 -53.000000 -40.000000 -0.700000 0.200000 -0.265000 0.001000 +1e7 -85.000000 -6.000000 -0.200000 0.800000 -11.333333 0.001000 +1e7 -46.000000 -37.000000 0.200000 0.800000 -0.994595 0.002000 +1e7 -46.000000 96.000000 0.200000 0.400000 0.191667 0.001000 +1e7 -99.000000 3.000000 -0.300000 0.200000 6.600000 0.004000 +1e7 -21.000000 52.000000 0.500000 0.600000 0.242308 0.001000 +1e7 -9.000000 -23.000000 -0.200000 0.400000 -0.156522 0.002000 +1e7 -98.000000 -62.000000 0.400000 0.600000 -0.948387 0.004000 +1e7 83.000000 86.000000 -0.300000 0.800000 -0.772093 0.004000 +1e7 67.000000 98.000000 0.200000 0.400000 -0.273469 0.003000 +1e7 1.000000 41.000000 -0.400000 0.800000 -0.019512 0.001000 +1e7 37.000000 -96.000000 0.200000 0.600000 0.231250 0.001000 +1e7 36.000000 15.000000 -0.100000 0.200000 -0.480000 0.001000 +1e7 -20.000000 26.000000 -0.400000 0.200000 0.153846 0.002000 +1e7 -83.000000 45.000000 -0.000000 0.400000 0.737778 0.004000 +1e7 81.000000 -41.000000 -0.100000 0.600000 1.185366 0.001000 +1e7 -61.000000 32.000000 0.000000 0.800000 1.525000 0.004000 +1e7 -77.000000 -55.000000 -0.600000 0.600000 -0.840000 0.001000 +1e7 39.000000 -67.000000 -0.300000 0.600000 0.349254 0.003000 +1e7 -86.000000 -17.000000 -0.300000 0.800000 -4.047059 0.004000 +1e7 -16.000000 -7.000000 0.000000 0.800000 -1.828571 0.001000 +1e7 -44.000000 63.000000 0.200000 0.200000 0.139683 0.004000 +1e7 29.000000 81.000000 0.500000 0.800000 -0.286420 0.001000 +1e7 -95.000000 50.000000 -0.900000 0.400000 0.760000 0.001000 +1e7 -82.000000 -14.000000 -0.200000 0.400000 -2.342857 0.001000 +1e7 66.000000 -90.000000 -0.900000 0.200000 0.146667 0.004000 +1e7 36.000000 -23.000000 -0.200000 0.400000 0.626087 0.003000 +1e7 -5.000000 92.000000 -0.900000 0.600000 0.032609 0.001000 +1e7 31.000000 -28.000000 -0.400000 0.200000 0.221429 0.001000 +1e7 -9.000000 90.000000 0.400000 0.200000 0.020000 0.004000 +1e7 -17.000000 65.000000 -0.000000 0.600000 0.156923 0.003000 +1e7 33.000000 34.000000 0.000000 0.400000 -0.388235 0.001000 +1e7 20.000000 -21.000000 -0.900000 0.200000 0.190476 0.002000 +1e7 90.000000 1.000000 0.800000 0.600000 -54.000000 0.001000 +1e7 15.000000 -47.000000 -0.100000 0.200000 0.063830 0.001000 +1e7 -14.000000 19.000000 0.800000 0.800000 0.589474 0.004000 +1e7 -45.000000 -76.000000 -0.100000 0.200000 -0.118421 0.004000 +1e7 -46.000000 83.000000 -0.300000 0.200000 0.110843 0.002000 +1e7 12.000000 -82.000000 0.800000 0.800000 0.117073 0.001000 +1e7 12.000000 -9.000000 -0.600000 0.200000 0.266667 0.003000 +1e7 -61.000000 -12.000000 0.600000 0.800000 -4.066667 0.002000 +1e7 42.000000 23.000000 0.700000 0.400000 -0.730435 0.001000 diff --git a/course/semester2/pprog/assignment1/graphics.c b/course/semester2/pprog/assignment1/graphics.c index 62711be6..614c2bfd 100644 --- a/course/semester2/pprog/assignment1/graphics.c +++ b/course/semester2/pprog/assignment1/graphics.c @@ -1,12 +1,27 @@ /** * @file graphics.c * @author Sam Moore (20503628) 2012 - adapted from template program provided by UWA - * @pur + * @purpose Definition of graphics related functions + */ + +#include "graphics.h" //Function declarations +#include // Needed for clock +#include // Maths functions (sin, cos) +/** + * Variables + */ +double previousTime, eyeTheta, eyePhi, eyeRho; +float look[3]; +int windowWidth, windowHeight, upY; -/* - * Initialization of graphics +double scale = 1.0; + + +/** + * Initialise the graphics */ -void Init(void) { +void Graphics_Init(void) +{ glClearColor(1.0,1.0,1.0,0.0); glColor3f(0.0f, 0.0f, 0.0f); @@ -23,48 +38,115 @@ void Init(void) { glMaterialfv(GL_FRONT, GL_SHININESS, mat_shininess); glLightfv(GL_LIGHT0, GL_POSITION, light_position); - glColorMaterial(GL_FRONT,GL_DIFFUSE); // Set Color Capability + glColorMaterial(GL_FRONT,GL_DIFFUSE); // Set Color Capability glEnable(GL_LIGHTING); glEnable(GL_LIGHT0); glEnable(GL_DEPTH_TEST); - glEnable(GL_COLOR_MATERIAL); // Enable color + glEnable(GL_COLOR_MATERIAL); // Enable color - double displayRatio = 1.0 * WIDTH / HEIGHT; + windowWidth = WIDTH; windowHeight = HEIGHT; previousTime = clock(); eyeTheta = 0; - eyePhi = 0.5 * M_PI; - eyeRho = RHO; - upY = 1; + eyePhi = 0.5 * M_PI; + eyeRho = RHO; + upY = 1; look[0] = 0; look[1] = 0; look[2] = 0; - gluPerspective(VIEW_ANGLE, displayRatio, WORLD_NEAR, WORLD_FAR); + gluPerspective(VIEW_ANGLE, (double)WIDTH/(double)HEIGHT, WORLD_NEAR, WORLD_FAR); } -/* +/** * This function redraws the screen after the positions of particles * have been updated */ -void Display(void) { +void Graphics_Display(System * s) +{ glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); glMatrixMode(GL_MODELVIEW); - glLoadIdentity(); - gluLookAt(eyeRho * sin(eyePhi) * sin(eyeTheta), eyeRho * cos(eyePhi), - eyeRho * sin(eyePhi) * cos(eyeTheta), - look[0], look[1], look[2], 0, upY, 0); - - for (int i = 0; i < N; i++) { - //glClearColor(1.0,1.0,1.0,0.0); - glColor3f(0.0f, body[i].mass/1e11*100, 0.0f); - //glColor3f(1.0f, 0.0f, 0.0f); + glLoadIdentity(); + gluLookAt(eyeRho * sin(eyePhi) * sin(eyeTheta), eyeRho * cos(eyePhi), + eyeRho * sin(eyePhi) * cos(eyeTheta),look[0], look[1], look[2], 0, upY, 0); + + for (int i = 0; i < s->N; ++i) + { + Body * b = s->body+i; + glColor3f(0.0f, b->mass/1e11*100, 0.0f); glPushMatrix(); // to save the current matrix - glTranslated(SCALE*body[i].X, SCALE*body[i].Y, SCALE*body[i].Z); + glTranslated(scale*b->x[0], scale*b->x[1], scale*b->x[2]); glutSolidSphere (BALL_SIZE, 10, 10); glPopMatrix(); // restore the previous matrix } glFlush(); } + +/** + * This function is to manipulate with the image + */ +void Graphics_Keyboard(unsigned char theKey, int mouseX, int mouseY) +{ + if (theKey == 'x' || theKey == 'X') + { + exit(EXIT_SUCCESS); + } + + if (theKey == 'i' || theKey == 'I') { + eyePhi -= M_PI / 20; + if (eyePhi == 0) + eyePhi = 2 * M_PI; + } else if (theKey == 'm' || theKey == 'I') { + eyePhi += M_PI / 20; + } else if (theKey == 'j' || theKey == 'J') { + eyeTheta -= M_PI / 20; + } else if (theKey == 'k' || theKey == 'K') { + eyeTheta += M_PI / 20; + } else if (theKey == ',') { + eyeRho += 0.5; + } else if (theKey == '.' || theKey == 'I') { + eyeRho -= 0.5; + } else if (theKey == 'w' || theKey == 'W') { + look[1] += 0.5; + } else if (theKey == 'z' || theKey == 'Z') { + look[1] -= 0.5; + } else if (theKey == 'a' || theKey == 'A') { + look[0] -= 0.5; + } else if (theKey == 's' || theKey == 'S') { + look[0] += 0.5; + } else if (theKey == '+') { + scale *= 1.1; + } else if (theKey == '-') { + scale *= 0.9; + } + if (sin(eyePhi) > 0) upY = 1; + else upY = 1; +} + +/** + * Resize the view window + */ +void Graphics_Reshape(int width, int height) +{ + double displayRatio = 1.0 * width / height; + windowWidth = width; + windowHeight = height; + glMatrixMode(GL_PROJECTION); + glLoadIdentity(); + gluPerspective(VIEW_ANGLE, displayRatio, WORLD_NEAR, WORLD_FAR); + glViewport(0, 0, windowWidth, windowHeight); +} + + +/** + * This function is called repeatedly by graphics library. You can consider + * it as main loop in the program. + */ +void Graphics_Animate(void) +{ + + System_Compute(&universe); //Compute and update new positions for the time step + Graphics_Display(&universe); // Display needs to be called to redraw the screen +} diff --git a/course/semester2/pprog/assignment1/graphics.h b/course/semester2/pprog/assignment1/graphics.h index 01ca839a..b437c143 100644 --- a/course/semester2/pprog/assignment1/graphics.h +++ b/course/semester2/pprog/assignment1/graphics.h @@ -13,8 +13,8 @@ #include "nbody.h" -#define SCREEN_WIDTH 800 -#define SCREEN_HEIGHT 800 +#define WIDTH 800 +#define HEIGHT 800 #define POINT_SIZE 1 #define POSITION_X 112 #define POSITION_Y 20 @@ -34,6 +34,7 @@ void Graphics_Init(void); void Graphics_Display(System * s); void Graphics_Keyboard(unsigned char key, int mouse_x, int mouse_y); void Graphics_Reshape(int width, int height); +void Graphics_Animate(void); #endif //_GRAPHICS_H diff --git a/course/semester2/pprog/assignment1/main.c b/course/semester2/pprog/assignment1/main.c index 28e6409b..22bd8674 100644 --- a/course/semester2/pprog/assignment1/main.c +++ b/course/semester2/pprog/assignment1/main.c @@ -1,6 +1,45 @@ + #include #include + #include "nbody.h" #include "graphics.h" +unsigned numberOfProcessors; + +System universe; + +// This is main function. Do not change it. +int main(int argc, char** argv) +{ + glutInit(&argc, argv); + + if (argc < 2) { + puts("Please provide the filename, i.e. \'nbody bodiesfield.dat\'"); + exit(EXIT_SUCCESS); + } + if (argc == 2) + { + System_Init(&universe,argv[1]); + } + if (argc == 3) numberOfProcessors = atoi(argv[2]); + + + + glutInitDisplayMode(GLUT_SINGLE | GLUT_RGB); + glutInitWindowSize(WIDTH, HEIGHT); + glutInitWindowPosition(POSITION_X, POSITION_Y); + glutCreateWindow("N-Body Parallel"); + glutDisplayFunc(Graphics_Display); + glutIdleFunc(Graphics_Animate); + glutKeyboardFunc(Graphics_Keyboard); + glutReshapeFunc(Graphics_Reshape); + Graphics_Init(); + + + printf("Use:\n X - exit\n I, J, K, M - rotate\n W, Z, A, S - move to view" + " point\n ./, - zoom in/out\n +/- - scaled zoom in/out\n"); + + glutMainLoop(); +} diff --git a/course/semester2/pprog/assignment1/nbody.c b/course/semester2/pprog/assignment1/nbody.c index 07761607..d2062e46 100644 --- a/course/semester2/pprog/assignment1/nbody.c +++ b/course/semester2/pprog/assignment1/nbody.c @@ -4,219 +4,134 @@ * @purpose N-Body simulator - Definition of simulation functions; single threaded version */ -#include #include #include -#include +#include #include -#include -#include -#include - -double previousTime, eyeTheta, eyePhi, eyeRho; -float look[3]; -int windowWidth, windowHeight, upY; - -double SCALE = 1; - -Particle *body; -int N; -int numberOfProcessors=1; - +#include +#include "nbody.h" -/* +/** * Prints the body on screen */ -void PrintBody(int i) +void Body_Print(Body * a) { - printf("Body #%d M=%f X=%f Y=%f Z=%f Fx=%f Fy=%f Fz=%f Vx=%f Xy=%f Vz=%f\n", - i, body[i].mass, body[i].X, body[i].Y, body[i].Z, body[i].Fx, - body[i].Fy, body[i].Fz, body[i].Vx, body[i].Vy, body[i].Vz); + printf("Body %p M=%f X=%f Y=%f Z=%f Fx=%f Fy=%f Fz=%f Vx=%f Vy=%f Vz=%f\n", + (void*)a, a->mass, a->x[0], a->x[1], a->x[2], a->F[0], a->F[1], a->F[2], a->v[0], a->v[1], a->v[2]); } -/* +/** * Computing forces */ -void Force(int a) { +void Body_Force(Body * a, System * s) +{ double distance; double con; double gd; - body[a].Fx = body[a].Fy = body[a].Fz = 0; - - for(int b=0; bF[i] = 0; + + for (unsigned index = 0; index < s->N; ++index) + { + Body * b = s->body+index; + if (b == a) + continue; + + distance = 0.0; + for (unsigned i = 0; i < DIMENSIONS; ++i) + distance += square(b->x[i] - a->x[i]); + distance = sqrt(distance); + con = G * a->mass * b->mass / square(distance); + gd = con / distance; + for (unsigned i = 0; i < DIMENSIONS; ++i) + a->F[i] += gd * (b->x[i] - a->x[i]); + } } -/* +/** * Compute velocities */ -void Velocity(int a) { - body[a].Vx += body[a].Fx/body[a].mass * DELTA_T; - body[a].Vy += body[a].Fy/body[a].mass * DELTA_T; - body[a].Vz += body[a].Fz/body[a].mass * DELTA_T; +void Body_Velocity(Body * a) +{ + for (unsigned i = 0; i < DIMENSIONS; ++i) + a->v[i] += a->F[i] / a->mass * DELTA_T; } -/* +/** * Compute positions */ -void Position(int a) { - body[a].X += body[a].Vx * DELTA_T; - body[a].Y += body[a].Vy * DELTA_T; - body[a].Z += body[a].Vz * DELTA_T; +void Body_Position(Body * a) +{ + for (unsigned i = 0; i < DIMENSIONS; ++i) + a->x[i] += a->v[i] * DELTA_T; } -/* +/** * Main compute function */ -void Compute() { - clock_t start, finish; +void System_Compute(System * s) +{ +// clock_t start, finish; - start = clock(); +// start = clock(); - for(int a=0; aN; ++i) + { + Body_Force(s->body+i, s); + Body_Velocity(s->body+i); + Body_Position(s->body+i); } - finish = clock(); - printf("Performance: %ld clock ticks per computation cycle\n", finish-start); - - // PrintBody(0); -// PrintBody(N-1); } -/* - * This function is called repeatedly by graphics library. You can consider - * it as main loop in the program. - */ -void Animate(void) { - Compute(); //Compute and update new positions for the time step - Display(); // Display needs to be called to redraw the screen -} - -/* - * This function is to manipulate with the image - */ -void KeyBoard(unsigned char theKey, int mouseX, int mouseY) { - if (theKey == 'x' || theKey == 'X') { - free(body); - exit(EXIT_SUCCESS); - } - if (theKey == 'i' || theKey == 'I') { - eyePhi -= M_PI / 20; - if (eyePhi == 0) - eyePhi = 2 * M_PI; - } else if (theKey == 'm' || theKey == 'I') { - eyePhi += M_PI / 20; - } else if (theKey == 'j' || theKey == 'J') { - eyeTheta -= M_PI / 20; - } else if (theKey == 'k' || theKey == 'K') { - eyeTheta += M_PI / 20; - } else if (theKey == ',') { - eyeRho += 0.5; - } else if (theKey == '.' || theKey == 'I') { - eyeRho -= 0.5; - } else if (theKey == 'w' || theKey == 'W') { - look[1] += 0.5; - } else if (theKey == 'z' || theKey == 'Z') { - look[1] -= 0.5; - } else if (theKey == 'a' || theKey == 'A') { - look[0] -= 0.5; - } else if (theKey == 's' || theKey == 'S') { - look[0] += 0.5; - } else if (theKey == '+') { - SCALE *= 1.1; - } else if (theKey == '-') { - SCALE *= 0.9; - } - if (sin(eyePhi) > 0) upY = 1; - else upY = 1; -} -void Reshape(int width, int height) { - double displayRatio = 1.0 * width / height; - windowWidth = width; - windowHeight = height; - glMatrixMode(GL_PROJECTION); - glLoadIdentity(); - gluPerspective(VIEW_ANGLE, displayRatio, WORLD_NEAR, WORLD_FAR); - glViewport(0, 0, windowWidth, windowHeight); -} /* * This function reads an input file. You can change it if you choose a * different file format */ -void readFile(char *fileName) { +#define LINE_SIZE BUFSIZ +void System_Init(System * s, char *fileName) +{ char line[LINE_SIZE]; - char *token; - FILE *file; + char * token; + FILE * file; file = fopen(fileName, "rt"); - N = atoi(fgets(line, LINE_SIZE, file)); - body = (Particle*) calloc((size_t)N, sizeof(Particle)); - - puts("----------------------Initial field-------------------------------"); - - for (int i=0; iN = atoi(fgets(line, LINE_SIZE, file)); + s->body = (Body*) calloc((size_t)s->N, sizeof(Body)); + + //printf("----------------------Initial field-------------------------------\n"); + + for (unsigned i = 0; i < s->N; ++i) + { + if (fgets(line, LINE_SIZE, file) != NULL) + { + Body * a = s->body+i; + token = strtok(line, ",; "); + a->mass = atof(token); + + for (unsigned j = 0; j < DIMENSIONS; ++j) + { + token = strtok(NULL, ",; "); + a->x[j] = atof(token); + } + for (unsigned j = 0; j < DIMENSIONS; ++j) + { + token = strtok(NULL, ",; "); + a->v[j] = atof(token); + } + //Body_Print(a); } - puts("--------------------------------------------------------------"); - puts("Use:\n X - exit\n I, J, K, M - rotate\n W, Z, A, S - move to view" - " point\n ./, - zoom in/out\n +/- - scaled zoom in/out\n"); + } + //printf("--------------------------------------------------------------\n"); + fclose(file); } -// This is main function. Do not change it. -int main(int argc, char** argv) -{ - glutInit(&argc, argv); - if (argc < 2) { - puts("Please provide the filename, i.e. \'nbody bodiesfield.dat\'"); - exit(EXIT_SUCCESS); - } - if (argc == 2) readFile(argv[1]); - if (argc == 3) numberOfProcessors = atoi(argv[2]); - - glutInitDisplayMode(GLUT_SINGLE | GLUT_RGB); - glutInitWindowSize(WIDTH, HEIGHT); - glutInitWindowPosition(POSITION_X, POSITION_Y); - glutCreateWindow("N-Body Parallel"); - glutDisplayFunc(Display); - glutIdleFunc(Animate); - glutKeyboardFunc(KeyBoard); - glutReshapeFunc(Reshape); - Init(); - glutMainLoop(); -} diff --git a/course/semester2/pprog/assignment1/nbody.h b/course/semester2/pprog/assignment1/nbody.h index 37232051..0853c2b7 100644 --- a/course/semester2/pprog/assignment1/nbody.h +++ b/course/semester2/pprog/assignment1/nbody.h @@ -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