Crate sir_ddft[][src]

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

CartesianGrid2D

A 2D Cartesian grid, i.e. the Cartesian product of two 1D grids

CartesianGrid2DIterator

Iterator over a 2D Cartesian grid

EquidistantGrid1D

Equidistant grid in 1D starting at xlim.0 and ending at xlim.1

EquidistantGrid1DIter

Iterator over 1D equidistant grid (workaround until generators are stable)

SIRDDFT1DIVP

Initial value problem for the SIR-DDFT model in one spatial dimension

SIRDDFT2DIVP

Initial value problem for the SIR-DDFT model in two spatial dimensions

SIRDDFTParameters

Additional parameters for the SIR DDFT 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

SIRDiffusionParameters

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)

SIRStateSpatial1D

State of spatially resolved SIR models in one dimension (SIR PDEs)

SIRStateSpatial1DBorrowed

Borrowed view of a SIRStateSpatial1D

SIRStateSpatial2D

State of spatially resolved SIR models in two dimensions (SIR PDEs)

SIRStateSpatial2DBorrowed

Borrowed view of a SIRStateSpatial2D

Enums

Grid1D

Types of one-dimensional grids.

Grid2D

Types of two-dimensional grids.