diff --git a/src/types.jl b/src/types.jl index dbb5d05..07327eb 100644 --- a/src/types.jl +++ b/src/types.jl @@ -122,13 +122,13 @@ function DP5Solver( f, x::Real, y::AbstractVector; kw...) - k1 = copy(y) - k2 = copy(y) - k3 = copy(y) - k4 = copy(y) - k5 = copy(y) - k6 = copy(y) - y1 = copy(y) + k1 = similar(y) + k2 = similar(y) + k3 = similar(y) + k4 = similar(y) + k5 = similar(y) + k6 = similar(y) + y1 = similar(y) ysti = copy(y) DP5Solver(f, x, y, k1, k2, k3, k4, k5, k6, y1, ysti;kw...) end @@ -194,17 +194,17 @@ function DP8Solver( f, x::Real, y::AbstractVector; kw...) - k1 = copy(y) - k2 = copy(y) - k3 = copy(y) - k4 = copy(y) - k5 = copy(y) - k6 = copy(y) - k7 = copy(y) - k8 = copy(y) - k9 = copy(y) - k10 = copy(y) - y1 = copy(y) + k1 = similar(y) + k2 = similar(y) + k3 = similar(y) + k4 = similar(y) + k5 = similar(y) + k6 = similar(y) + k7 = similar(y) + k8 = similar(y) + k9 = similar(y) + k10 = similar(y) + y1 = similar(y) DP8Solver(f, x, y, k1, k2, k3, k4, k5, k6, k7, k8, k9, k10, y1;kw...) end