Skip to content

Commit 7d174b2

Browse files
refactor: union-split process_SciMLProblem call in ODEProblem ctor
1 parent f1440e3 commit 7d174b2

1 file changed

Lines changed: 13 additions & 6 deletions

File tree

lib/ModelingToolkitBase/src/problems/odeproblem.jl

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -108,12 +108,19 @@ Base.@nospecializeinfer @fallback_iip_specialize function SciMLBase.ODEProblem{i
108108
check_compatibility && check_compatible_system(ODEProblem, sys)
109109

110110
_iip = resolve_iip(iip, op)
111-
f, u0,
112-
p = process_SciMLProblem(
113-
ODEFunction{_iip, spec}, sys, op;
114-
t = tspan !== nothing ? tspan[1] : tspan, check_length, eval_expression,
115-
eval_module, expression, check_compatibility, kwargs...
116-
)
111+
if _iip === true
112+
f, u0, p = process_SciMLProblem(
113+
ODEFunction{true, spec}, sys, op;
114+
t = tspan !== nothing ? tspan[1] : tspan, check_length, eval_expression,
115+
eval_module, expression, check_compatibility, kwargs...
116+
)
117+
else
118+
f, u0, p = process_SciMLProblem(
119+
ODEFunction{false, spec}, sys, op;
120+
t = tspan !== nothing ? tspan[1] : tspan, check_length, eval_expression,
121+
eval_module, expression, check_compatibility, kwargs...
122+
)
123+
end
117124

118125
kwargs = process_kwargs(
119126
sys; expression, callback, eval_expression, eval_module, op, _skip_events, tspan, kwargs...

0 commit comments

Comments
 (0)