Skip to content

Commit 9834baa

Browse files
fix: fix BVProblem construction
1 parent c76f213 commit 9834baa

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/problems/bvproblem.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
check_compatibility && check_compatible_system(BVProblem, sys)
99
isnothing(callback) || error("BVP solvers do not support callbacks.")
1010

11+
dvs = unknowns(sys)
12+
op = to_varmap(op, dvs)
1113
# Systems without algebraic equations should use both fixed values + guesses
1214
# for initialization.
1315
_op = has_alg_eqs(sys) ? op : merge(Dict(op), Dict(guesses))
@@ -17,7 +19,6 @@
1719
t = tspan !== nothing ? tspan[1] : tspan, check_compatibility = false, cse,
1820
checkbounds, time_dependent_init = false, expression, kwargs...)
1921

20-
dvs = unknowns(sys)
2122
stidxmap = Dict([v => i for (i, v) in enumerate(dvs)])
2223
u0_idxs = has_alg_eqs(sys) ? collect(1:length(dvs)) :
2324
[stidxmap[k] for (k, v) in op if haskey(stidxmap, k)]

0 commit comments

Comments
 (0)