Skip to content

Commit f710cd7

Browse files
committed
Fix inplace assert in single shooting
1 parent 9901afb commit f710cd7

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

lib/BoundaryValueDiffEqShooting/src/single_shooting.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@ function SciMLBase.__solve(prob::BVProblem, alg_::Shooting; odesolve_kwargs = (;
77
verbose && @warn "Initial guess provided, but will be ignored for Shooting."
88
u0 = __extract_u0(prob.u0, prob.p, first(prob.tspan))
99
end
10-
@assert (iip || isnothing(alg_.optimize)) "Out-of-place constraints don't allow optimization solvers "
1110

1211
alg = concretize_jacobian_algorithm(alg_, prob)
1312
(; diffmode) = alg.jac_alg
1413

1514
bcresid_prototype, resid_size = __get_bcresid_prototype(prob, u0)
1615
iip, bc, u0, u0_size = isinplace(prob), prob.f.bc, deepcopy(u0), size(u0)
16+
@assert (iip || isnothing(alg_.optimize)) "Out-of-place constraints don't allow optimization solvers "
1717
resid_prototype = __vec(bcresid_prototype)
1818

1919
# Construct the residual function

0 commit comments

Comments
 (0)