Index: NBody/NBody.py
===================================================================
--- NBody/NBody.py	(revision 119)
+++ NBody/NBody.py	(revision 120)
@@ -38,6 +38,8 @@
     return((n-m)/(float)pow(distance(n,m),2));
 }
 
+// Elements from : http://doswa.com/2009/01/02/fourth-order-runge-kutta-numerical-integration.html
+
 float8 RungeKutta(__global float8* clDataIn,int gid,float dt)
 {
     float4 x[4],v[4],a[4],xf,vf;
@@ -141,22 +143,22 @@
     # Set defaults values
     np.set_printoptions(precision=2)  
     # Id of Device : 1 is for first find !
-    Device=2
+    Device=1
     # Iterations is integer
-    Number=10
+    Number=1024
     # Size of box
     SizeOfBox=1.
     # Initial velocity of particules
     Velocity=1.
     # Redo the last process
-    Redo=10
+    Iterations=1000
     # Step
     Step=0.1
 
-    HowToUse='%s -d <DeviceId> -n <NumberOfSegments> -z <SizeOfBox> -v <Velocity> -s <Step>'
+    HowToUse='%s -d <DeviceId> -n <NumberOfParticules> -z <SizeOfBox> -v <Velocity> -s <Step> -i <Iterations>'
 
     try:
-        opts, args = getopt.getopt(sys.argv[1:],"hd:n:z:v:r:s:",["device=","number=","size=","velocity=","redo=","step="])
+        opts, args = getopt.getopt(sys.argv[1:],"hd:n:z:v:i:s:",["device=","number=","size=","velocity=","iterations=","step="])
     except getopt.GetoptError:
         print HowToUse % sys.argv[0]
         sys.exit(2)
@@ -188,14 +190,14 @@
             Velocity=np.float32(arg)
         elif opt in ("-s", "--step"):
             Step=np.float32(arg)
-        elif opt in ("-r", "--redo"):
-            Redo=int(arg)
+        elif opt in ("-i", "--iterations"):
+            Iterations=int(arg)
             
     print "Device choosed : %s" % Device
-    print "Number of segments : %s" % Number
+    print "Number of particules : %s" % Number
     print "Size of Box : %s" % SizeOfBox
     print "Initial velocity % s" % Velocity
-    print "Redo the last process % s" % Redo
+    print "Number of iterations % s" % Iterations
     print "Step of iteration % s" % Step
     
     MyData = np.zeros(Number, dtype=cl_array.vec.float8)
@@ -251,28 +253,26 @@
     tL=np.array([[MyData[-1][0],MyData[-1][1],MyData[-1][2]]])
 
     time_start=time.time()
-    for i in xrange(Redo):
+    for i in xrange(Iterations):
         CLLaunch=MyRoutines.Evolution(queue,(Number,1),None,clDataNxt,clData,np.float32(Step))
         CLLaunch.wait()
         cl.enqueue_copy(queue, MyData, clDataNxt)
-        # print MyData[0]
         t0=np.append(t0,[MyData[0][0],MyData[0][1],MyData[0][2]])
         t1=np.append(t1,[MyData[1][0],MyData[1][1],MyData[1][2]])
         tL=np.append(tL,[MyData[-1][0],MyData[-1][1],MyData[-1][2]])
         CLLaunch=MyRoutines.Commit(queue,(Number,1),None,clDataNxt,clData)
         CLLaunch.wait()
-    print "\nDuration on %s for each %s" % (Device,(time.time()-time_start)/Redo)
+    print "\nDuration on %s for each %s" % (Device,(time.time()-time_start)/Iterations)
     
-    t0=np.transpose(np.reshape(t0,(Redo+1,3)))
-    t1=np.transpose(np.reshape(t1,(Redo+1,3)))
-    tL=np.transpose(np.reshape(tL,(Redo+1,3)))
+    t0=np.transpose(np.reshape(t0,(Iterations+1,3)))
+    t1=np.transpose(np.reshape(t1,(Iterations+1,3)))
+    tL=np.transpose(np.reshape(tL,(Iterations+1,3)))
     
     import matplotlib.pyplot as plt
     from mpl_toolkits.mplot3d import Axes3D
     
     fig = plt.figure()
     ax = fig.gca(projection='3d')
-    print tL[2]
     ax.scatter(t0[0],t0[1],t0[2], marker='^',color='blue')
     ax.scatter(t1[0],t1[1],t1[2], marker='o',color='red')
     ax.scatter(tL[0],tL[1],tL[2], marker='D',color='green')
