Skip to content

Commit 8fd7ac9

Browse files
4fix: fix late_binding_update_u0-p
1 parent 23bf46a commit 8fd7ac9

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/systems/nonlinear/initializesystem.jl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -738,6 +738,7 @@ function SciMLBase.late_binding_update_u0_p(
738738
end
739739
newp = setp_oop(sys, syms)(newp, vals)
740740
else
741+
allsyms = nothing
741742
# if `p` is not provided or is symbolic
742743
p === missing || eltype(p) <: Pair || return newu0, newp
743744
(newu0 === nothing || isempty(newu0)) && return newu0, newp
@@ -755,6 +756,9 @@ function SciMLBase.late_binding_update_u0_p(
755756
if eltype(p) <: Pair
756757
syms = []
757758
vals = []
759+
if allsyms === nothing
760+
allsyms = all_symbols(sys)
761+
end
758762
for (k, v) in p
759763
v === nothing && continue
760764
(symbolic_type(v) == NotSymbolic() && !is_array_of_symbolics(v)) || continue

0 commit comments

Comments
 (0)