Skip to content

Commit 39f2438

Browse files
format
1 parent 4fe86d3 commit 39f2438

File tree

2 files changed

+18
-17
lines changed

2 files changed

+18
-17
lines changed

ext/SciMLBaseChainRulesCoreExt.jl

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,9 @@ function ChainRulesCore.rrule(::Type{ODEProblem}, args...; kwargs...)
6565
ODEProblem(args...; kwargs...), ODEProblemAdjoint
6666
end
6767

68-
function ChainRulesCore.rrule(::Type{
69-
<:ODEProblem{iip, T}}, args...; kwargs...) where {iip, T}
68+
function ChainRulesCore.rrule(
69+
::Type{
70+
<:ODEProblem{iip, T}}, args...; kwargs...) where {iip, T}
7071
function ODEProblemAdjoint(ȳ)
7172
(NoTangent(), ȳ.f, ȳ.u0, ȳ.tspan, ȳ.p, ȳ.kwargs, ȳ.problem_type)
7273
end

src/scimlfunctions.jl

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2573,21 +2573,21 @@ end
25732573
(f::ODEFunction)(args...) = f.f(args...)
25742574

25752575
@static if isdefined(SciMLOperators, :isv1)
2576-
function (f::ODEFunction)(du, u, p, t)
2577-
if f.f isa AbstractSciMLOperator
2578-
f.f(du, u, u, p, t)
2579-
else
2580-
f.f(du, u, p, t)
2581-
end
2582-
end
2583-
2584-
function (f::ODEFunction)(u, p, t)
2585-
if f.f isa AbstractSciMLOperator
2586-
f.f(u, u, p, t)
2587-
else
2588-
f.f(u, p, t)
2589-
end
2590-
end
2576+
function (f::ODEFunction)(du, u, p, t)
2577+
if f.f isa AbstractSciMLOperator
2578+
f.f(du, u, u, p, t)
2579+
else
2580+
f.f(du, u, p, t)
2581+
end
2582+
end
2583+
2584+
function (f::ODEFunction)(u, p, t)
2585+
if f.f isa AbstractSciMLOperator
2586+
f.f(u, u, p, t)
2587+
else
2588+
f.f(u, p, t)
2589+
end
2590+
end
25912591
end
25922592

25932593
(f::NonlinearFunction)(args...) = f.f(args...)

0 commit comments

Comments
 (0)