Skip to content

Commit 031520d

Browse files
committed
add prob tracking
1 parent 925d6f1 commit 031520d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

ext/SciMLBaseChainRulesCoreExt.jl

+3-3
Original file line numberDiff line numberDiff line change
@@ -116,12 +116,12 @@ end
116116

117117
function ChainRulesCore.rrule(
118118
::Type{<:SciMLBase.NonlinearSolution{
119-
T, N, uType, R, P, A, O, uType2, S, Tr}}, u,
119+
T, N, uType, R, P, A, O, uType2, S, Tr}}, u, resid, prob,
120120
args...) where {T, N, uType, R, P, A, O, uType2, S, Tr}
121121
function NonlinearSolutionAdjoint(ȳ)
122-
(NoTangent(), ȳ.u, ntuple(_ -> NoTangent(), length(args))...)
122+
(NoTangent(), ȳ.u, NoTangent(), ŷ.prob, ntuple(_ -> NoTangent(), length(args))...)
123123
end
124-
SciMLBase.NonlinearSolution{T, N, uType, R, P, A, O, uType2, S, Tr}(u, args...),
124+
SciMLBase.NonlinearSolution{T, N, uType, R, P, A, O, uType2, S, Tr}(u, resid, prob, args...),
125125
NonlinearSolutionAdjoint
126126
end
127127

0 commit comments

Comments
 (0)