Skip to content

Commit f4a0b0c

Browse files
authored
Merge pull request #1150 from SciML/drop_ordinarydiffeq_from_CI
Remove last OrdinaryDiffEq mention
2 parents 670fd11 + 6aa076e commit f4a0b0c

File tree

4 files changed

+26
-26
lines changed

4 files changed

+26
-26
lines changed

src/reactionsystem_conversions.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -795,7 +795,7 @@ end
795795
796796
Example:
797797
```julia
798-
using Catalyst, OrdinaryDiffEq, JumpProcesses, Plots
798+
using Catalyst, OrdinaryDiffEqTsit5, JumpProcesses, Plots
799799
rn = @reaction_network begin
800800
k*(1 + sin(t)), 0 --> A
801801
end

src/spatial_reaction_systems/lattice_reaction_systems.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ are possible.
2727
Example:
2828
```julia
2929
# Fetch packages.
30-
using Catalyst, OrdinaryDiffEq
30+
using Catalyst, OrdinaryDiffEqDefault
3131
import CairoMakie
3232
3333
# Creates the `LatticeReactionSystem` model.

src/spatial_reaction_systems/lattice_sim_struct_interfacing.jl

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
lat_setp!(sim_struct, p, lrs::LatticeReactionSystem, p_val)
55
66
For a problem or integrators, update its `p` vector with the input `p_val`. For non-lattice models,
7-
this is can be done through direct interfacing (e.g. `prob[p] = 1.0`). However, for
7+
this is can be done through direct interfacing (e.g. `prob[p] = 1.0`). However, for
88
`LatticeReactionSystem`-based problems and integrators, this function must be used instead.
99
1010
Arguments:
@@ -82,7 +82,7 @@ end
8282
lat_getp(sim_struct, p, lrs::LatticeReactionSystem)
8383
8484
For a problem or integrators, retrieves its `p` values. For non-lattice models,
85-
this is can be done through direct interfacing (e.g. `prob[p]`). However, for
85+
this is can be done through direct interfacing (e.g. `prob[p]`). However, for
8686
`LatticeReactionSystem`-based problems and integrators, this function must be used instead. The
8787
output format depends on the lattice (a dense array for cartesian grid lattices, a sparse array for
8888
masked grid lattices, and a vector for graph lattices). This format is similar to what is used to
@@ -95,7 +95,7 @@ Arguments:
9595
- `lrs`: The `LatticeReactionSystem` which was used to generate the structure we wish to modify.
9696
9797
Notes:
98-
- Even if the parameter is spatially uniform, a full array with its values across all vertices will be retrieved.
98+
- Even if the parameter is spatially uniform, a full array with its values across all vertices will be retrieved.
9999
100100
Example:
101101
```julia
@@ -145,7 +145,7 @@ end
145145
lat_setu!(sim_struct, sp, lrs::LatticeReactionSystem, u)
146146
147147
For a problem or integrators, update its `u` vector with the input `u`. For non-lattice models,
148-
this is can be done through direct interfacing (e.g. `prob[X] = 1.0`). However, for
148+
this is can be done through direct interfacing (e.g. `prob[X] = 1.0`). However, for
149149
`LatticeReactionSystem`-based problems and integrators, this function must be used instead.
150150
151151
Arguments:
@@ -224,7 +224,7 @@ end
224224
lat_getu(sim_struct, sp, lrs::LatticeReactionSystem)
225225
226226
For a problem or integrators, retrieves its `u` values. For non-lattice models,
227-
this is can be done through direct interfacing (e.g. `prob[X]`). However, for
227+
this is can be done through direct interfacing (e.g. `prob[X]`). However, for
228228
`LatticeReactionSystem`-based problems and integrators, this function must be used instead. The
229229
output format depends on the lattice (a dense array for cartesian grid lattices, a sparse array for
230230
masked grid lattices, and a vector for graph lattices). This format is similar to which is used to
@@ -236,7 +236,7 @@ Arguments:
236236
- `lrs`: The `LatticeReactionSystem` which was used to generate the structure we wish to modify.
237237
238238
Notes:
239-
- Even if the species is spatially uniform, a full array with its values across all vertices will be retrieved.
239+
- Even if the species is spatially uniform, a full array with its values across all vertices will be retrieved.
240240
241241
Example:
242242
```julia
@@ -277,15 +277,15 @@ function lat_getu(jint::JumpProcesses.SSAIntegrator, sp_idx, sp_tot, lattice)
277277
return reshape_vals(jint.u[sp_idx, :], lattice)
278278
end
279279

