Skip to content

Commit

Permalink
fixup! fix: fix @reset changing specialization of ODEFunction
Browse files Browse the repository at this point in the history
  • Loading branch information
AayushSabharwal committed Jul 22, 2024
1 parent b0e7699 commit 5662ad2
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/remake.jl
Original file line number Diff line number Diff line change
Expand Up @@ -126,10 +126,18 @@ function remake(prob::ODEProblem; f = missing,
else
_f = prob.f
if __has_initializeprob(_f)
_f = parameterless_type(_f){iip, specialization(_f)}(; getproperties(_f)..., initializeprob)
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)
_f = parameterless_type(_f){iip, specialization(_f)}(; getproperties(_f)..., initializeprobmap)
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
Expand Down

0 comments on commit 5662ad2

Please sign in to comment.