@@ -103,7 +103,7 @@ function CenteredDifference{N}(derivative_order::Int,
103103 calculate_weights (derivative_order, high_boundary_x[end - i], high_boundary_x)) for i in boundary_point_count: - 1 : 1 ]
104104 high_boundary_coefs = convert (SVector{boundary_point_count},_high_boundary_coefs)
105105
106- coefficients = coeff_func isa Nothing ? nothing : Vector {T} (undef ,len)
106+ coefficients = coeff_func isa Nothing ? nothing : zeros (T ,len)
107107
108108 DerivativeOperator{T,N,false ,typeof (dx),typeof (stencil_coefs),
109109 typeof (low_boundary_coefs),typeof (coefficients),
@@ -169,7 +169,7 @@ function UpwindDifference{N}(derivative_order::Int,
169169 _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, high_boundary_x)) for x0 in R_boundary_deriv_spots]
170170 high_boundary_coefs = convert (SVector{boundary_point_count},_high_boundary_coefs)
171171
172- coefficients = Vector {T} (undef ,len)
172+ coefficients = zeros (T ,len)
173173 if coeff_func != nothing
174174 compute_coeffs! (coeff_func, coefficients)
175175 end
@@ -215,7 +215,7 @@ function UpwindDifference{N}(derivative_order::Int,
215215 high_boundary_coefs = [_upwind_coefs ; _downwind_coefs]
216216
217217 # Compute coefficients
218- coefficients = Vector {T} (undef ,len)
218+ coefficients = zeros (T ,len)
219219 if coeff_func != nothing
220220 compute_coeffs! (coeff_func, coefficients)
221221 end
0 commit comments