Skip to content

Commit 80785c5

Browse files
committed
Fix tearing reassemble
1 parent 481cada commit 80785c5

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/structural_transformation/symbolics_tearing.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -602,7 +602,7 @@ function tearing_reassemble(state::TearingState, var_eq_matching, ag = nothing;
602602
# Contract the vertices in the structure graph to make the structure match
603603
# the new reality of the system we've just created.
604604
graph = contract_variables(graph, var_eq_matching, varsperm, eqsperm,
605-
length(solved_variables))
605+
length(solved_variables), length(solved_variables_set))
606606

607607
# Update system
608608
new_var_to_diff = complete(DiffGraph(length(invvarsperm)))

src/structural_transformation/tearing.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ function masked_cumsum!(A::Vector)
2222
end
2323

2424
function contract_variables(graph::BipartiteGraph, var_eq_matching::Matching,
25-
var_rename, eq_rename, nelim)
25+
var_rename, eq_rename, nelim_eq, nelim_var)
2626
dig = DiCMOBiGraph{true}(graph, var_eq_matching)
2727

2828
# Update bipartite graph
@@ -31,7 +31,7 @@ function contract_variables(graph::BipartiteGraph, var_eq_matching::Matching,
3131
for v′ in neighborhood(dig, v, Inf; dir = :in) if var_rename[v′] != 0]
3232
end
3333

34-
newgraph = BipartiteGraph(nsrcs(graph) - nelim, ndsts(graph) - nelim)
34+
newgraph = BipartiteGraph(nsrcs(graph) - nelim_eq, ndsts(graph) - nelim_var)
3535
for e in 𝑠vertices(graph)
3636
ne = eq_rename[e]
3737
ne == 0 && continue

0 commit comments

Comments
 (0)