From aa4953a83f7d2b6dfc9e449a51dab742c15657a0 Mon Sep 17 00:00:00 2001 From: Christopher Rackauckas Date: Sun, 9 Feb 2025 00:41:49 -0800 Subject: [PATCH 1/3] Update solve.jl to be ForwardDifff-fre --- lib/OrdinaryDiffEqCore/src/solve.jl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/OrdinaryDiffEqCore/src/solve.jl b/lib/OrdinaryDiffEqCore/src/solve.jl index d1f8a689b1..dfd00a9327 100644 --- a/lib/OrdinaryDiffEqCore/src/solve.jl +++ b/lib/OrdinaryDiffEqCore/src/solve.jl @@ -232,11 +232,11 @@ function DiffEqBase.__init( abstol_internal = false elseif abstol === nothing if uBottomEltypeNoUnits == uBottomEltype - abstol_internal = DiffEqBase.ForwardDiff.value(real(convert(uBottomEltype, + abstol_internal = DiffEqBase.value(real(convert(uBottomEltype, oneunit(uBottomEltype) * 1 // 10^6))) else - abstol_internal = DiffEqBase.ForwardDiff.value.(real.(oneunit.(u) .* 1 // 10^6)) + abstol_internal = DiffEqBase.value.(real.(oneunit.(u) .* 1 // 10^6)) end else abstol_internal = real.(abstol) @@ -246,10 +246,10 @@ function DiffEqBase.__init( reltol_internal = false elseif reltol === nothing if uBottomEltypeNoUnits == uBottomEltype - reltol_internal = DiffEqBase.ForwardDiff.value(real(convert(uBottomEltype, + reltol_internal = DiffEqBase.value(real(convert(uBottomEltype, oneunit(uBottomEltype) * 1 // 10^3))) else - reltol_internal = DiffEqBase.ForwardDiff.value.(real.(oneunit.(u) .* 1 // 10^3)) + reltol_internal = DiffEqBase.value.(real.(oneunit.(u) .* 1 // 10^3)) end else reltol_internal = real.(reltol) From e43164fa7a7d80db25c9c350569a80aae5c63fc0 Mon Sep 17 00:00:00 2001 From: Christopher Rackauckas Date: Sun, 9 Feb 2025 07:02:14 -0800 Subject: [PATCH 2/3] Update solve.jl --- lib/OrdinaryDiffEqCore/src/solve.jl | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/lib/OrdinaryDiffEqCore/src/solve.jl b/lib/OrdinaryDiffEqCore/src/solve.jl index dfd00a9327..8b213cc8f5 100644 --- a/lib/OrdinaryDiffEqCore/src/solve.jl +++ b/lib/OrdinaryDiffEqCore/src/solve.jl @@ -232,11 +232,10 @@ function DiffEqBase.__init( abstol_internal = false elseif abstol === nothing if uBottomEltypeNoUnits == uBottomEltype - abstol_internal = DiffEqBase.value(real(convert(uBottomEltype, - oneunit(uBottomEltype) * + abstol_internal = oneunit(uBottomEltype) * DiffEqBase.value(real(convert(uBottomEltype, 1 // 10^6))) else - abstol_internal = DiffEqBase.value.(real.(oneunit.(u) .* 1 // 10^6)) + abstol_internal = oneunit.(u) .* DiffEqBase.value.(real.(1 // 10^6)) end else abstol_internal = real.(abstol) @@ -246,10 +245,10 @@ function DiffEqBase.__init( reltol_internal = false elseif reltol === nothing if uBottomEltypeNoUnits == uBottomEltype - reltol_internal = DiffEqBase.value(real(convert(uBottomEltype, - oneunit(uBottomEltype) * 1 // 10^3))) + reltol_internal = oneunit(uBottomEltype) * DiffEqBase.value(real(convert(uBottomEltype, + 1 // 10^3))) else - reltol_internal = DiffEqBase.value.(real.(oneunit.(u) .* 1 // 10^3)) + reltol_internal = oneunit.(u) .* DiffEqBase.value.(real.(1 // 10^3)) end else reltol_internal = real.(reltol) From e76168d1711d0a28139d1617b9280754760aee8e Mon Sep 17 00:00:00 2001 From: Christopher Rackauckas Date: Sun, 9 Feb 2025 07:39:05 -0800 Subject: [PATCH 3/3] Update solve.jl --- lib/OrdinaryDiffEqCore/src/solve.jl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/OrdinaryDiffEqCore/src/solve.jl b/lib/OrdinaryDiffEqCore/src/solve.jl index 8b213cc8f5..1d1e4fd819 100644 --- a/lib/OrdinaryDiffEqCore/src/solve.jl +++ b/lib/OrdinaryDiffEqCore/src/solve.jl @@ -232,8 +232,8 @@ function DiffEqBase.__init( abstol_internal = false elseif abstol === nothing if uBottomEltypeNoUnits == uBottomEltype - abstol_internal = oneunit(uBottomEltype) * DiffEqBase.value(real(convert(uBottomEltype, - 1 // 10^6))) + abstol_internal = DiffEqBase.value(real(convert(uBottomEltype, + oneunit(uBottomEltype) * 1 // 10^6))) else abstol_internal = oneunit.(u) .* DiffEqBase.value.(real.(1 // 10^6)) end @@ -245,8 +245,8 @@ function DiffEqBase.__init( reltol_internal = false elseif reltol === nothing if uBottomEltypeNoUnits == uBottomEltype - reltol_internal = oneunit(uBottomEltype) * DiffEqBase.value(real(convert(uBottomEltype, - 1 // 10^3))) + reltol_internal = DiffEqBase.value(real(convert(uBottomEltype, + oneunit(uBottomEltype) * 1 // 10^3))) else reltol_internal = oneunit.(u) .* DiffEqBase.value.(real.(1 // 10^3)) end