Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch to FastPower.jl #586

Merged
merged 2 commits into from
Oct 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -37,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"
Expand Down
2 changes: 2 additions & 0 deletions src/StochasticDiffEq.jl
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ using DocStringExtensions
using LinearAlgebra, Random

import ForwardDiff.Dual

import FastPower

import DiffEqBase: step!, initialize!, DEAlgorithm,
AbstractSDEAlgorithm, AbstractRODEAlgorithm, DEIntegrator, AbstractDiffEqInterpolation,
Expand Down
4 changes: 2 additions & 2 deletions src/integrators/stepsize_controllers.jl
Original file line number Diff line number Diff line change
@@ -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

Expand Down
Loading