280-
# A single function, `lat_getu`, which contains all interfacing functionality. However,
281-
# long-term it should be replaced with a sleeker interface. Ideally as MTK-wide support for
280+
# A single function, `lat_getu`, which contains all interfacing functionality. However,
281+
# long-term it should be replaced with a sleeker interface. Ideally as MTK-wide support for
282282
# lattice problems and solutions is introduced. Note that SciML considers jump simulation solutions
283283
# as `ODESolution`, hence that type is specified.
284284
"""
285285
lat_getu(sol, sp, lrs::LatticeReactionSystem; t = nothing)
286286
287287
A function for retrieving the solution of a `LatticeReactionSystem`-based simulation on various
288-
desired forms. Generally, for `LatticeReactionSystem`s, the values in `sol` is ordered in a
288+
desired forms. Generally, for `LatticeReactionSystem`s, the values in `sol` is ordered in a
289289
way which is not directly interpretable by the user. Furthermore, the normal Catalyst interface
290290
for solutions (e.g. `sol[:X]`) does not work for these solutions. Hence this function is used instead.
291291
@@ -307,13 +307,13 @@ Notes:
307307
308308
Example:
309309
```julia
310-
using Catalyst, OrdinaryDiffEq
310+
using Catalyst, OrdinaryDiffEqDefault
311311
312312
# Prepare `LatticeReactionSystem`s.
313313
rs = @reaction_network begin
314314
(k1,k2), X1 <--> X2
315315
end
316-
tr = @transport_reaction D X1
316+
tr = @transport_reaction D X1
317317
lrs = LatticeReactionSystem(rs, [tr], CartesianGrid((2,2)))
318318
319319
# Create problems.
@@ -322,7 +322,7 @@ tspan = (0.0, 10.0)
322322
ps = [:k1 => 1, :k2 => 2.0, :D => 0.1]
323323
324324
oprob = ODEProblem(lrs1, u0, tspan, ps)
325-
osol = solve(oprob1, Tsit5())
325+
osol = solve(oprob)
326326
lat_getu(osol, :X1, lrs) # Returns the value of X1 at each time step.
327327
lat_getu(osol, :X1, lrs; t = 0.0:10.0) # Returns the value of X1 at times 0.0, 1.0, ..., 10.0
328328
```
@@ -348,7 +348,7 @@ function lat_getu(sol::ODESolution, lattice, t::Nothing, sp_idx::Int64, sp_tot::
348348
end
349349
end
350350

351-
# Function which handles the input in the case where `t` is a range of values (i.e. return `sp`s
351+
# Function which handles the input in the case where `t` is a range of values (i.e. return `sp`s
352352
# value at all designated time points.
353353
function lat_getu(sol::ODESolution, lattice, t::AbstractVector{T}, sp_idx::Int64,
354354
sp_tot::Int64) where {T <: Number}
@@ -374,8 +374,8 @@ end
374374
"""
375375
rebuild_lat_internals!(sciml_struct)
376376
377-
Rebuilds the internal functions for simulating a LatticeReactionSystem. Whenever a problem or
378-
integrator has had its parameter values updated, this function should be called for the update to
377+
Rebuilds the internal functions for simulating a LatticeReactionSystem. Whenever a problem or
378+
integrator has had its parameter values updated, this function should be called for the update to
379379
be taken into account. For ODE simulations, `rebuild_lat_internals!` needs only to be called when
380380
- An edge parameter has been updated.
381381
- When a parameter with spatially homogeneous values has been given spatially heterogeneous values (or vice versa).
@@ -393,7 +393,7 @@ Example:
393393
rs = @reaction_network begin
394394
(k1,k2), X1 <--> X2
395395
end
396-
tr = @transport_reaction D X1
396+
tr = @transport_reaction D X1
397397
grid = CartesianGrid((2,2))
398398
lrs = LatticeReactionSystem(rs, [tr], grid)
399399

