@@ -230,7 +230,7 @@ function StateSelection.find_eq_solvables!(state::TearingState, ieq, to_rm = Int
230230 conservative = false ,
231231 symbolically_rm_singular = true ,
232232 kwargs... )
233- (; fullvars) = state
233+ (; fullvars, sys ) = state
234234 (; graph, solvable_graph) = state. structure
235235
236236 eq = equations (state)[ieq]
@@ -249,7 +249,7 @@ function StateSelection.find_eq_solvables!(state::TearingState, ieq, to_rm = Int
249249 for j in 𝑠neighbors (graph, ieq)
250250 var = fullvars[j]
251251 MTKBase. isirreducible (var) && (all_int_vars = false ; continue )
252- a, b, islinear = Symbolics . LinearExpander (var; strict = true )(term)
252+ a, b, islinear = MTKBase . get_linear_expander_for! (sys, var, true )(term)
253253 islinear || (all_int_vars = false ; continue )
254254 if ! SU. isconst (a)
255255 all_int_vars = false
@@ -291,7 +291,7 @@ function StateSelection.find_eq_solvables!(state::TearingState, ieq, to_rm = Int
291291 rem_edge! (graph, ieq, j)
292292 symbolically_rm_singular || continue
293293 eq = equations (state)[ieq]
294- a, b, islin = Symbolics . LinearExpander ( fullvars[j]; strict = true )(eq. rhs)
294+ a, b, islin = MTKBase . get_linear_expander_for! (sys, fullvars[j], true )(eq. rhs)
295295 SU. _iszero (a) && islin || continue
296296 equations (state)[ieq] = eq. lhs ~ b
297297 end
0 commit comments