Skip to content

Commit

Permalink
Merge pull request #904 from SebastianM-C/patch-1
Browse files Browse the repository at this point in the history
Fix `remake` for `SCCNonlinearProblem`
  • Loading branch information
AayushSabharwal authored Jan 16, 2025
2 parents eaebe6e + f0a22a1 commit 7ed01df
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/remake.jl
Original file line number Diff line number Diff line change
Expand Up @@ -824,6 +824,9 @@ function remake(prob::SCCNonlinearProblem; u0 = missing, p = missing, probs = mi
if probs === missing
probs = prob.probs
end
if explicitfuns! === missing
explicitfuns! = prob.explictfuns!
end
offset = 0
if u0 !== missing || p !== missing && parameters_alias
probs = map(probs) do subprob
Expand Down
1 change: 1 addition & 0 deletions test/downstream/modelingtoolkit_remake.jl
Original file line number Diff line number Diff line change
Expand Up @@ -321,6 +321,7 @@ end
@test state_values(sccprob2) 2ones(3)
@test sccprob2.probs[1].u0 2ones(2)
@test sccprob2.probs[2].u0 2ones(1)
@test sccprob2.explicitfuns! !== missing

sccprob3 = remake(sccprob; p ==> 2.0])
@test sccprob3.p === sccprob3.probs[1].p
Expand Down

0 comments on commit 7ed01df

Please sign in to comment.