Skip to content

Commit

Permalink
exclude Dual Numbers
Browse files Browse the repository at this point in the history
  • Loading branch information
jClugstor committed Nov 29, 2024
1 parent 30e9ab6 commit 7a08f59
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/OrdinaryDiffEqDifferentiation/src/alg_utils.jl
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ function DiffEqBase.prepare_alg(
color_alg = DiffEqBase.has_colorvec(prob.f) ? ADTypes.ConstantColoringAlgorithm(sparsity, prob.f.colorvec) : GreedyColoringAlgorithm()

# don't use sparsity if the vectors are SVectors, or the eltype of u0 is Complex
if !(u0 isa SVector) && !(eltype(u0) <: Complex)
if !(u0 isa SVector) && !(eltype(u0) <: Complex) && !(eltype(u0) == ForwardDiff.Dual)
autodiff = AutoSparse(autodiff, sparsity_detector = sparsity_detector, coloring_algorithm = color_alg)
end

Expand Down

0 comments on commit 7a08f59

Please sign in to comment.