ADR 0005: Kernels are built from sparse per-pair collision recipes
- Status: Accepted (2026-11-10)
- Date: 2026-11-10
- Deciders: Vincent Mader
- Related: Findings F8; 04-experiments.md section 1
Context
The thesis stores K_kij as dense N_m³ arrays (7.5·10⁶ doubles at N_m = 200; impossible for p = 2: (N_m N_φ)³). Hit-and-stick touches 3 to 4 bins per pair, fragmentation up to N_m. Sampling needs per-pair units with zero mass moment, and the Jacobian is assembled from the same pairs.
Decision
The kernel is a RecipeSet: for every unordered pair (i ≤ j) and every outcome with non-zero rate, a Recipe { pair, rate, entries: [(k, w)] } where w are the per-collision changes of N_k (loss -1 at i and j, Kovetz and Olund gains, fragment distribution, cratering remnant). Each recipe is constructed so Σ_k m_k w_k = 0 to round-off (checked in tests). RHS, Jacobian, the dense tensor (export for plots and parity), and sampled kernels are assembled from recipes. Boundary behavior when m_i + m_j exceeds the grid is an explicit policy: drop_pair (thesis), pile_up, outflow (mass leaves and is accounted).
Alternatives considered
- Dense tensor: simple, but memory and cost scale as N³ even for sparse physics, and a sampled kernel would still need per-pair grouping.
- Generic sparse tensor (COO/CSF): loses the per-pair grouping that detailed balance and sampling need.
- Computing recipes on the fly per evaluation: saves memory, but costs repeated work; possible later as an option for very large p = 2 grids.
Consequences
- Memory O(N_pairs · L) instead of O(N³).
- Per-pair conservation becomes a unit-testable property.
- The visualization can show a recipe for a clicked pair directly.
- Changing rates (e.g. time-dependent disk) requires rebuilding rates, not entries; recipes store rates separately from entries for that reason.