Skip to content

Commit

Permalink
tests pass now
Browse files Browse the repository at this point in the history
  • Loading branch information
albert-de-montserrat committed Oct 24, 2024
1 parent 48e51e7 commit cadb220
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/Particles/particles_utils.jl
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ function init_particles(
min_xcell,
coords::NTuple{N,AbstractArray},
dxᵢ::NTuple{N,T},
nᵢ::NTuple{N,I}
nᵢ::NTuple{N,I};
buffer = 0.9
) where {N,T,I}
ncells = prod(nᵢ)
np = max_xcell * ncells
Expand All @@ -60,7 +61,7 @@ function init_particles(
if l nxcell
ntuple(Val(N)) do ndim
@index pxᵢ[ndim][l, I...] =
x0ᵢ[ndim] + dxᵢ[ndim] * (@index(pxᵢ[ndim][l, I...]) )#* buffer + (1-buffer)/2)
x0ᵢ[ndim] + dxᵢ[ndim] * (@index(pxᵢ[ndim][l, I...]) * buffer + (1-buffer)/2)
end
@index index[l, I...] = true

Expand Down

0 comments on commit cadb220

Please sign in to comment.