We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d648bc1 commit aa3f485Copy full SHA for aa3f485
src/systems/nonlinear/initializesystem.jl
@@ -48,13 +48,12 @@ function generate_initializesystem(sys::ODESystem;
48
# defer initialization until defaults are merged below
49
push!(filtered_u0, y => x[2])
50
elseif y isa Symbolics.Arr
51
+ # scalarize array # TODO: don't scalarize arrays
52
_y = collect(y)
-
53
- # TODO: Don't scalarize arrays
54
- for i in 1:length(_y)
+ for i in eachindex(_y)
55
push!(filtered_u0, _y[i] => x[2][i])
56
end
57
- elseif y isa ModelingToolkit.BasicSymbolic
+ elseif y isa Symbolics.BasicSymbolic
58
# y is a derivative expression expanded
59
# add to the initialization equations
60
push!(eqs_ics, y ~ x[2])
0 commit comments