Skip to content

Commit 6bcbd6c

Browse files
authored
Merge pull request #36 from SciML/dw/history
Remove `HistoryFunction`
2 parents 4400d14 + 35472ec commit 6bcbd6c

File tree

4 files changed

+25
-108
lines changed

4 files changed

+25
-108
lines changed

Project.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "StochasticDelayDiffEq"
22
uuid = "29a0d76e-afc8-11e9-03a4-eda52ae4b960"
33
authors = ["Henrik Sykora <[email protected]>"]
4-
version = "0.2.6"
4+
version = "0.2.7"
55

66
[deps]
77
DataStructures = "864edb3b-99cc-5e75-8d2d-829cb0a9cfe8"
@@ -21,7 +21,7 @@ UnPack = "3a884ed6-31ef-47d7-9d2a-63182c4928ed"
2121

2222
[compat]
2323
DataStructures = "0.18"
24-
DelayDiffEq = "5"
24+
DelayDiffEq = "5.28.2"
2525
DiffEqBase = "6.29"
2626
DiffEqNoiseProcess = "5"
2727
RandomNumbers = "1"

src/StochasticDelayDiffEq.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ using DiffEqBase: AbstractSDDEProblem, AbstractSDDEAlgorithm, AbstractRODESoluti
1616
import DelayDiffEq: constant_extrapolant!, constant_extrapolant, AbstractMethodOfStepsAlgorithm, iscomposite, MethodOfSteps
1717
using DiffEqNoiseProcess
1818

19+
using DelayDiffEq: HistoryFunction
20+
1921
import RandomNumbers: Xorshifts
2022
using Random
2123
import Base: convert
@@ -30,7 +32,6 @@ include("integrators/type.jl")
3032
include("integrators/interface.jl")
3133
include("integrators/utils.jl")
3234
include("functionwrapper.jl")
33-
include("history_function.jl")
3435
include("utils.jl")
3536
include("solve.jl")
3637

src/history_function.jl

Lines changed: 0 additions & 95 deletions
This file was deleted.

src/integrators/type.jl

Lines changed: 21 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,19 @@ mutable struct HistorySDEIntegrator{algType,IIP,uType,tType,SolType,CacheType} <
1010
tdir::Int
1111
saveiter::Int
1212
cache::CacheType
13-
end
13+
end
1414

15-
mutable struct
16-
SDDEIntegrator{algType,IIP,uType,uEltype,tType,P,eigenType,tTypeNoUnits,uEltypeNoUnits,randType,randType2,rateType,solType,cacheType,F,G,F6,OType,noiseType,EventErrorType,CallbackCacheType,H,IType} <: AbstractSDDEIntegrator{algType,IIP,uType,tType}
15+
function (integrator::HistorySDEIntegrator)(t, deriv::Type=Val{0}; idxs=nothing)
16+
StochasticDiffEq.current_interpolant(t, integrator, idxs, deriv)
17+
end
18+
19+
function (integrator::HistorySDEIntegrator)(
20+
val::AbstractArray, t::Union{Number,AbstractArray}, deriv::Type=Val{0}; idxs=nothing
21+
)
22+
StochasticDiffEq.current_interpolant!(val, t, integrator, idxs, deriv)
23+
end
24+
25+
mutable struct SDDEIntegrator{algType,IIP,uType,uEltype,tType,P,eigenType,tTypeNoUnits,uEltypeNoUnits,randType,randType2,rateType,solType,cacheType,F,G,F6,OType,noiseType,EventErrorType,CallbackCacheType,H,IType} <: AbstractSDDEIntegrator{algType,IIP,uType,tType}
1726
f::F
1827
g::G
1928
c::F6
@@ -66,12 +75,14 @@ mutable struct
6675
history::H
6776
destats::DiffEqBase.DEStats
6877
integrator::IType # history integrator
69-
end
78+
end
7079

71-
function (integrator::SDDEIntegrator)(t, deriv::Type=Val{0}; idxs=nothing)
72-
StochasticDiffEq.current_interpolant(t, integrator, idxs, deriv)
73-
end
80+
function (integrator::SDDEIntegrator)(t, deriv::Type=Val{0}; idxs=nothing)
81+
StochasticDiffEq.current_interpolant(t, integrator, idxs, deriv)
82+
end
7483

75-
function (integrator::SDDEIntegrator)(val::AbstractArray, t::Union{Number,AbstractArray},deriv::Type=Val{0}; idxs=nothing)
76-
StochasticDiffEq.current_interpolant!(val, t, integrator, idxs, deriv)
77-
end
84+
function (integrator::SDDEIntegrator)(
85+
val::AbstractArray, t::Union{Number,AbstractArray}, deriv::Type=Val{0}; idxs=nothing
86+
)
87+
StochasticDiffEq.current_interpolant!(val, t, integrator, idxs, deriv)
88+
end

0 commit comments

Comments
 (0)