diff --git a/src/Interpolations/particle_to_grid.jl b/src/Interpolations/particle_to_grid.jl index f74c0f24..562d46f1 100644 --- a/src/Interpolations/particle_to_grid.jl +++ b/src/Interpolations/particle_to_grid.jl @@ -41,7 +41,7 @@ end any(isnan, p_i) && continue ω_i = bilinear_weight(xvertex, p_i, di) ω += ω_i - ωxF = muladd(ω_i, @cell(Fp[i, ivertex, jvertex]), ωF) + ωxF = muladd(ω_i, @cell(Fp[i, ivertex, jvertex]), ωxF) end end end diff --git a/src/Interpolations/particle_to_grid_centroid.jl b/src/Interpolations/particle_to_grid_centroid.jl index 904bae18..ad4e51fd 100644 --- a/src/Interpolations/particle_to_grid_centroid.jl +++ b/src/Interpolations/particle_to_grid_centroid.jl @@ -112,7 +112,7 @@ end ω += ω_i ωxF = ntuple(Val(N)) do j Base.@_inline_meta - muladd(ω_i, @cell(Fp[j][i, inode, jnode, knode]), ωxF[j]) + muladd(ω_i, @cell(Fp[j][ip, inode, jnode, knode]), ωxF[j]) end end