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

Commit 24b7154

Browse files
fix boundary stencil
1 parent 0e66af1 commit 24b7154

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/derivative_operators/derivative_operator.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ struct DerivativeOperator{T<:Real,S<:SVector} <: AbstractDerivativeOperator{T}
1717
dx = dx
1818
stencil_length = derivative_order + approximation_order - 1 + (derivative_order+approximation_order)%2
1919
dummy_x = -div(stencil_length,2) : div(stencil_length,2)
20-
deriv_spots = -div(stencil_length,2) : -1
20+
deriv_spots = (-div(stencil_length,2)+1) : -1
2121
boundary_length = length(deriv_spots)
2222

2323
stencil_coefs = convert(SVector{stencil_length, T}, calculate_weights(derivative_order, zero(T), dummy_x))

0 commit comments

Comments
 (0)