Parent: #118
Goal
Introduce a small StateLayout abstraction in Commons.py as the single owner of state-vector slice offsets.
Acceptance criteria
- Build the layout from existing state metadata.
- Provide packing, zero-copy unpacking, and explicit shape validation.
- Keep the flat vector at the Assimulo/SUNDIALS boundary.
- Add focused unit tests for scalar, vector, and discretized state blocks.
- Preserve compatibility with existing unpacking helpers during incremental adoption.
Parent: #118
Goal
Introduce a small
StateLayoutabstraction inCommons.pyas the single owner of state-vector slice offsets.Acceptance criteria