Skip to content

Commit b1537de

Browse files
RFC: Expand derivatives in initialization equations before dummy derivative mapping
This handles cases like `D(-x) ~ 0` which can happen during the fixed point substitution The issue though is that if we have `D(y) ~ 0`, `y ~ -x`, then we need to substitute `D(-x) ~ 0` then change to `-D(x) ~ 0` and then substitute, so we need to somehow know to expand in the middle there.
1 parent ac38df6 commit b1537de

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/systems/nonlinear/initializesystem.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ function generate_initializesystem(sys::ODESystem;
7777
if !algebraic_only
7878
initialization_eqs = [get_initialization_eqs(sys); initialization_eqs]
7979
for eq in initialization_eqs
80-
eq = fixpoint_sub(eq, diffmap) # expand dummy derivatives
80+
eq = fixpoint_sub(expand_derivatives(eq), diffmap) # expand dummy derivatives
8181
push!(eqs_ics, eq)
8282
end
8383
end

0 commit comments

Comments
 (0)