check_loop_network_loss.py — end-to-end test for the loop → network-dislocation
loss channel (docs/Formulation/dislocation_loops/loop_network_loss.tex).
Verifies, against the C++ production solver:
1. The channel is genuinely active — with LOOP_NETWORK_LOSS on it removes
SIA-loop inventory relative to the OFF baseline (the network sweeps loops
into the dislocation reservoir).
2. Conservation is NOT degraded by the active channel — the SIA content swept
into the network is routed into the J_SIA_fixed ledger (Eq. ledger), so the
Frenkel-pair diagnostic dFP with the channel ON matches the OFF baseline.
(The *absolute* dFP here is a few ×1e-2 because run_adaptive's multi-segment
accounting carries a benign baseline transient at this short, hot, heavily-
converting config; the OFF run shows the same level, and the single-segment
ledger is exact — see check_loop_conversion_conservation.py. The correct
correctness statement is therefore comparative: ON ≈ OFF.)
3. The Λ_n^net kernel is built non-zero and folded into the P4 sinks.
Both runs use loop conversion ON so the sessile ⟨100⟩ block (the population the
note says dominates network incorporation) is exercised through its new C++
loss term + ledger contribution. χ is set far above its physical O(1) value
here only so the geometric switch P_ℓd turns on for the small loops the short
test produces (physical χ/K_rec calibration is Phase 5); w_c is likewise
amplified to make the per-second removal observable.
Requires a built solver.exe. Run:
python codes/Python_Testing/check_loop_network_loss.py