test/extensions/lattice_simulation_plotting.jl

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
# Fetch packages.
44
using Catalyst, CairoMakie, GraphMakie, Graphs
5-
using JumpProcesses, OrdinaryDiffEqDefault, OrdinaryDiffEqTsit5, Test
5+
using JumpProcesses, OrdinaryDiffEqTsit5, Test
66

77

88
### Checks Basic Plot Cases ###
@@ -19,7 +19,7 @@ let
1919
diffusion_rx = @transport_reaction D X
2020
for lattice in [CartesianGrid(3), [true, true, false]]
2121
lrs = LatticeReactionSystem(rs, [diffusion_rx], lattice)
22-
22+
2323
# Simulates the model (using ODE and jumps).
2424
u0 = [:X => [1, 2, 3]]
2525
tspan = (0.0, 1.0)
@@ -34,7 +34,7 @@ let
3434
# Plots the simulation and checks that a stored value is correct.
3535
fig, ax, plt = lattice_plot(sol, :X, lrs; t = 1.0)
3636
@test plt[1].val[1][2] sol.u[end][1]
37-
37+
3838
# Attempts to animate the simulation (using various arguments). Deletes the saved file.
3939
lattice_animation(sol, :X, lrs, "animation_tmp.mp4"; nframes = 10, framerate = 10, colormap = :BuGn_6)
4040
@test isfile("animation_tmp.mp4")
@@ -59,7 +59,7 @@ let
5959
diffusion_rx = @transport_reaction D X
6060
for lattice in [CartesianGrid((2,2)), [true true; false true]]
6161
lrs = LatticeReactionSystem(rs, [diffusion_rx], lattice)
62-
62+
6363
# Simulates the model (using ODE and jumps).
6464
u0 = [:X => [1 2; 3 4]]
6565
tspan = (0.0, 1.0)
@@ -74,7 +74,7 @@ let
7474
# Plots the simulation and checks that a stored value is correct.
7575
fig, ax, hm = lattice_plot(sol, :X, lrs; t = 1.0)
7676
@test hm[3].val[1] sol.u[end][1]
77-
77+
7878
# Attempts to animate the simulation (using various arguments). Deletes the saved file.
7979
lattice_animation(sol, :X, lrs, "animation_tmp.mp4"; nframes = 10, framerate = 10, colormap = :BuGn_6)
8080
@test isfile("animation_tmp.mp4")
@@ -92,7 +92,7 @@ let
9292
lattice = CartesianGrid((2,2,2))
9393
lrs = LatticeReactionSystem(rs, [diffusion_rx], lattice)
9494
oprob = ODEProblem(lrs, [:X => 1.0], 1.0, [:d => 1.0, :D => 0.2])
95-
osol = solve(oprob)
95+
osol = solve(oprob, Tsit5())
9696

9797
@test_throws ArgumentError lattice_plot(osol, :X, lrs)
9898
@test_throws ArgumentError lattice_animation(osol, :X, lrs, "animation_tmp.mp4")
@@ -110,7 +110,7 @@ let
110110
diffusion_rx = @transport_reaction D X
111111
lattice = Graphs.SimpleGraphs.cycle_graph(4)
112112
lrs = LatticeReactionSystem(rs, [diffusion_rx], lattice)
113-
113+
114114
# Simulates the model (using ODE and jumps).
115115
u0 = [:X => [1, 2, 3, 4]]
116116
tspan = (0.0, 1.0)
@@ -125,7 +125,7 @@ let
125125
# Plots the simulation and checks that a stored value is correct.
126126
fig, ax, plt = lattice_plot(sol, :X, lrs; t = 0.0)
127127
@test plt.node_color[] == osol.u[1]
128-
128+
129129
# Attempts to animate the simulation (using various arguments). Deletes the saved file.
130130
lattice_animation(sol, :X, lrs, "animation_tmp.mp4"; nframes = 10, framerate = 10, colormap = :BuGn_6)
131131
@test isfile("animation_tmp.mp4")

0 commit comments

Comments
 (0)