Skip to content

Commit 1071ec8

Browse files
Only apply AD overloads to out-of-place
These methods are only tested for out-of-place functions right now, and the tests in OrdinaryDiffEq are seeing that they fail on in-place functions. So this changes the dispatches so they only apply when they are known to work. The in-place versions should be added in the future.
1 parent 143a966 commit 1071ec8

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "NonlinearSolve"
22
uuid = "8913a72c-1f9b-4ce2-8d82-65094dcecaec"
33
authors = ["SciML"]
4-
version = "2.1.0"
4+
version = "2.1.1"
55

66
[deps]
77
ADTypes = "47edcb42-4c32-4615-8424-f2b9edc5f35b"

src/ad.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,15 +26,15 @@ function scalar_nlsolve_ad(prob, alg, args...; kwargs...)
2626
end
2727

2828
function SciMLBase.solve(prob::NonlinearProblem{<:Union{Number, SVector, <:AbstractArray},
29-
iip, <:Dual{T, V, P}}, alg::AbstractNewtonAlgorithm, args...;
30-
kwargs...) where {iip, T, V, P}
29+
false, <:Dual{T, V, P}}, alg::AbstractNewtonAlgorithm, args...;
30+
kwargs...) where {T, V, P}
3131
sol, partials = scalar_nlsolve_ad(prob, alg, args...; kwargs...)
3232
dual_soln = scalar_nlsolve_dual_soln(sol.u, partials, prob.p)
3333
return SciMLBase.build_solution(prob, alg, dual_soln, sol.resid; sol.retcode)
3434
end
3535

3636
function SciMLBase.solve(prob::NonlinearProblem{<:Union{Number, SVector, <:AbstractArray},
37-
iip, <:AbstractArray{<:Dual{T, V, P}}}, alg::AbstractNewtonAlgorithm, args...;
37+
false, <:AbstractArray{<:Dual{T, V, P}}}, alg::AbstractNewtonAlgorithm, args...;
3838
kwargs...) where {iip, T, V, P}
3939
sol, partials = scalar_nlsolve_ad(prob, alg, args...; kwargs...)
4040
dual_soln = scalar_nlsolve_dual_soln(sol.u, partials, prob.p)

0 commit comments

Comments
 (0)