Skip to content

Dynamic axis addition: add/remove structured axes at specification time #46

@jc-macdonald

Description

@jc-macdonald

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:

  1. Extend the state tensor dimensions
  2. Wire diffusion operators for the new axis
  3. Adjust reaction terms that depend on the new trait
  4. Validate that rate functions have the right arity

Depends on

Cross-references

Tasks

  • add_axis(spec, axis) method on compiled specification
  • remove_axis(spec, name) — project out / marginalise a dimension
  • Validate reaction term arity after axis changes
  • Tensor-product grid assembly: full state = outer product of all axis grids
  • Resolution independence per axis

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions