Skip to content

Commit 343f87f

Browse files
authored
Merge pull request #329 from SciML/qqy/di_strict
2 parents e4d9738 + 8606d36 commit 343f87f

File tree

3 files changed

+8
-7
lines changed

3 files changed

+8
-7
lines changed

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ Hwloc = "3.3"
4848
InteractiveUtils = "<0.0.1, 1"
4949
JET = "0.9.18"
5050
LinearAlgebra = "1.10"
51-
LinearSolve = "3.9"
51+
LinearSolve = "3.12"
5252
NonlinearSolveFirstOrder = "1.3"
5353
ODEInterface = "0.5"
5454
OrdinaryDiffEqLowOrderRK = "1.2"

lib/BoundaryValueDiffEqShooting/src/multiple_shooting.jl

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,8 @@ function __solve_nlproblem!(
111111
end
112112

113113
resid_prototype_cached = similar(resid_prototype)
114-
jac_cache = DI.prepare_jacobian(nothing, resid_prototype_cached, diffmode, u_at_nodes)
114+
jac_cache = DI.prepare_jacobian(
115+
nothing, resid_prototype_cached, diffmode, u_at_nodes; strict = Val(false))
115116

116117
ode_cache_jac_fn = __multiple_shooting_init_jacobian_odecache(
117118
ensemblealg, prob, jac_cache, diffmode, alg.ode_alg,
@@ -161,8 +162,8 @@ function __solve_nlproblem!(::StandardBVProblem, alg::MultipleShooting, bcresid_
161162
else
162163
alg.jac_alg.nonbc_diffmode
163164
end
164-
ode_jac_cache = DI.prepare_jacobian(
165-
nothing, similar(u_at_nodes, cur_nshoot * N), nonbc_diffmode, u_at_nodes)
165+
ode_jac_cache = DI.prepare_jacobian(nothing, similar(u_at_nodes, cur_nshoot * N),
166+
nonbc_diffmode, u_at_nodes; strict = Val(false))
166167
ode_cache_ode_jac_fn = __multiple_shooting_init_jacobian_odecache(
167168
ensemblealg, prob, ode_jac_cache, nonbc_diffmode,
168169
alg.ode_alg, cur_nshoot, u0; internal_ode_kwargs...)
@@ -175,7 +176,7 @@ function __solve_nlproblem!(::StandardBVProblem, alg::MultipleShooting, bcresid_
175176
bc_diffmode
176177
end
177178
bc_jac_cache = DI.prepare_jacobian(
178-
nothing, similar(bcresid_prototype), bc_diffmode, u_at_nodes)
179+
nothing, similar(bcresid_prototype), bc_diffmode, u_at_nodes; strict = Val(false))
179180
ode_cache_bc_jac_fn = __multiple_shooting_init_jacobian_odecache(
180181
ensemblealg, prob, bc_jac_cache, bc_diffmode,
181182
alg.ode_alg, cur_nshoot, u0; internal_ode_kwargs...)

lib/BoundaryValueDiffEqShooting/src/single_shooting.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,9 @@ function SciMLBase.__solve(prob::BVProblem, alg_::Shooting; odesolve_kwargs = (;
3737
y_ = similar(resid_prototype)
3838

3939
jac_cache = if iip
40-
DI.prepare_jacobian(nothing, y_, diffmode, vec(u0))
40+
DI.prepare_jacobian(nothing, y_, diffmode, vec(u0); strict = Val(false))
4141
else
42-
DI.prepare_jacobian(nothing, diffmode, vec(u0))
42+
DI.prepare_jacobian(nothing, diffmode, vec(u0); strict = Val(false))
4343
end
4444

4545
ode_cache_jac_fn = __single_shooting_jacobian_ode_cache(

0 commit comments

Comments
 (0)