Skip to content

Commit 2e5b043

Browse files
feat: implement constructorof for SteadyStateProblem
1 parent fa81653 commit 2e5b043

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

src/problems/steady_state_problems.jl

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,17 @@ function SteadyStateProblem(f, u0, p = NullParameters(); kwargs...)
113113
SteadyStateProblem(ODEFunction(f), u0, p; kwargs...)
114114
end
115115

116+
function ConstructionBase.constructorof(::Type{P}) where {P <: SteadyStateProblem}
117+
function ctor(f, u0, p, kw)
118+
if f isa AbstractODEFunction
119+
iip = isinplace(f)
120+
else
121+
iip = isinplace(f, 4)
122+
end
123+
return SteadyStateProblem{iip}(f, u0, p; kw...)
124+
end
125+
end
126+
116127
"""
117128
$(SIGNATURES)
118129

0 commit comments

Comments
 (0)