|
72 | 72 | f, u0, tspan, p, StandardODEProblem(); kwargs...)) |
73 | 73 | end |
74 | 74 |
|
| 75 | +""" |
| 76 | +```julia |
| 77 | +SciMLBase.SteadyStateProblem(sys::System, u0map, |
| 78 | + parammap = DiffEqBase.NullParameters(); |
| 79 | + version = nothing, tgrad = false, |
| 80 | + jac = false, |
| 81 | + checkbounds = false, sparse = false, |
| 82 | + linenumbers = true, parallel = SerialForm(), |
| 83 | + kwargs...) where {iip} |
| 84 | +``` |
| 85 | +
|
| 86 | +Generates an SteadyStateProblem from a `System` of ODEs and allows for automatically |
| 87 | +symbolically calculating numerical enhancements. |
| 88 | +""" |
| 89 | +@fallback_iip_specialize function DiffEqBase.SteadyStateProblem{iip, spec}( |
| 90 | + sys::System, u0map, |
| 91 | + parammap = SciMLBase.NullParameters(); check_length = true, |
| 92 | + check_compatibility = true, kwargs...) where {iip, spec} |
| 93 | + check_complete(sys, SteadyStateProblem) |
| 94 | + check_compatibility && check_compatible_system(SteadyStateProblem, sys) |
| 95 | + |
| 96 | + f, u0, p = process_SciMLProblem(ODEFunction{iip}, sys, u0map, parammap; |
| 97 | + steady_state = true, check_length, check_compatibility, |
| 98 | + force_initialization_time_independent = true, kwargs...) |
| 99 | + |
| 100 | + kwargs = process_kwargs(sys; kwargs...) |
| 101 | + # Call `remake` so it runs initialization if it is trivial |
| 102 | + remake(SteadyStateProblem{iip}(f, u0, p; kwargs...)) |
| 103 | +end |
| 104 | + |
75 | 105 | function check_compatible_system( |
76 | | - T::Union{Type{ODEFunction}, Type{ODEProblem}, Type{DAEFunction}, Type{DAEProblem}}, |
| 106 | + T::Union{Type{ODEFunction}, Type{ODEProblem}, Type{DAEFunction}, |
| 107 | + Type{DAEProblem}, Type{SteadyStateProblem}}, |
77 | 108 | sys::System) |
78 | 109 | check_time_dependent(sys, T) |
79 | 110 | check_not_dde(sys) |
|
0 commit comments