Skip to content

Commit 9901afb

Browse files
committed
Fix inplace assert in multiple shooting
1 parent d7e4ef4 commit 9901afb

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

lib/BoundaryValueDiffEqShooting/src/multiple_shooting.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ function SciMLBase.__solve(prob::BVProblem, _alg::MultipleShooting; odesolve_kwa
77
throw(ArgumentError("Currently MultipleShooting only supports `EnsembleSerial` and \
88
`EnsembleThreads`!"))
99
end
10-
@assert (iip || isnothing(_alg.optimize)) "Out-of-place constraints don't allow optimization solvers "
1110

1211
ig, T, N, Nig, u0 = __extract_problem_details(prob; dt = 0.1)
1312
has_initial_guess = _unwrap_val(ig)
@@ -16,6 +15,7 @@ function SciMLBase.__solve(prob::BVProblem, _alg::MultipleShooting; odesolve_kwa
1615

1716
bcresid_prototype, resid_size = __get_bcresid_prototype(prob, u0)
1817
iip, bc, u0, u0_size = isinplace(prob), prob.f.bc, deepcopy(u0), size(u0)
18+
@assert (iip || isnothing(_alg.optimize)) "Out-of-place constraints don't allow optimization solvers "
1919

2020
__alg = concretize_jacobian_algorithm(_alg, prob)
2121
alg = if has_initial_guess && Nig != __alg.nshoots

0 commit comments

Comments
 (0)