From aae68b97e937559be6a99804d3fa804ab2da0a3d Mon Sep 17 00:00:00 2001 From: Adam Jozefiak Date: Wed, 17 Jul 2019 19:26:54 -0700 Subject: [PATCH] fix indexing in a convolution --- src/derivative_operators/convolutions.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/derivative_operators/convolutions.jl b/src/derivative_operators/convolutions.jl index c6e62cd85..ff106fe4e 100644 --- a/src/derivative_operators/convolutions.jl +++ b/src/derivative_operators/convolutions.jl @@ -15,7 +15,7 @@ function convolve_interior!(x_temp::AbstractVector{T}, x::AbstractVector{T}, A:: mid = div(A.stencil_length,2) for i in (1+A.boundary_point_count) : (length(x_temp)-A.boundary_point_count) xtempi = zero(T) - cur_stencil = eltype(stencil) <: AbstractVector ? stencil[i] : stencil + cur_stencil = eltype(stencil) <: AbstractVector ? stencil[i-A.boundary_point_count] : stencil cur_coeff = typeof(coeff) <: AbstractVector ? coeff[i] : coeff isa Number ? coeff : true cur_stencil = use_winding(A) && cur_coeff < 0 ? reverse(cur_stencil) : cur_stencil for idx in 1:A.stencil_length