Skip to content

Commit 5073358

Browse files
committed
fix: :wrappers testing
1 parent 2f36ade commit 5073358

4 files changed

+7
-4
lines changed

ext/NonlinearSolveMINPACKExt.jl

+2-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@ function SciMLBase.__solve(
2828
original = MINPACK.fsolve(
2929
f!, u0, m; tol, show_trace, tracing, method, iterations = maxiters)
3030
else
31-
_jac! = NonlinearSolve.__construct_extension_jac(prob, alg, u0, resid; alg.autodiff)
31+
autodiff = alg.autodiff === missing ? nothing : alg.autodiff
32+
_jac! = NonlinearSolve.__construct_extension_jac(prob, alg, u0, resid; autodiff)
3233
jac! = @closure (J, u) -> (_jac!(J, u); Cint(0))
3334
original = MINPACK.fsolve(
3435
f!, jac!, u0, m; tol, show_trace, tracing, method, iterations = maxiters)

ext/NonlinearSolveNLsolveExt.jl

+2-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@ function SciMLBase.__solve(
1818
if prob.f.jac === nothing && alg.autodiff isa Symbol
1919
df = OnceDifferentiable(f!, u0, resid; alg.autodiff)
2020
else
21-
jac! = NonlinearSolve.__construct_extension_jac(prob, alg, u0, resid; alg.autodiff)
21+
autodiff = alg.autodiff isa Symbol ? nothing : alg.autodiff
22+
jac! = NonlinearSolve.__construct_extension_jac(prob, alg, u0, resid; autodiff)
2223
if prob.f.jac_prototype === nothing
2324
J = similar(
2425
u0, promote_type(eltype(u0), eltype(resid)), length(u0), length(resid))

ext/NonlinearSolveSIAMFANLEquationsExt.jl

+2-1
Original file line numberDiff line numberDiff line change
@@ -91,10 +91,11 @@ function SciMLBase.__solve(prob::NonlinearProblem, alg::SIAMFANLEquationsJL, arg
9191
f, u, m, zeros(T, N, 2 * m + 4); atol, rtol, maxit = maxiters, beta)
9292
end
9393
else
94+
autodiff = alg.autodiff === missing ? nothing : alg.autodiff
9495
FPS = prob.f.jac_prototype !== nothing ? zero(prob.f.jac_prototype) :
9596
__zeros_like(u, N, N)
9697
jac = NonlinearSolve.__construct_extension_jac(
97-
prob, alg, u, resid; alg.autodiff)
98+
prob, alg, u, resid; autodiff)
9899
AJ! = @closure (J, u, x) -> jac(J, x)
99100
if method == :newton
100101
sol = nsol(f, u, FS, FPS, AJ!; sham = 1, atol,

src/algorithms/pseudo_transient.jl

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ This implementation specifically uses "switched evolution relaxation"
1717
"""
1818
function PseudoTransient(;
1919
concrete_jac = nothing, linsolve = nothing, linesearch = nothing,
20-
precs = DEFAULT_PRECS, alpha_initial = 1e-3, autodiff = nothing,
20+
precs = DEFAULT_PRECS, alpha_initial = 1e-3, autodiff = nothing,
2121
jvp_autodiff = nothing, vjp_autodiff = nothing)
2222
descent = DampedNewtonDescent(; linsolve, precs, initial_damping = alpha_initial,
2323
damping_fn = SwitchedEvolutionRelaxation())

0 commit comments

Comments
 (0)