Skip to content

Commit 60d5e48

Browse files
committed
Incorrect prototype was being passed to the NonlinearFunction
1 parent b0ffbdc commit 60d5e48

File tree

2 files changed

+5
-7
lines changed

2 files changed

+5
-7
lines changed

ext/BoundaryValueDiffEqOrdinaryDiffEqExt.jl

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -108,11 +108,10 @@ end
108108
if @load_preference("PrecompileShootingNLLS", VERSIONv"1.10-")
109109
append!(algs,
110110
[
111-
Shooting(Tsit5();
112-
nlsolve = LevenbergMarquardt(;
113-
autodiff = AutoForwardDiff(chunksize = 2))),
114-
Shooting(Tsit5();
115-
nlsolve = GaussNewton(; autodiff = AutoForwardDiff(chunksize = 2))),
111+
Shooting(Tsit5(); nlsolve = LevenbergMarquardt(),
112+
jac_alg = BVPJacobianAlgorithm(AutoForwardDiff(; chunksize = 2))),
113+
Shooting(Tsit5(); nlsolve = GaussNewton(),
114+
jac_alg = BVPJacobianAlgorithm(AutoForwardDiff(; chunksize = 2))),
116115
])
117116
end
118117

src/solve/single_shooting.jl

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,7 @@ function __solve(prob::BVProblem, alg_::Shooting; odesolve_kwargs = (;),
5858
alg.jac_alg.diffmode, loss_fnₚ)
5959
end
6060

61-
nlf = NonlinearFunction{iip}(loss_fn; prob.f.jac_prototype, resid_prototype,
62-
jac = jac_fn)
61+
nlf = NonlinearFunction{iip}(loss_fn; jac_prototype, resid_prototype, jac = jac_fn)
6362
nlprob = if length(resid_prototype) == length(u0)
6463
NonlinearProblem(nlf, vec(u0), prob.p)
6564
else

0 commit comments

Comments
 (0)