Skip to content

Commit

Permalink
defaults for spatial and using OrdinaryDiffEqTsit5 in hybrid docstring
Browse files Browse the repository at this point in the history
  • Loading branch information
TorkelE committed Jan 3, 2025
1 parent 36bcb91 commit 6aa076e
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/reactionsystem_conversions.jl
Original file line number Diff line number Diff line change
Expand Up @@ -795,7 +795,7 @@ end
Example:
```julia
using Catalyst, OrdinaryDiffEq, JumpProcesses, Plots
using Catalyst, OrdinaryDiffEqTsit5, JumpProcesses, Plots
rn = @reaction_network begin
k*(1 + sin(t)), 0 --> A
end
Expand Down
4 changes: 2 additions & 2 deletions src/spatial_reaction_systems/lattice_reaction_systems.jl
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ are possible.
Example:
```julia
# Fetch packages.
using Catalyst, OrdinaryDiffEqTsit5
using Catalyst, OrdinaryDiffEqDefault
import CairoMakie
# Creates the `LatticeReactionSystem` model.
Expand All @@ -43,7 +43,7 @@ u0 = [:X => rand(5,5)]
tspan = (0.0, 1.0)
ps = [:p => 1.0, :d => 0.5, :D => 0.1]
oprob = ODEProblem(lrs, u0, tspan, ps)
osol = solve(oprob, Tsit5())
osol = solve(oprob)
# Saves an animation of the solution to the file "lattice_animation.mp4".
lattice_animation(osol, :X, lrs, "lattice_animation.mp4")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@ Notes:
Example:
```julia
using Catalyst, OrdinaryDiffEqTsit5
using Catalyst, OrdinaryDiffEqDefault
# Prepare `LatticeReactionSystem`s.
rs = @reaction_network begin
Expand All @@ -322,7 +322,7 @@ tspan = (0.0, 10.0)
ps = [:k1 => 1, :k2 => 2.0, :D => 0.1]
oprob = ODEProblem(lrs1, u0, tspan, ps)
osol = solve(oprob1, Tsit5())
osol = solve(oprob)
lat_getu(osol, :X1, lrs) # Returns the value of X1 at each time step.
lat_getu(osol, :X1, lrs; t = 0.0:10.0) # Returns the value of X1 at times 0.0, 1.0, ..., 10.0
```
Expand Down

0 comments on commit 6aa076e

Please sign in to comment.