Skip to content

Commit ec11526

Browse files
Merge pull request #918 from SebastianM-C/smc/remake
fix: make sure remake(::SCCNonlinearProblem) doesn't drop prob.f.sys
2 parents 2eded1b + 1efeb24 commit ec11526

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

src/remake.jl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -833,6 +833,9 @@ function remake(prob::SCCNonlinearProblem; u0 = missing, p = missing, probs = mi
833833
if explicitfuns! === missing
834834
explicitfuns! = prob.explictfuns!
835835
end
836+
if sys === missing
837+
sys = prob.f.sys
838+
end
836839
offset = 0
837840
if u0 !== missing || p !== missing && parameters_alias
838841
probs = map(probs) do subprob

test/downstream/modelingtoolkit_remake.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -324,6 +324,7 @@ end
324324
@test sccprob2.probs[1].u0 2ones(2)
325325
@test sccprob2.probs[2].u0 2ones(1)
326326
@test sccprob2.explicitfuns! !== missing
327+
@test sccprob2.f.sys !== missing
327328

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

0 commit comments

Comments
 (0)