Skip to content
Snippets Groups Projects
Commit c9303322 authored by Matthieu Schaller's avatar Matthieu Schaller
Browse files

Even lower memory footprint

parent 7c7a0aee
No related branches found
No related tags found
2 merge requests!136Master,!97New script for very large ICs
......@@ -102,11 +102,13 @@ for n in range(n_iterations):
x = ids % L;
y = ((ids - x) / L) % L;
z = (ids - x - L * y) / L**2;
ids = zeros(1)
coords = zeros((N, 3))
coords[:,0] = z[:,0] * boxSize / L + boxSize / (2*L)
coords[:,1] = y[:,0] * boxSize / L + boxSize / (2*L)
coords[:,2] = x[:,0] * boxSize / L + boxSize / (2*L)
ds_x[offset:offset+N,:] = coords
coords = zeros((1,3))
offset += N
print "Done", offset,"/", numPart, "(%.1f %%)"%(100*(float)(offset)/numPart)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment