File tree Expand file tree Collapse file tree 1 file changed +0
-23
lines changed Expand file tree Collapse file tree 1 file changed +0
-23
lines changed Original file line number Diff line number Diff line change 350350 return floor (Int, i)
351351end
352352
353- # Sorting only really makes sense in longer simulations where particles
354- # end up very unordered.
355- # WARNING: This is currently unmaintained.
356- function z_index_sort! (coordinates, system)
357- (; mass, pressure, neighborhood_search) = system
358-
359- perm = sortperm (eachparticle (system),
360- by = (i -> cell_z_index (extract_svector (coordinates, system, i),
361- neighborhood_search)))
362-
363- permute! (mass, perm)
364- permute! (pressure, perm)
365- Base. permutecols!! (u, perm)
366-
367- return nothing
368- end
369-
370- @inline function cell_z_index (coords, neighborhood_search)
371- cell = cell_coords (coords, neighborhood_search. search_radius) .+ 1
372-
373- return cartesian2morton (SVector (cell))
374- end
375-
376353# Create a copy of a neighborhood search but with a different search radius
377354function copy_neighborhood_search (nhs:: GridNeighborhoodSearch , search_radius, u)
378355 if nhs. periodic_box === nothing
You can’t perform that action at this time.
0 commit comments