Skip to content

Commit d948f07

Browse files
committed
add prob tracking
1 parent 1b2a7bc commit d948f07

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

ext/SciMLBaseChainRulesCoreExt.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -118,12 +118,12 @@ end
118118

119119
function ChainRulesCore.rrule(
120120
::Type{<:SciMLBase.NonlinearSolution{
121-
T, N, uType, R, P, A, O, uType2, S, Tr}}, u,
121+
T, N, uType, R, P, A, O, uType2, S, Tr}}, u, resid, prob,
122122
args...) where {T, N, uType, R, P, A, O, uType2, S, Tr}
123123
function NonlinearSolutionAdjoint(ȳ)
124-
(NoTangent(), ȳ.u, ntuple(_ -> NoTangent(), length(args))...)
124+
(NoTangent(), ȳ.u, NoTangent(), ŷ.prob, ntuple(_ -> NoTangent(), length(args))...)
125125
end
126-
SciMLBase.NonlinearSolution{T, N, uType, R, P, A, O, uType2, S, Tr}(u, args...),
126+
SciMLBase.NonlinearSolution{T, N, uType, R, P, A, O, uType2, S, Tr}(u, resid, prob, args...),
127127
NonlinearSolutionAdjoint
128128
end
129129

0 commit comments

Comments
 (0)