Skip to content

Commit ea31a3f

Browse files
authored
Remove old code for z-index sort (#3)
1 parent 17e8bd3 commit ea31a3f

File tree

1 file changed

+0
-23
lines changed

1 file changed

+0
-23
lines changed

src/grid_nhs.jl

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -350,29 +350,6 @@ end
350350
return floor(Int, i)
351351
end
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
377354
function copy_neighborhood_search(nhs::GridNeighborhoodSearch, search_radius, u)
378355
if nhs.periodic_box === nothing

0 commit comments

Comments
 (0)