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
- ODE solvers
Structs§
- Cartesian
Grid2D - A 2D Cartesian grid, i.e. the Cartesian product of two 1D grids
- Cartesian
Grid2D Iterator - Iterator over a 2D Cartesian grid
- Equidistant
Grid1D - Equidistant grid in 1D starting at
xlim.0
and ending atxlim.1
- Equidistant
Grid1D Iter - Iterator over 1D equidistant grid (workaround until generators are stable)
- SIRDDF
T1DIVP - Initial value problem for the SIR-DDFT model in one spatial dimension
- SIRDDF
T2DIVP - Initial value problem for the SIR-DDFT model in two spatial dimensions
- SIRDDFT
Parameters - Additional parameters for the SIR DDFT / PFC model
- SIRDiffusion1DIVP
- Initial value problem for the SIR model with diffusion in one spatial dimension
- SIRDiffusion2DIVP
- Initial value problem for the SIR model with diffusion in two spatial dimensions
- SIRDiffusion
Parameters - Additional parameters for the SIR model with diffusion
- SIRODEIVP
- Initial value problem for the SIR model
- SIRParameters
- Parameters for the most simplistic SIR model (ODE)
- SIRState
- State of the SIR model (SIR ODE)
- SIRState
Spatial1D - State of spatially resolved SIR models in one dimension (SIR PDEs)
- SIRState
Spatial1D Borrowed - Borrowed view of a SIRStateSpatial1D
- SIRState
Spatial2D - State of spatially resolved SIR models in two dimensions (SIR PDEs)
- SIRState
Spatial2D Borrowed - Borrowed view of a SIRStateSpatial2D
- SZDDF
T2DIVP - Initial value problem for the SZ-DDFT model in two spatial dimensions
- SZDDFT
Parameters - SZDiffusion
Parameters - Additional parameters for the SIR model with diffusion
- SZParameters
- SZState
Spatial2D - SZState
Spatial2D Borrowed - Borrowed view of a SZStateSpatial2D