@@ -16,7 +16,8 @@ function ChainRulesCore.rrule(
1616 j:: Integer )
1717 function ODESolution_getindex_pullback (Δ)
1818 i = symbolic_type (sym) != NotSymbolic () ? variable_index (VA, sym) : sym
19- du, dprob = if i === nothing
19+ du,
20+ dprob = if i === nothing
2021 getter = getobserved (VA)
2122 grz = rrule_via_ad (config, getter, sym, VA. u[j], VA. prob. p, VA. t[j])[2 ](Δ)
2223 du = [k == j ? grz[3 ] : zero (VA. u[1 ]) for k in 1 : length (VA. u)]
@@ -64,8 +65,9 @@ function ChainRulesCore.rrule(::Type{ODEProblem}, args...; kwargs...)
6465 ODEProblem (args... ; kwargs... ), ODEProblemAdjoint
6566end
6667
67- function ChainRulesCore. rrule (:: Type {
68- <: ODEProblem{iip, T} }, args... ; kwargs... ) where {iip, T}
68+ function ChainRulesCore. rrule (
69+ :: Type {
70+ <: ODEProblem{iip, T} }, args... ; kwargs... ) where {iip, T}
6971 function ODEProblemAdjoint (ȳ)
7072 (NoTangent (), ȳ. f, ȳ. u0, ȳ. tspan, ȳ. p, ȳ. kwargs, ȳ. problem_type)
7173 end
@@ -92,7 +94,8 @@ function ChainRulesCore.rrule(
9294 (NoTangent (), ȳ, ntuple (_ -> NoTangent (), length (args))... )
9395 end
9496
95- ODESolution {T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16} (u, args... ),
97+ ODESolution {T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16} (
98+ u, args... ),
9699 ODESolutionAdjoint
97100end
98101
@@ -108,7 +111,7 @@ function ChainRulesCore.rrule(
108111 end
109112
110113 RODESolution{T1, T2, T3, T4, T5, T6, T7, T8, T9, T10,
111- T11, T12, T13, T14}(u, args... ),
114+ T11, T12, T13, T14}(u, args... ),
112115 RODESolutionAdjoint
113116end
114117
@@ -125,12 +128,13 @@ function ChainRulesCore.rrule(::SciMLBase.EnsembleSolution, sim, time, converged
125128 out, EnsembleSolution_adjoint
126129end
127130
128- function ChainRulesCore. rrule (:: Type{SciMLBase.IntervalNonlinearProblem} , args... ; kwargs... )
131+ function ChainRulesCore. rrule (
132+ :: Type{SciMLBase.IntervalNonlinearProblem} , args... ; kwargs... )
129133 function IntervalNonlinearProblemAdjoint (ȳ)
130134 (NoTangent (), ȳ. f, ȳ. tspan, ȳ. p, ȳ. kwargs, ȳ. problem_type)
131135 end
132136
133137 SciMLBase. IntervalNonlinearProblem (args... ; kwargs... ), IntervalNonlinearProblemAdjoint
134138end
135139
136- end
140+ end
0 commit comments