Support runtime addition and removal of axes in a compiled system specification.
Motivation
Users should be able to extend a model with new trait, spatial, or structured dimensions declaratively. For example, a TRIDENT-like model starts with trait axes (phytoplankton size, zooplankton size) and a spatial axis (depth). Adding a new axis (e.g. light-harvesting pigment ratio) should:
- Extend the state tensor dimensions
- Wire diffusion operators for the new axis
- Adjust reaction terms that depend on the new trait
- Validate that rate functions have the right arity
Depends on
Cross-references
Tasks
Support runtime addition and removal of axes in a compiled system specification.
Motivation
Users should be able to extend a model with new trait, spatial, or structured dimensions declaratively. For example, a TRIDENT-like model starts with trait axes (phytoplankton size, zooplankton size) and a spatial axis (depth). Adding a new axis (e.g. light-harvesting pigment ratio) should:
Depends on
Axispydantic model #23 (Axis pydantic model)StateAxesPydantic model #27 (StateAxes pydantic model)Cross-references
Tasks
add_axis(spec, axis)method on compiled specificationremove_axis(spec, name)— project out / marginalise a dimension