From 6aa076efe1a20662cb9dad43210a6ae1b88fad67 Mon Sep 17 00:00:00 2001 From: Torkel Date: Fri, 3 Jan 2025 13:08:49 +0000 Subject: [PATCH] defaults for spatial and using OrdinaryDiffEqTsit5 in hybrid docstring --- src/reactionsystem_conversions.jl | 2 +- src/spatial_reaction_systems/lattice_reaction_systems.jl | 4 ++-- .../lattice_sim_struct_interfacing.jl | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/reactionsystem_conversions.jl b/src/reactionsystem_conversions.jl index cc143c3c54..23777e994c 100644 --- a/src/reactionsystem_conversions.jl +++ b/src/reactionsystem_conversions.jl @@ -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 diff --git a/src/spatial_reaction_systems/lattice_reaction_systems.jl b/src/spatial_reaction_systems/lattice_reaction_systems.jl index 1f988ce4f5..0d7497702a 100644 --- a/src/spatial_reaction_systems/lattice_reaction_systems.jl +++ b/src/spatial_reaction_systems/lattice_reaction_systems.jl @@ -27,7 +27,7 @@ are possible. Example: ```julia # Fetch packages. -using Catalyst, OrdinaryDiffEqTsit5 +using Catalyst, OrdinaryDiffEqDefault import CairoMakie # Creates the `LatticeReactionSystem` model. @@ -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") diff --git a/src/spatial_reaction_systems/lattice_sim_struct_interfacing.jl b/src/spatial_reaction_systems/lattice_sim_struct_interfacing.jl index fb90c6501c..4d176bae59 100644 --- a/src/spatial_reaction_systems/lattice_sim_struct_interfacing.jl +++ b/src/spatial_reaction_systems/lattice_sim_struct_interfacing.jl @@ -307,7 +307,7 @@ Notes: Example: ```julia -using Catalyst, OrdinaryDiffEqTsit5 +using Catalyst, OrdinaryDiffEqDefault # Prepare `LatticeReactionSystem`s. rs = @reaction_network begin @@ -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 ```