Skip to content

Commit 0a12753

Browse files
feat: add constructorof for DAEProblem
1 parent b44504b commit 0a12753

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/problems/dae_problems.jl

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,3 +112,10 @@ end
112112
function DAEProblem(f, du0, u0, tspan, p = NullParameters(); kwargs...)
113113
DAEProblem(DAEFunction(f), du0, u0, tspan, p; kwargs...)
114114
end
115+
116+
function ConstructionBase.constructorof(::Type{P}) where {P <: DAEProblem}
117+
function ctor(f, du0, u0, tspan, p, kw, dv)
118+
iip = isinplace(f)
119+
return DAEProblem{iip}(f, du0, u0, tspan, p; differential_vars = dv, kw...)
120+
end
121+
end

0 commit comments

Comments
 (0)