Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: fix remake changing specialization of ODEFunction #740

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading