Skip to content

Commit 900abf3

Browse files
committed
fix BVPFunction
1 parent d865705 commit 900abf3

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
@@ -4339,15 +4339,17 @@ function BVPFunction{iip, specialize, twopoint}(f, bc;
43394339
if iip_f
43404340
jac = update_coefficients! #(J,u,p,t)
43414341
else
4342-
jac = (u, p, t) -> update_coefficients!(deepcopy(jac_prototype), u, p, t)
4342+
jac_prototype_copy = deepcopy(jac_prototype)
4343+
jac = (u, p, t) -> update_coefficients!(jac_prototype_copy, u, p, t)
43434344
end
43444345
end
43454346

43464347
if bcjac === nothing && isa(bcjac_prototype, AbstractSciMLOperator)
43474348
if iip_bc
43484349
bcjac = update_coefficients! #(J,u,p,t)
43494350
else
4350-
bcjac = (u, p, t) -> update_coefficients!(deepcopy(bcjac_prototype), u, p, t)
4351+
bcjac_prototype_copy = deepcopy(bcjac_prototype)
4352+
bcjac = (u, p, t) -> update_coefficients!(bcjac_prototype_copy, u, p, t)
43514353
end
43524354
end
43534355

0 commit comments

Comments
 (0)