Skip to content

Commit

Permalink
fix: reorder system in SCCNonlinearProblem
Browse files Browse the repository at this point in the history
  • Loading branch information
AayushSabharwal committed Nov 26, 2024
1 parent 5910eb5 commit 38c2906
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/systems/nonlinear/nonlinearsystem.jl
Original file line number Diff line number Diff line change
Expand Up @@ -698,6 +698,10 @@ function SciMLBase.SCCNonlinearProblem{iip}(sys::NonlinearSystem, u0map,
push!(subprobs, prob)
end

new_dvs = dvs[reduce(vcat, var_sccs)]
new_eqs = eqs[reduce(vcat, eq_sccs)]
@set! sys.unknowns = new_dvs
@set! sys.eqs = new_eqs
return SCCNonlinearProblem(subprobs, explicitfuns, sys, p)
end

Expand Down

0 comments on commit 38c2906

Please sign in to comment.