diff --git a/Project.toml b/Project.toml index 106c78828..bb435aa35 100644 --- a/Project.toml +++ b/Project.toml @@ -1,7 +1,7 @@ name = "NonlinearSolve" uuid = "8913a72c-1f9b-4ce2-8d82-65094dcecaec" authors = ["SciML"] -version = "3.5.2" +version = "3.5.3" [deps] ADTypes = "47edcb42-4c32-4615-8424-f2b9edc5f35b" diff --git a/src/algorithms/trust_region.jl b/src/algorithms/trust_region.jl index 95e04cef3..7f550a65c 100644 --- a/src/algorithms/trust_region.jl +++ b/src/algorithms/trust_region.jl @@ -26,7 +26,8 @@ function TrustRegion(; concrete_jac = nothing, linsolve = nothing, precs = DEFAU shrink_factor::Real = 1 // 4, expand_factor::Real = 2 // 1, max_shrink_times::Int = 32, autodiff = nothing, vjp_autodiff = nothing) descent = Dogleg(; linsolve, precs) - if autodiff isa Union{ADTypes.AbstractForwardMode, ADTypes.AbstractFiniteDifferencesMode} + if autodiff isa + Union{ADTypes.AbstractForwardMode, ADTypes.AbstractFiniteDifferencesMode} forward_ad = autodiff else forward_ad = nothing diff --git a/test/misc/polyalgs.jl b/test/misc/polyalgs.jl index 047ba0933..1709aa018 100644 --- a/test/misc/polyalgs.jl +++ b/test/misc/polyalgs.jl @@ -93,8 +93,8 @@ end maxiters = 10) end -no_ad_fast = FastShortcutNonlinearPolyalg(autodiff=AutoFiniteDiff()) -no_ad_robust = RobustMultiNewton(autodiff=AutoFiniteDiff()) +no_ad_fast = FastShortcutNonlinearPolyalg(autodiff = AutoFiniteDiff()) +no_ad_robust = RobustMultiNewton(autodiff = AutoFiniteDiff()) no_ad_algs = Set([no_ad_fast, no_ad_robust, no_ad_fast.algs..., no_ad_robust.algs...]) @testset "[IIP] no AD" begin f_iip = Base.Experimental.@opaque (du, u, p) -> du .= u .* u .- p