Skip to content

Commit

Permalink
fixup! feat: add proper remake for DDEProblem
Browse files Browse the repository at this point in the history
  • Loading branch information
AayushSabharwal committed Dec 6, 2024
1 parent 0188700 commit a6fa5b4
Showing 1 changed file with 9 additions and 12 deletions.
21 changes: 9 additions & 12 deletions src/remake.jl
Original file line number Diff line number Diff line change
Expand Up @@ -492,23 +492,20 @@ function remake(func::DDEFunction;
analytic = missing,
sys = missing,
kwargs...)
props = getproperties(func)
props = @delete props.f
@reset props.mass_matrix = coalesce(mass_matrix, func.mass_matrix)
@reset props.analytic = coalesce(analytic, func.analytic)
@reset props.sys = coalesce(sys, func.sys)

if f === missing
f = func.f
end

if mass_matrix === missing
mass_matrix = func.mass_matrix
end

if analytic === missing
analytic = func.analytic
end

if sys === missing
sys = func.sys
if f isa AbstractSciMLFunction
f = f.f
end

return DDEFunction(f; mass_matrix, analytic, sys, kwargs...)
return DDEFunction(f; props..., kwargs...)
end

function remake(prob::SDDEProblem;
Expand Down

0 comments on commit a6fa5b4

Please sign in to comment.