Skip to content

Commit 8de2b6f

Browse files
committed
Use a default NonlinearSolve Tag
1 parent d8d1c95 commit 8de2b6f

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/utils.jl

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,14 +206,17 @@ function get_concrete_algorithm(alg, prob)
206206
return __get_concrete_algorithm(alg, prob)
207207
end
208208

209+
struct NonlinearSolveTag end
210+
209211
function __get_concrete_algorithm(alg, prob)
210212
@unpack sparsity, jac_prototype = prob.f
211213
use_sparse_ad = sparsity !== nothing || jac_prototype !== nothing
212214
ad = if eltype(prob.u0) <: Complex
213215
# Use Finite Differencing
214216
use_sparse_ad ? AutoSparseFiniteDiff() : AutoFiniteDiff()
215217
else
216-
use_sparse_ad ? AutoSparseForwardDiff() : AutoForwardDiff{nothing, Nothing}(nothing)
218+
tag = NonlinearSolveTag()
219+
use_sparse_ad ? AutoSparseForwardDiff(; tag) : AutoForwardDiff(; tag)
217220
end
218221
return set_ad(alg, ad)
219222
end

0 commit comments

Comments
 (0)