Skip to content

Commit 4c30760

Browse files
authored
Merge pull request #1894 from SciML/myb/irred
If the RHS of an alias doesn't appear in the equations, then it's reducible
2 parents 19a2c0e + c9ef10f commit 4c30760

File tree

2 files changed

+1
-4
lines changed

2 files changed

+1
-4
lines changed

src/structural_transformation/partial_state_selection.jl

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -289,10 +289,9 @@ function dummy_derivative_graph!(structure::SystemStructure, var_eq_matching, ja
289289
isred
290290
end
291291
for (k, (c, v)) in ag
292-
isreducible(k) || push!(irreducible_set, k)
293292
isreducible(k) || push!(irreducible_set, k)
294293
iszero(c) && continue
295-
push!(irreducible_set, v)
294+
isempty(𝑑neighbors(graph, v)) || push!(irreducible_set, v)
296295
end
297296
end
298297

src/systems/systemstructure.jl

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,6 @@ function TearingState(sys; quick_cancel = false, check = true)
206206
ivs = independent_variables(sys)
207207
eqs = copy(equations(sys))
208208
neqs = length(eqs)
209-
algeqs = trues(neqs)
210209
dervaridxs = OrderedSet{Int}()
211210
var2idx = Dict{Any, Int}()
212211
symbolic_incidence = []
@@ -259,7 +258,6 @@ function TearingState(sys; quick_cancel = false, check = true)
259258
push!(symbolic_incidence, copy(statevars))
260259
empty!(statevars)
261260
empty!(vars)
262-
algeqs[i] = isalgeq
263261
if isalgeq
264262
eqs[i] = eq
265263
else

0 commit comments

Comments
 (0)