From 0454f1c65aaa7127a417240cdca31543d2fa04a0 Mon Sep 17 00:00:00 2001 From: jClugstor Date: Tue, 12 Nov 2024 10:49:36 -0500 Subject: [PATCH] add use of alias_f, alias_p kwargs for ODiffEq --- lib/OrdinaryDiffEqCore/src/solve.jl | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/lib/OrdinaryDiffEqCore/src/solve.jl b/lib/OrdinaryDiffEqCore/src/solve.jl index 333115f919..80c2d4f2f3 100644 --- a/lib/OrdinaryDiffEqCore/src/solve.jl +++ b/lib/OrdinaryDiffEqCore/src/solve.jl @@ -157,8 +157,18 @@ function DiffEqBase.__init( else _alg = alg end - f = prob.f - p = prob.p + + if aliases.alias_f + f = prob.f + else + f = deepcopy(prob.f) + end + + if aliases.alias_p + p = prob.p + else + p = recursivecopy(prob.p) + end use_old_kwargs = haskey(kwargs,:alias_u0) || haskey(kwargs,:alias_du0)