@@ -579,9 +579,8 @@ function SCCNonlinearFunction{iip}(
579579 wrap_code = wrap_assignments (false , assignments) .∘
580580 (wrap_array_vars (sys, rhss; dvs = _dvs, cachesyms)) .∘
581581 wrap_parameter_dependencies (sys, false )
582- @show _dvs
583582 f_gen = build_function (
584- rhss, _dvs, ps ... , cachesyms... ; wrap_code, expression = Val{true })
583+ rhss, _dvs, rps ... , cachesyms... ; wrap_code, expression = Val{true })
585584 f_oop, f_iip = eval_or_rgf .(f_gen; eval_expression, eval_module)
586585
587586 f (u, p) = f_oop (u, p)
@@ -608,11 +607,9 @@ function SciMLBase.SCCNonlinearProblem{iip}(sys::NonlinearSystem, u0map,
608607
609608 ts = get_tearing_state (sys)
610609 var_eq_matching, var_sccs = StructuralTransformations. algebraic_variables_scc (ts)
611- condensed_graph = StructuralTransformations. MatchedCondensationGraph (
612- StructuralTransformations. DiCMOBiGraph {true} (ts. structure. graph, var_eq_matching),
613- var_sccs)
614- toporder = topological_sort_by_dfs (condensed_graph)
615- var_sccs = var_sccs[toporder]
610+ # The system is simplified, so SCCs are already in sorted order. We just need to get them and sort
611+ # according to index in unknowns(sys)
612+ sort! (var_sccs)
616613 eq_sccs = map (Base. Fix1 (getindex, var_eq_matching), var_sccs)
617614
618615 dvs = unknowns (sys)
0 commit comments