Skip to content

Commit 912782b

Browse files
committed
fix DyanimalBVPFunction
1 parent 900abf3 commit 912782b

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/scimlfunctions.jl

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4514,15 +4514,17 @@ function DynamicalBVPFunction{iip, specialize, twopoint}(f, bc;
45144514
if iip_f
45154515
jac = update_coefficients! #(J,u,p,t)
45164516
else
4517-
jac = (u, p, t) -> update_coefficients!(deepcopy(jac_prototype), u, p, t)
4517+
jac_prototype_copy = deepcopy(jac_prototype)
4518+
jac = (u, p, t) -> update_coefficients!(jac_prototype_copy, u, p, t)
45184519
end
45194520
end
45204521

45214522
if bcjac === nothing && isa(bcjac_prototype, AbstractSciMLOperator)
45224523
if iip_bc
45234524
bcjac = update_coefficients! #(J,u,p,t)
45244525
else
4525-
bcjac = (u, p, t) -> update_coefficients!(deepcopy(bcjac_prototype), u, p, t)
4526+
bcjac_prototype_copy = deepcopy(jac_prototype)
4527+
bcjac = (u, p, t) -> update_coefficients!(bcjac_prototype_copy, u, p, t)
45264528
end
45274529
end
45284530

0 commit comments

Comments
 (0)