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 e89e18e commit 7cb12edCopy full SHA for 7cb12ed
src/systems/nonlinear/initializesystem.jl
@@ -89,6 +89,10 @@ function generate_initializesystem(sys::AbstractSystem;
89
function process_u0map_with_dummysubs(y, x)
90
y = get(schedule.dummy_sub, y, y)
91
y = fixpoint_sub(y, diffmap)
92
+ # If we have `D(x) ~ x` and provide [D(x) => x, x => 1.0] to `u0map`, then
93
+ # without this condition `defs` would get `x => x` instead of retaining
94
+ # `x => 1.0`.
95
+ isequal(y, x) && return
96
if y ∈ vars_set
97
# variables specified in u0 overrides defaults
98
push!(defs, y => x)
0 commit comments