@@ -15,8 +15,8 @@ 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
19- cur_coeff = typeof (coeff) <: AbstractVector ? coeff[i] : true
18+ cur_stencil = eltype (stencil) <: AbstractVector ? stencil[i- A . boundary_point_count ] : stencil
19+ 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
2222 xtempi += cur_coeff * cur_stencil[idx] * x[i - mid + idx]
@@ -29,10 +29,10 @@ function convolve_BC_left!(x_temp::AbstractVector{T}, x::AbstractVector{T}, A::D
2929 stencil = A. low_boundary_coefs
3030 coeff = A. coefficients
3131 for i in 1 : A. boundary_point_count
32- xtempi = stencil[i][1 ]* x[1 ]
3332 cur_stencil = stencil[i]
34- cur_coeff = typeof (coeff) <: AbstractVector ? coeff[i] : true
33+ cur_coeff = typeof (coeff) <: AbstractVector ? coeff[i] : coeff isa Number ? coeff : true
3534 cur_stencil = use_winding (A) && cur_coeff < 0 ? reverse (cur_stencil) : cur_stencil
35+ xtempi = cur_coeff* stencil[i][1 ]* x[1 ]
3636 for idx in 2 : A. boundary_stencil_length
3737 xtempi += cur_coeff * cur_stencil[idx] * x[idx]
3838 end
@@ -44,10 +44,10 @@ function convolve_BC_right!(x_temp::AbstractVector{T}, x::AbstractVector{T}, A::
4444 stencil = A. high_boundary_coefs
4545 coeff = A. coefficients
4646 for i in 1 : A. boundary_point_count
47- xtempi = stencil[i][end ]* x[end ]
4847 cur_stencil = stencil[i]
49- cur_coeff = typeof (coeff) <: AbstractVector ? coeff[i] : true
48+ cur_coeff = typeof (coeff) <: AbstractVector ? coeff[i] : coeff isa Number ? coeff : true
5049 cur_stencil = use_winding (A) && cur_coeff < 0 ? reverse (cur_stencil) : cur_stencil
50+ xtempi = cur_coeff* stencil[i][end ]* x[end ]
5151 for idx in (A. boundary_stencil_length- 1 ): - 1 : 1
5252 xtempi += cur_coeff * cur_stencil[end - idx] * x[end - idx]
5353 end
@@ -67,7 +67,7 @@ function convolve_interior!(x_temp::AbstractVector{T}, _x::BoundaryPaddedVector,
6767 for i in (2 + A. boundary_point_count) : (length (x_temp)- A. boundary_point_count)- 1
6868 xtempi = zero (T)
6969 cur_stencil = eltype (stencil) <: AbstractVector ? stencil[i- A. boundary_point_count] : stencil
70- cur_coeff = typeof (coeff) <: AbstractVector ? coeff[i- A. boundary_point_count] : true
70+ cur_coeff = typeof (coeff) <: AbstractVector ? coeff[i- A. boundary_point_count] : coeff isa Number ? coeff : true
7171 cur_stencil = use_winding (A) && cur_coeff < 0 ? reverse (cur_stencil) : cur_stencil
7272 @inbounds for idx in 1 : A. stencil_length
7373 xtempi += cur_coeff * cur_stencil[idx] * x[(i- 1 ) - (mid- idx) + 1 ]
@@ -81,7 +81,7 @@ function convolve_BC_left!(x_temp::AbstractVector{T}, _x::BoundaryPaddedVector,
8181 coeff = A. coefficients
8282 for i in 1 : A. boundary_point_count
8383 cur_stencil = stencil[i]
84- cur_coeff = typeof (coeff) <: AbstractVector ? coeff[i] : true
84+ cur_coeff = typeof (coeff) <: AbstractVector ? coeff[i] : coeff isa Number ? coeff : true
8585 xtempi = cur_coeff* cur_stencil[1 ]* _x. l
8686 cur_stencil = use_winding (A) && cur_coeff < 0 ? reverse (cur_stencil) : cur_stencil
8787 @inbounds for idx in 2 : A. boundary_stencil_length
@@ -95,7 +95,7 @@ function convolve_BC_left!(x_temp::AbstractVector{T}, _x::BoundaryPaddedVector,
9595 i = 1 + A. boundary_point_count
9696 xtempi = zero (T)
9797 cur_stencil = eltype (A. stencil_coefs) <: AbstractVector ? A. stencil_coefs[i- A. boundary_point_count] : A. stencil_coefs
98- cur_coeff = typeof (coeff) <: AbstractVector ? coeff[i- A. boundary_point_count] : true
98+ cur_coeff = typeof (coeff) <: AbstractVector ? coeff[i- A. boundary_point_count] : coeff isa Number ? coeff : true
9999 cur_stencil = use_winding (A) && cur_coeff < 0 ? reverse (cur_stencil) : cur_stencil
100100 xtempi = cur_coeff* cur_stencil[1 ]* _x. l
101101 @inbounds for idx in 2 : A. stencil_length
@@ -114,7 +114,7 @@ function convolve_BC_right!(x_temp::AbstractVector{T}, _x::BoundaryPaddedVector,
114114 i = length (x_temp)- A. boundary_point_count
115115 xtempi = zero (T)
116116 cur_stencil = eltype (A. stencil_coefs) <: AbstractVector ? A. stencil_coefs[i- A. boundary_point_count] : A. stencil_coefs
117- cur_coeff = typeof (coeff) <: AbstractVector ? coeff[i- A. boundary_point_count] : true
117+ cur_coeff = typeof (coeff) <: AbstractVector ? coeff[i- A. boundary_point_count] : coeff isa Number ? coeff : true
118118 cur_stencil = use_winding (A) && cur_coeff < 0 ? reverse (cur_stencil) : cur_stencil
119119 xtempi = cur_coeff* cur_stencil[end ]* _x. r
120120 @inbounds for idx in 1 : A. stencil_length- 1
@@ -123,7 +123,7 @@ function convolve_BC_right!(x_temp::AbstractVector{T}, _x::BoundaryPaddedVector,
123123 x_temp[i] = xtempi
124124 for i in 1 : A. boundary_point_count
125125 cur_stencil = stencil[i]
126- cur_coeff = typeof (coeff) <: AbstractVector ? coeff[bc_start + i] : true
126+ cur_coeff = typeof (coeff) <: AbstractVector ? coeff[bc_start + i] : coeff isa Number ? coeff : true
127127 xtempi = cur_coeff* cur_stencil[end ]* _x. r
128128 cur_stencil = use_winding (A) && cur_coeff < 0 ? reverse (cur_stencil) : cur_stencil
129129 @inbounds for idx in A. stencil_length: - 1 : 1
0 commit comments