Skip to content

Commit

Permalink
feat: add constructorof for DAEProblem
Browse files Browse the repository at this point in the history
  • Loading branch information
AayushSabharwal committed Nov 21, 2024
1 parent b44504b commit 0a12753
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 0a12753

Please sign in to comment.