From b297f091075aed279e1def0b2c0a086a6019a93b Mon Sep 17 00:00:00 2001 From: Aayush Sabharwal Date: Thu, 26 Sep 2024 15:50:09 +0530 Subject: [PATCH] fixup! feat: support parameter updates in `initialize_dae!` --- lib/OrdinaryDiffEqCore/src/initialize_dae.jl | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/OrdinaryDiffEqCore/src/initialize_dae.jl b/lib/OrdinaryDiffEqCore/src/initialize_dae.jl index 73ce2af5fc..e88deeef1a 100644 --- a/lib/OrdinaryDiffEqCore/src/initialize_dae.jl +++ b/lib/OrdinaryDiffEqCore/src/initialize_dae.jl @@ -152,7 +152,10 @@ end function _initialize_dae!(integrator, prob::Union{ODEProblem, DAEProblem}, alg::OverrideInit, isinplace::Union{Val{true}, Val{false}}) initializeprob = prob.f.initializeprob - prob.f.update_initializeprob!(initializeprob, prob) + + if SciMLBase.has_update_initializeprob!(prob.f) + prob.f.update_initializeprob!(initializeprob, prob) + end # If it doesn't have autodiff, assume it comes from symbolic system like ModelingToolkit # Since then it's the case of not a DAE but has initializeprob