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

Commit d8147d6

Browse files
committed
fixed unnecessary inference
1 parent 6305844 commit d8147d6

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

src/derivative_operators/convolutions.jl

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ function convolve_interior!(x_temp::AbstractVector{T}, x::AbstractVector{T}, A::
2121
for idx in 1:A.stencil_length
2222
xtempi += cur_coeff * cur_stencil[idx] * x[i - mid + idx]
2323
end
24-
x_temp[i] = xtempi + !:($overwrite)*x_temp[i]
24+
x_temp[i] = xtempi + !overwrite*x_temp[i]
2525
end
2626
end
2727

@@ -36,7 +36,7 @@ function convolve_BC_left!(x_temp::AbstractVector{T}, x::AbstractVector{T}, A::D
3636
for idx in 2:A.boundary_stencil_length
3737
xtempi += cur_coeff * cur_stencil[idx] * x[idx]
3838
end
39-
x_temp[i] = xtempi + !:($overwrite)*x_temp[i]
39+
x_temp[i] = xtempi + !overwrite*x_temp[i]
4040
end
4141
end
4242

@@ -51,7 +51,7 @@ function convolve_BC_right!(x_temp::AbstractVector{T}, x::AbstractVector{T}, A::
5151
for idx in (A.boundary_stencil_length-1):-1:1
5252
xtempi += cur_coeff * cur_stencil[end-idx] * x[end-idx]
5353
end
54-
x_temp[end-A.boundary_point_count+i] = xtempi + !:($overwrite)*x_temp[end-A.boundary_point_count+i]
54+
x_temp[end-A.boundary_point_count+i] = xtempi + !overwrite*x_temp[end-A.boundary_point_count+i]
5555
end
5656
end
5757

@@ -72,7 +72,7 @@ function convolve_interior!(x_temp::AbstractVector{T}, _x::BoundaryPaddedVector,
7272
@inbounds for idx in 1:A.stencil_length
7373
xtempi += cur_coeff * cur_stencil[idx] * x[(i-1) - (mid-idx) + 1]
7474
end
75-
x_temp[i] = xtempi + !:($overwrite)*x_temp[i]
75+
x_temp[i] = xtempi + !overwrite*x_temp[i]
7676
end
7777
end
7878

@@ -87,7 +87,7 @@ function convolve_BC_left!(x_temp::AbstractVector{T}, _x::BoundaryPaddedVector,
8787
@inbounds for idx in 2:A.boundary_stencil_length
8888
xtempi += cur_coeff * cur_stencil[idx] * _x.u[idx-1]
8989
end
90-
x_temp[i] = xtempi + !:($overwrite)*x_temp[i]
90+
x_temp[i] = xtempi + !overwrite*x_temp[i]
9191
end
9292
# need to account for x.l in first interior
9393
mid = div(A.stencil_length,2) + 1
@@ -101,7 +101,7 @@ function convolve_BC_left!(x_temp::AbstractVector{T}, _x::BoundaryPaddedVector,
101101
@inbounds for idx in 2:A.stencil_length
102102
xtempi += cur_coeff * cur_stencil[idx] * x[(i-1) - (mid-idx) + 1]
103103
end
104-
x_temp[i] = xtempi + !:($overwrite)*x_temp[i]
104+
x_temp[i] = xtempi + !overwrite*x_temp[i]
105105
end
106106

107107
function convolve_BC_right!(x_temp::AbstractVector{T}, _x::BoundaryPaddedVector, A::DerivativeOperator; overwrite = true) where {T<:Real}
@@ -120,7 +120,7 @@ function convolve_BC_right!(x_temp::AbstractVector{T}, _x::BoundaryPaddedVector,
120120
@inbounds for idx in 1:A.stencil_length-1
121121
xtempi += cur_coeff * cur_stencil[idx] * x[(i-1) - (mid-idx) + 1]
122122
end
123-
x_temp[i] = xtempi + !:($overwrite)*x_temp[i]
123+
x_temp[i] = xtempi + !overwrite*x_temp[i]
124124
for i in 1 : A.boundary_point_count
125125
cur_stencil = stencil[i]
126126
cur_coeff = typeof(coeff) <: AbstractVector ? coeff[bc_start + i] : coeff isa Number ? coeff : true
@@ -129,7 +129,7 @@ function convolve_BC_right!(x_temp::AbstractVector{T}, _x::BoundaryPaddedVector,
129129
@inbounds for idx in A.stencil_length:-1:1
130130
xtempi += cur_coeff * cur_stencil[end-idx] * _x.u[end-idx+1]
131131
end
132-
x_temp[bc_start + i] = xtempi + !:($overwrite)*x_temp[bc_start + i]
132+
x_temp[bc_start + i] = xtempi + !overwrite*x_temp[bc_start + i]
133133
end
134134
end
135135

0 commit comments

Comments
 (0)