Skip to content

Commit 1fee0b9

Browse files
Merge pull request #1032 from jClugstor/IntervalNonlinear_constructor_adjoints
Add adjoint rrule for IntervalNonlinearProblem constructor
2 parents 046aefe + 1a280ed commit 1fee0b9

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

ext/SciMLBaseChainRulesCoreExt.jl

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,4 +116,12 @@ function ChainRulesCore.rrule(::SciMLBase.EnsembleSolution, sim, time, converged
116116
out, EnsembleSolution_adjoint
117117
end
118118

119+
function ChainRulesCore.rrule(::Type{SciMLBase.IntervalNonlinearProblem}, args...; kwargs...)
120+
function IntervalNonlinearProblemAdjoint(ȳ)
121+
(NoTangent(), ȳ.f, ȳ.tspan, ȳ.p, ȳ.kwargs, ȳ.problem_type)
122+
end
123+
124+
SciMLBase.IntervalNonlinearProblem(args...; kwargs...), IntervalNonlinearProblemAdjoint
119125
end
126+
127+
end

0 commit comments

Comments
 (0)