@@ -37,8 +37,8 @@ function CenteredDifference{N}(derivative_order::Int,
3737 _low_boundary_coefs = SVector{boundary_stencil_length, T}[convert (SVector{boundary_stencil_length, T}, (1 / dx^ derivative_order) * calculate_weights (derivative_order, oneunit (T)* x0, left_boundary_x)) for x0 in L_boundary_deriv_spots]
3838 low_boundary_coefs = convert (SVector{boundary_point_count},_low_boundary_coefs)
3939
40- _high_boundary_coefs = SVector{boundary_stencil_length, T}[convert (SVector{boundary_stencil_length, T}, (1 / dx^ derivative_order) * calculate_weights (derivative_order, oneunit (T)* x0, reverse (right_boundary_x))) for x0 in R_boundary_deriv_spots]
41- high_boundary_coefs = convert (SVector{boundary_point_count},reverse (_high_boundary_coefs ))
40+ # _high_boundary_coefs = SVector{boundary_stencil_length, T}[convert(SVector{boundary_stencil_length, T}, (1/dx^derivative_order) * calculate_weights(derivative_order, oneunit(T)*x0, reverse(right_boundary_x))) for x0 in R_boundary_deriv_spots]
41+ high_boundary_coefs = convert (SVector{boundary_point_count},reverse (map (reverse, _low_boundary_coefs) ))
4242
4343 coefficients = coeff_func isa Nothing ? nothing : Vector {T} (undef,len)
4444 DerivativeOperator{T,N,false ,T,typeof (stencil_coefs),
@@ -120,7 +120,7 @@ function UpwindDifference{N}(derivative_order::Int,
120120 stencil_coefs = convert (SVector{stencil_length, T}, calculate_weights (derivative_order, zero (T), dummy_x))
121121 _low_boundary_coefs = SVector{boundary_stencil_length, T}[convert (SVector{boundary_stencil_length, T}, calculate_weights (derivative_order, oneunit (T)* x0, boundary_x)) for x0 in boundary_deriv_spots]
122122 low_boundary_coefs = convert (SVector{boundary_point_count},_low_boundary_coefs)
123- high_boundary_coefs = convert (SVector{boundary_point_count},reverse (SVector{boundary_stencil_length, T}[ reverse (low_boundary_coefs[i]) for i in 1 : boundary_point_count] ))
123+ high_boundary_coefs = convert (SVector{boundary_point_count},reverse (map (reverse, _low_boundary_coefs) ))
124124
125125 coefficients = Vector {T} (undef,len)
126126
0 commit comments