Skip to content

Commit 8dc7f45

Browse files
committed
Return complete_mm as well
1 parent 8edd588 commit 8dc7f45

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/systems/alias_elimination.jl

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ function alias_eliminate_graph!(state::TransformationState)
88
mm = linear_subsys_adjmat(state)
99
if size(mm, 1) == 0
1010
ag = AliasGraph(ndsts(state.structure.graph))
11-
return ag, ag, mm, BitSet() # No linear subsystems
11+
return ag, ag, mm, mm, BitSet() # No linear subsystems
1212
end
1313

1414
@unpack graph, var_to_diff = state.structure
@@ -42,7 +42,7 @@ alias_elimination(sys) = alias_elimination!(TearingState(sys; quick_cancel = tru
4242
function alias_elimination!(state::TearingState)
4343
sys = state.sys
4444
complete!(state.structure)
45-
ag, complete_ag, mm, updated_diff_vars = alias_eliminate_graph!(state)
45+
ag, mm, complete_ag, complete_mm, updated_diff_vars = alias_eliminate_graph!(state)
4646
isempty(ag) && return sys
4747

4848
fullvars = state.fullvars
@@ -801,7 +801,8 @@ function alias_eliminate_graph!(graph, var_to_diff, mm_orig::SparseMatrixCLIL)
801801
update_graph_neighbors!(graph, ag)
802802
end
803803

804-
return ag, complete_ag, mm, updated_diff_vars
804+
complete_mm = reduce!(copy(echelon_mm), mm_orig, complete_ag, size(echelon_mm, 1))
805+
return ag, mm, complete_ag, complete_mm, updated_diff_vars
805806
end
806807

807808
function update_graph_neighbors!(graph, ag)

0 commit comments

Comments
 (0)