From f1f7a7af70a2b8762a1eef7fe3a094b3ff455a40 Mon Sep 17 00:00:00 2001 From: jClugstor Date: Mon, 11 Nov 2024 20:19:44 -0500 Subject: [PATCH] swap alg_autodiff around --- lib/OrdinaryDiffEqDifferentiation/src/alg_utils.jl | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/lib/OrdinaryDiffEqDifferentiation/src/alg_utils.jl b/lib/OrdinaryDiffEqDifferentiation/src/alg_utils.jl index fdc427176b..ebe0d64622 100644 --- a/lib/OrdinaryDiffEqDifferentiation/src/alg_utils.jl +++ b/lib/OrdinaryDiffEqDifferentiation/src/alg_utils.jl @@ -27,13 +27,14 @@ end function alg_autodiff(alg) autodiff = _alg_autodiff(alg) - if nameof(autodiff) == :AutoForwardDiff + + if autodiff == Val{true} return AutoForwardDiff() - elseif nameof(autodiff) == :AutoFiniteDiff + elseif autodiff == Val{false} return AutoFiniteDiff() - elseif autodiff == Val{true} + elseif nameof(autodiff) == :AutoForwardDiff return AutoForwardDiff() - elseif autodiff == Val{false} + elseif nameof(autodiff) == :AutoFiniteDiff return AutoFiniteDiff() end end