Skip to content

Commit d7a4d4d

Browse files
committed
Don't check newly added variables in the original graph
1 parent 34b59c7 commit d7a4d4d

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
@@ -125,9 +125,11 @@ function alias_elimination!(state::TearingState; kwargs...)
125125

126126
lineqs = BitSet(mm.nzrows)
127127
eqs_to_update = BitSet()
128+
nvs_orig = ndsts(graph_orig)
128129
for k in keys(ag)
129130
# We need to update `D(D(x))` when we subsitute `D(x)` as well.
130131
while true
132+
k > nvs_orig && break
131133
for ieq in 𝑑neighbors(graph_orig, k)
132134
ieq in lineqs && continue
133135
new_eq = old_to_new_eq[ieq]

0 commit comments

Comments
 (0)