Skip to content

Commit

Permalink
Scalarize initial conditions of vectors
Browse files Browse the repository at this point in the history
  • Loading branch information
hersle committed Oct 3, 2024
1 parent 5cf19a9 commit e9a06c5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/systems/nonlinear/initializesystem.jl
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ function generate_initializesystem(sys::ODESystem;
push!(defs, y => x)
elseif y isa Symbolics.Arr
# TODO: don't scalarize arrays
push!(defs, (collect(y) .=> x)...)
merge!(defs, Dict(scalarize(y .=> x)))
elseif y isa Symbolics.BasicSymbolic
# y is a derivative expression expanded; add it to the initialization equations
push!(eqs_ics, y ~ x)
Expand Down

0 comments on commit e9a06c5

Please sign in to comment.