Commits

trikitrok committed 0360822

output deleted

Comments (0)

Files changed (2)

-import numpy.linalg as np_linalg
 import numpy as np
 import math
 import itertools
     def collide(self, particle_i, particle_j):
         x_ij = particle_i.x - particle_j.x
         v_ij = particle_i.v - particle_j.v
-        unit_vector = x_ij / np_linalg.norm(x_ij)
+        unit_vector = x_ij / np.linalg.norm(x_ij)
         h = (1 + self.eps) * np.dot(v_ij, unit_vector) / 2.0
         particle_i.v -= h * unit_vector
         particle_j.v += h * unit_vector
 
         if not self.box.contains(x_j, self.radius):
             return float('inf')
-        if delta_t < 0:
-            print 'koko', delta_t
         return delta_t
 
     def time_to_next_collision_with_wall(self, part):
 
 
 # def test_particle_overlap():
-#     part1 = Particle([0, 0], [0, 0])
+#     part1 = Particle([0, 0], [0, 0])