From d7b8d0cad67ac9a2c6ad8bd77bca14c290a50f7c Mon Sep 17 00:00:00 2001 From: Christopher Rackauckas Date: Sun, 20 Oct 2024 07:30:25 -0400 Subject: [PATCH 1/2] Switch to FastPower.jl --- Project.toml | 1 + src/StochasticDiffEq.jl | 2 ++ src/integrators/stepsize_controllers.jl | 4 ++-- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/Project.toml b/Project.toml index b9ad4cf1d..f659d4b76 100644 --- a/Project.toml +++ b/Project.toml @@ -10,6 +10,7 @@ DataStructures = "864edb3b-99cc-5e75-8d2d-829cb0a9cfe8" DiffEqBase = "2b5f629d-d688-5b77-993f-72d75c75574e" DiffEqNoiseProcess = "77a26b50-5914-5dd7-bc55-306e6241c503" DocStringExtensions = "ffbed154-4ef7-542d-bbb7-c09d3a79fcae" +FastPower = "a4df4552-cc26-4903-aec0-212e50a0e84b" FiniteDiff = "6a86dc24-6348-571c-b903-95158fe2bd41" ForwardDiff = "f6369f11-7733-5829-9624-2563aa707210" JumpProcesses = "ccbc3e58-028d-4f4c-8cd5-9ae44345cda5" diff --git a/src/StochasticDiffEq.jl b/src/StochasticDiffEq.jl index af7b4f548..2db86dc3d 100644 --- a/src/StochasticDiffEq.jl +++ b/src/StochasticDiffEq.jl @@ -35,6 +35,8 @@ using DocStringExtensions using LinearAlgebra, Random import ForwardDiff.Dual + + import FastPower import DiffEqBase: step!, initialize!, DEAlgorithm, AbstractSDEAlgorithm, AbstractRODEAlgorithm, DEIntegrator, AbstractDiffEqInterpolation, diff --git a/src/integrators/stepsize_controllers.jl b/src/integrators/stepsize_controllers.jl index c1ee9ece0..01a0206b2 100644 --- a/src/integrators/stepsize_controllers.jl +++ b/src/integrators/stepsize_controllers.jl @@ -1,7 +1,7 @@ function stepsize_controller!(integrator::SDEIntegrator, controller::PIController, alg) - integrator.q11 = DiffEqBase.value(DiffEqBase.fastpow(integrator.EEst,controller.beta1)) - integrator.q = DiffEqBase.value(integrator.q11/DiffEqBase.fastpow(integrator.qold,controller.beta2)) + integrator.q11 = DiffEqBase.value(FastPower.fastpower(integrator.EEst,controller.beta1)) + integrator.q = DiffEqBase.value(integrator.q11/FastPower.fastpower(integrator.qold,controller.beta2)) @fastmath integrator.q = DiffEqBase.value(max(inv(integrator.opts.qmax),min(inv(integrator.opts.qmin),integrator.q/integrator.opts.gamma))) end From f90a9bc80d4d34679f2f1b783ab1da277e10c8b6 Mon Sep 17 00:00:00 2001 From: Christopher Rackauckas Date: Sun, 20 Oct 2024 07:32:07 -0400 Subject: [PATCH 2/2] add compat --- Project.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/Project.toml b/Project.toml index f659d4b76..6122e4128 100644 --- a/Project.toml +++ b/Project.toml @@ -38,6 +38,7 @@ DataStructures = "0.18" DiffEqBase = "6.154" DiffEqNoiseProcess = "5.13" DocStringExtensions = "0.8, 0.9" +FastPower = "1" FiniteDiff = "2" ForwardDiff = "0.10.3" JumpProcesses = "9"