Skip to content

Commit

Permalink
fix for julia 1.6
Browse files Browse the repository at this point in the history
  • Loading branch information
SteffenPL committed Dec 6, 2023
1 parent 4bf833f commit 3b5b782
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/core.jl
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ end
@inline function wrap_index(ht::BoundedHashTable, gridpos)
rep = @. mod(gridpos - 1, ht.gridsize) + 1
offset = @. ceil(Int64, (rep - gridpos) / ht.gridsize) * ht.domainsize
return (; rep, offset)
return (rep = rep, offset = offset)
end

function periodic_neighbouring_boxes(ht::BoundedHashTable, gridpos, r)
Expand All @@ -92,7 +92,7 @@ function periodic_neighbouring_boxes(ht::BoundedHashTable, gridpos, r)
widths = @. ceil(IT, r * ht.inv_cellsize)
neighbour_indices = CartesianIndices(ntuple(i -> -widths[i]:widths[i], Dim))
neighbour_reps = (wrap_index(ht, gridpos .+ Tuple(i)) for i in neighbour_indices)
return ( (hashindex(ht, rep), offset) for (; rep, offset) in neighbour_reps)
return ( (hashindex(ht, rep), offset) for (rep, offset) in neighbour_reps)
end

function periodic_neighbours(ht::BoundedHashTable, pos, r)
Expand Down

0 comments on commit 3b5b782

Please sign in to comment.