Skip to content

Commit 5633908

Browse files
author
Brad Carman
committed
DiffEqBase.value
1 parent 92a328a commit 5633908

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

Project.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,14 @@ authors = ["Chris Rackauckas and Julia Computing"]
44
version = "2.1.0"
55

66
[deps]
7+
DiffEqBase = "2b5f629d-d688-5b77-993f-72d75c75574e"
78
IfElse = "615f187c-cbe4-4ef1-ba3b-2fcf58d6d173"
89
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
910
ModelingToolkit = "961ee093-0014-501f-94e3-6117800e7a78"
1011
Symbolics = "0c5d862f-8b57-4792-8d23-62f2024744c7"
1112

1213
[compat]
14+
DiffEqBase = "6"
1315
IfElse = "0.1"
1416
ModelingToolkit = "8.50"
1517
Symbolics = "4.9, 5"

src/Blocks/sources.jl

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
using DiffEqBase
2+
13
# Define and register smooth functions
24
# These are "smooth" aka differentiable and avoid Gibbs effect
35
# These follow: `offset` + `smooth_wave` * `smooth_step` with zero output for `t < start_time`
@@ -626,9 +628,9 @@ function set_sampled_data!(memory::Parameter{T}, t, x, Δt::Parameter{T}) where
626628
n = length(memory.data)
627629
i = round(Int, t / Δt) + 1 #expensive
628630
if i == n + 1
629-
push!(memory.data, ModelingToolkit.ForwardDiff.value(x))
631+
push!(memory.data, DiffEqBase.value(x))
630632
elseif i <= n
631-
@inbounds memory.data[i] = ModelingToolkit.ForwardDiff.value(x)
633+
@inbounds memory.data[i] = DiffEqBase.value(x)
632634
else
633635
error("Memory buffer skipped a step: n=$n, i=$i")
634636
end

0 commit comments

Comments
 (0)