Expand description
This crate contains solvers for the SIR model, the spatial SIR model extension including diffusion and a novel SIR model based on dynamical density functional theory.
§Usage
Basic usage follows the same pattern for all models:
// Setup parameters and initial state
let params = SIRParameters::new(0.5, 0.1);
let state = SIRState::new(0.998, 0.002, 0.);
// Create the IVP and solver
let mut ivp = SIRODEIVP::new(params, state);
let solver = RKF45Solver::<SIRODEIVP>::new();
// Integrate for some time
ivp.add_time(2.0);
solver.integrate(&mut ivp);
// Retrieve the result
let (t,state) = ivp.get_result();
Modules§
- ODE solvers
Structs§
- A 2D Cartesian grid, i.e. the Cartesian product of two 1D grids
- Iterator over a 2D Cartesian grid
- Equidistant grid in 1D starting at
xlim.0
and ending atxlim.1
- Iterator over 1D equidistant grid (workaround until generators are stable)
- Initial value problem for the SIR-DDFT model in one spatial dimension
- Initial value problem for the SIR-DDFT model in two spatial dimensions
- Additional parameters for the SIR DDFT / PFC model
- Initial value problem for the SIR model with diffusion in one spatial dimension
- Initial value problem for the SIR model with diffusion in two spatial dimensions
- Additional parameters for the SIR model with diffusion
- Initial value problem for the SIR model
- Parameters for the most simplistic SIR model (ODE)
- State of the SIR model (SIR ODE)
- State of spatially resolved SIR models in one dimension (SIR PDEs)
- Borrowed view of a SIRStateSpatial1D
- State of spatially resolved SIR models in two dimensions (SIR PDEs)
- Borrowed view of a SIRStateSpatial2D
- Initial value problem for the SZ-DDFT model in two spatial dimensions
- Additional parameters for the SIR model with diffusion
- Borrowed view of a SZStateSpatial2D
Enums§
- Types of one-dimensional grids.
- Types of two-dimensional grids.