Skip to content

Commit

Permalink
Merge pull request #867 from AayushSabharwal/as/daeprob-constructorof
Browse files Browse the repository at this point in the history
feat: add `constructorof` for `DAEProblem`
  • Loading branch information
AayushSabharwal authored Nov 21, 2024
2 parents b85639c + 0a12753 commit b2d61f6
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/problems/dae_problems.jl
Original file line number Diff line number Diff line change
Expand Up @@ -112,3 +112,10 @@ end
function DAEProblem(f, du0, u0, tspan, p = NullParameters(); kwargs...)
DAEProblem(DAEFunction(f), du0, u0, tspan, p; kwargs...)
end

function ConstructionBase.constructorof(::Type{P}) where {P <: DAEProblem}
function ctor(f, du0, u0, tspan, p, kw, dv)
iip = isinplace(f)
return DAEProblem{iip}(f, du0, u0, tspan, p; differential_vars = dv, kw...)
end
end

0 comments on commit b2d61f6

Please sign in to comment.