Skip to content
This repository was archived by the owner on Jul 19, 2023. It is now read-only.

Commit aae68b9

Browse files
committed
fix indexing in a convolution
1 parent 870e0f9 commit aae68b9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/derivative_operators/convolutions.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ function convolve_interior!(x_temp::AbstractVector{T}, x::AbstractVector{T}, A::
1515
mid = div(A.stencil_length,2)
1616
for i in (1+A.boundary_point_count) : (length(x_temp)-A.boundary_point_count)
1717
xtempi = zero(T)
18-
cur_stencil = eltype(stencil) <: AbstractVector ? stencil[i] : stencil
18+
cur_stencil = eltype(stencil) <: AbstractVector ? stencil[i-A.boundary_point_count] : stencil
1919
cur_coeff = typeof(coeff) <: AbstractVector ? coeff[i] : coeff isa Number ? coeff : true
2020
cur_stencil = use_winding(A) && cur_coeff < 0 ? reverse(cur_stencil) : cur_stencil
2121
for idx in 1:A.stencil_length

0 commit comments

Comments
 (0)