Skip to content

Commit

Permalink
Merge pull request #740 from AayushSabharwal/as/fix-remake-specializa…
Browse files Browse the repository at this point in the history
…tion

fix: fix `remake` changing specialization of `ODEFunction`
  • Loading branch information
ChrisRackauckas authored Jul 22, 2024
2 parents 9978e5b + d2c7570 commit 12b8832
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions src/remake.jl
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,20 @@ function remake(prob::ODEProblem; f = missing,
end
else
_f = prob.f
@reset _f.initializeprob = initializeprob
@reset _f.initializeprobmap = initializeprobmap
if __has_initializeprob(_f)
props = getproperties(_f)
@reset props.initializeprob = initializeprob
props = values(props)
_f = parameterless_type(_f){
iip, specialization(_f), map(typeof, props)...}(props...)
end
if __has_initializeprobmap(_f)
props = getproperties(_f)
@reset props.initializeprobmap = initializeprobmap
props = values(props)
_f = parameterless_type(_f){
iip, specialization(_f), map(typeof, props)...}(props...)
end
end
elseif f isa AbstractODEFunction
_f = f
Expand Down

0 comments on commit 12b8832

Please sign in to comment.