Skip to content

Commit 7059862

Browse files
authored
Merge pull request #2095 from SciML/myb/alias_fxi
Don't check newly added variables in the original graph
2 parents 25099f8 + d7a4d4d commit 7059862

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/systems/alias_elimination.jl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,9 +123,11 @@ function alias_elimination!(state::TearingState; kwargs...)
123123

124124
lineqs = BitSet(mm.nzrows)
125125
eqs_to_update = BitSet()
126+
nvs_orig = ndsts(graph_orig)
126127
for k in keys(ag)
127128
# We need to update `D(D(x))` when we subsitute `D(x)` as well.
128129
while true
130+
k > nvs_orig && break
129131
for ieq in 𝑑neighbors(graph_orig, k)
130132
ieq in lineqs && continue
131133
new_eq = old_to_new_eq[ieq]

0 commit comments

Comments
 (0)