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

Commit 99ea9b7

Browse files
depwarn free
1 parent 63fda35 commit 99ea9b7

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

src/derivative_operators/derivative_irreg_operator.jl

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,11 @@ struct FiniteDifference{T<:Real,S<:SVector,LBC,RBC} <: AbstractDerivativeOperato
1313
boundary_condition :: Ref{Tuple{Tuple{T,T,Any},Tuple{T,T,Any}}}
1414
t :: Ref{Int}
1515

16-
Base.@pure function FiniteDifference{T,S,LBC,RBC}(derivative_order::Int, approximation_order::Int, dx::Vector{T},
17-
dimension::Int, BC) where {T<:Real,S<:SVector,LBC,RBC}
16+
function FiniteDifference{T,S,LBC,RBC}(derivative_order::Int,
17+
approximation_order::Int,
18+
dx::Vector{T},
19+
dimension::Int, BC) where
20+
{T<:Real,S<:SVector,LBC,RBC}
1821
# dimension = dimension
1922
# dx = dx
2023
stencil_length = derivative_order + approximation_order - 1 + (derivative_order+approximation_order)%2
@@ -32,8 +35,9 @@ struct FiniteDifference{T<:Real,S<:SVector,LBC,RBC} <: AbstractDerivativeOperato
3235
high_boundary_coefs = Vector{T}[]
3336

3437
stl_2 = div(stencil_length,2)
38+
3539
stencil_coefs =[convert(SVector{stencil_length, T}, calculate_weights(derivative_order, zero(T),
36-
x[i-stl_2 : i+stl_2]-x[i])) for i in stl_2+1:dimension-stl_2]
40+
x[i-stl_2 : i+stl_2].-x[i])) for i in stl_2+1:dimension-stl_2]
3741

3842
left_bndry = initialize_left_boundary!(Val{:FD},low_boundary_coefs,stencil_coefs[1:bl],
3943
BC,derivative_order,grid_step[1:bl],bl,bpc_array,LBC)

0 commit comments

Comments
 (0)