diff --git a/particles.py b/particles.py index d92096c..c56ce87 100644 --- a/particles.py +++ b/particles.py @@ -28,13 +28,13 @@ dt = 0.1 c[-1] = dt # Initial positions. -x_coords = np.random.uniform(borders_x[0] / spawn_restriction, borders_x[1] / spawn_restriction, n_particles).astype(np.float16) -y_coords = np.random.uniform(borders_y[0] / spawn_restriction, borders_y[1] / spawn_restriction, n_particles).astype(np.float16) +x_coords = np.random.uniform(borders_x[0] / spawn_restriction, borders_x[1] / spawn_restriction, n_particles).astype(np.float32) +y_coords = np.random.uniform(borders_y[0] / spawn_restriction, borders_y[1] / spawn_restriction, n_particles).astype(np.float32) # Initial momenta are 0. -x_momenta = np.zeros(n_particles, dtype=np.float16) -y_momenta = np.zeros(n_particles, dtype=np.float16) +x_momenta = np.zeros(n_particles, dtype=np.float32) +y_momenta = np.zeros(n_particles, dtype=np.float32) @@ -57,9 +57,9 @@ brown = BrownIterator(-1, c # Max iterations, simulation parameters. , x_coords, y_coords , y_momenta, y_momenta # The boundary condition: reflect at the borders, - , borders_x, borders_y + #, borders_x, borders_y # or just let propagate to infinity. - #, [], [] + , [], [] # Let the border dampen the system, border_dampening < 1 => energy is absorbed. , border_dampening=1 , dt=dt)