From fbfdb3fc147f100ab7a8516035e8c3986aa27c3a Mon Sep 17 00:00:00 2001 From: Christopher Rackauckas Date: Sun, 20 Oct 2024 07:31:49 -0400 Subject: [PATCH] switch to FastPower --- Project.toml | 2 ++ src/StochasticDelayDiffEq.jl | 1 + src/stepsize_controllers.jl | 4 ++-- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/Project.toml b/Project.toml index aa177ed..70d7b53 100644 --- a/Project.toml +++ b/Project.toml @@ -8,6 +8,7 @@ DataStructures = "864edb3b-99cc-5e75-8d2d-829cb0a9cfe8" DelayDiffEq = "bcd4f6db-9728-5f36-b5f7-82caef46ccdb" DiffEqBase = "2b5f629d-d688-5b77-993f-72d75c75574e" DiffEqNoiseProcess = "77a26b50-5914-5dd7-bc55-306e6241c503" +FastPower = "a4df4552-cc26-4903-aec0-212e50a0e84b" LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" Logging = "56ddb016-857b-54e1-b83d-db4d58db5568" Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" @@ -24,6 +25,7 @@ DataStructures = "0.18" DelayDiffEq = "5.28.3" DiffEqBase = "6.122" DiffEqNoiseProcess = "5" +FastPower = "1" LinearAlgebra = "1.9" Logging = "1.9" Random = "1.9" diff --git a/src/StochasticDelayDiffEq.jl b/src/StochasticDelayDiffEq.jl index 71bd521..76429a1 100644 --- a/src/StochasticDelayDiffEq.jl +++ b/src/StochasticDelayDiffEq.jl @@ -13,6 +13,7 @@ using LinearAlgebra, StaticArrays using UnPack, DataStructures using Logging using RecursiveArrayTools +import FastPower using DiffEqBase: AbstractSDDEProblem, AbstractSDDEAlgorithm, AbstractRODESolution, AbstractRODEFunction, AbstractSDEIntegrator, AbstractSDDEIntegrator, DEIntegrator, DEAlgorithm, AbstractRODEAlgorithm, AbstractSDEAlgorithm diff --git a/src/stepsize_controllers.jl b/src/stepsize_controllers.jl index 31018c8..f4e071d 100644 --- a/src/stepsize_controllers.jl +++ b/src/stepsize_controllers.jl @@ -1,8 +1,8 @@ function stepsize_controller!(integrator::SDDEIntegrator, controller::PIController, alg) - integrator.q11 = DiffEqBase.value(DiffEqBase.fastpow(integrator.EEst, controller.beta1)) + integrator.q11 = DiffEqBase.value(FastPower.fastpower(integrator.EEst, controller.beta1)) integrator.q = DiffEqBase.value(integrator.q11 / - DiffEqBase.fastpow(integrator.qold, controller.beta2)) + 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)))