Skip to content

Commit 7920626

Browse files
Fix initialization size to not try/catch
1 parent 6a6efe5 commit 7920626

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/initialize_dae.jl

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -528,9 +528,10 @@ function _initialize_dae!(integrator, prob::ODEProblem,
528528
if isAD
529529
csize = count(algebraic_vars)
530530
if !(p isa SciMLBase.NullParameters) && typeof(_u) !== typeof(u)
531-
try
531+
if SciMLSturctures.isscimlstructure(p)
532532
csize = max(csize, length(canonicalize(Tunable(), p)[1]))
533-
catch
533+
else
534+
csize = max(csize, length(p))
534535
end
535536
end
536537
chunk = ForwardDiff.pickchunksize(csize)

0 commit comments

Comments
 (0)