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.
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();
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
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 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
Types of one-dimensional grids.
Types of two-dimensional grids.