You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
matrix_ops.py currently provides a diffusion (Laplacian) operator builder and Crank–Nicolson / implicit-Euler / trapezoidal time-stepping helpers, but has no advection operator builder.
Motivation
McKendrick–von Foerster-style PDE models (e.g., immune-status-structured compartmental models) require a first-order advection (transport) term of the form:
$$\frac{\partial u}{\partial t} + v \frac{\partial u}{\partial x} = \ldots$$
to model continuous waning along a structured axis. The StageOperatorFactory pattern is already set up to produce (L, R) matrix pairs keyed on dt, so an advection builder would slot in naturally.
Proposed scope
Add build_advection_matrix(n, dx, velocity, ...) to matrix_ops.py returning a sparse upwind (or flux-limiter) discretisation matrix.
Summary
matrix_ops.pycurrently provides a diffusion (Laplacian) operator builder and Crank–Nicolson / implicit-Euler / trapezoidal time-stepping helpers, but has no advection operator builder.Motivation
McKendrick–von Foerster-style PDE models (e.g., immune-status-structured compartmental models) require a first-order advection (transport) term of the form:
to model continuous waning along a structured axis. The
StageOperatorFactorypattern is already set up to produce(L, R)matrix pairs keyed ondt, so an advection builder would slot in naturally.Proposed scope
build_advection_matrix(n, dx, velocity, ...)tomatrix_ops.pyreturning a sparse upwind (or flux-limiter) discretisation matrix.build_cn_operators/build_implicit_euler_operatorshelpers.Related