Skip to content

Commit e07599f

Browse files
authored
Merge pull request #1223 from SciML/OrdinarYDiffEq_library_struct_clarification
Add note about OrdinaryDiffEq solver libraries on simulation page
2 parents 63c70d3 + 560852d commit e07599f

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

docs/src/introduction_to_catalyst/introduction_to_catalyst.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ the graph.
112112
save("repressilator_graph.png", g)
113113
```
114114

115-
## Mass action ODE models
115+
## [Mass action ODE models](@id introduction_to_catalyst_massaction_ode)
116116
Let's now use our `ReactionSystem` to generate and solve a corresponding mass
117117
action ODE model. We first convert the system to a `ModelingToolkit.ODESystem`
118118
by

docs/src/model_simulation/simulation_introduction.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ These three different approaches are summed up in the following table:
7979
```
8080

8181
## [Performing (ODE) simulations](@id simulation_intro_ODEs)
82-
The following section gives a (more throughout than [previous]) introduction of how to simulate Catalyst models. This is exemplified using ODE simulations (some ODE-specific options will also be discussed). Later on, we will describe things specific to [SDE](@ref simulation_intro_SDEs) and [jump](@ref simulation_intro_jumps) simulations. All ODE simulations are performed using the [OrdinaryDiffEq.jl](https://github.com/SciML/OrdinaryDiffEq.jl) package, which full documentation can be found [here](https://docs.sciml.ai/OrdinaryDiffEq/stable/). A dedicated section giving advice on how to optimise ODE simulation performance can be found [here](@ref ode_simulation_performance)
82+
The following section gives a (more complete introduction of how to simulate Catalyst models than our [previous introduction](@ref introduction_to_catalyst_massaction_ode)). This is illustrated using ODE simulations (some ODE-specific options will also be discussed). Later on, we will describe things specific to [SDE](@ref simulation_intro_SDEs) and [jump](@ref simulation_intro_jumps) simulations. All ODE simulations are performed using the [OrdinaryDiffEq.jl](https://github.com/SciML/OrdinaryDiffEq.jl) package, which full documentation can be found [here](https://docs.sciml.ai/OrdinaryDiffEq/stable/). A dedicated section giving advice on how to optimise ODE simulation performance can be found [here](@ref ode_simulation_performance)
8383

8484
To perform any simulation, we must first define our model, as well as the simulation's initial conditions, time span, and parameter values. Here we will use a simple [two-state model](@ref basic_CRN_library_two_states):
8585
```@example simulation_intro_ode
@@ -124,6 +124,9 @@ nothing # hide
124124
```
125125
A full list of available solvers is provided [here](https://docs.sciml.ai/DiffEqDocs/stable/solvers/ode_solve/), and a discussion on optimal solver choices [here](@ref ode_simulation_performance_solvers).
126126

127+
!!! note
128+
Unlike most other libraries, OrdinaryDiffEq is split into multiple libraries. This is due to it implementing a large number of ODE solvers (most of which a user will not use). Splitting the library improves its loading times. At the highest level, there is OrdinaryDiffEq.jl (imported through `using OrdinaryDiffEq`). This exports all solvers, and is primarily useful if you want to try a wide range of different solvers for a specific problem. Next there is OrdinaryDiffEqDefault.jl (imported through `using OrdinaryDiffEq`). This exports the automated default solver (which selects a solver for the user). It is likely the best one to use for simple workflows. Then there are multiple solver-specific libraries, such as [OrdinaryDiffEqTsit5.jl](https://docs.sciml.ai/OrdinaryDiffEq/stable/explicit/Tsit5/) and [OrdinaryDiffEqRosenbrock.jl](https://docs.sciml.ai/OrdinaryDiffEq/stable/semiimplicit/Rosenbrock/) (a full list can be found [here](https://docs.sciml.ai/OrdinaryDiffEq/stable/)). Each of these exports a specific set of solvers, and are useful if you know in advance which solver you wish to use.
129+
127130
Additional options can be provided as keyword arguments. E.g. the `maxiters` arguments determines the maximum number of simulation time steps (before the simulation is terminated). This defaults to `1e5`, but can be modified through:
128131
```@example simulation_intro_ode
129132
sol = solve(oprob; maxiters = 1e4)

0 commit comments

Comments
 (0)