Skip to content

Commit b297f09

Browse files
fixup! feat: support parameter updates in initialize_dae!
1 parent f66560f commit b297f09

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

lib/OrdinaryDiffEqCore/src/initialize_dae.jl

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,10 @@ end
152152
function _initialize_dae!(integrator, prob::Union{ODEProblem, DAEProblem},
153153
alg::OverrideInit, isinplace::Union{Val{true}, Val{false}})
154154
initializeprob = prob.f.initializeprob
155-
prob.f.update_initializeprob!(initializeprob, prob)
155+
156+
if SciMLBase.has_update_initializeprob!(prob.f)
157+
prob.f.update_initializeprob!(initializeprob, prob)
158+
end
156159

157160
# If it doesn't have autodiff, assume it comes from symbolic system like ModelingToolkit
158161
# Since then it's the case of not a DAE but has initializeprob

0 commit comments

Comments
 (0)