|
RadCluster
Graph-based cluster dynamics for irradiated materials
|
Functions | |
| _content_rate (dydt, layout, *blocks) | |
| _one_pop_rag (N, kernel) | |
| _two_pop_rag (N, kernel) | |
| _layout_two (N, p111, p100) | |
| _small_state (N, *segments) | |
| test_same_population_conserves_content () | |
| test_junction_conserves_total_content () | |
| test_absorption_conserves_content () | |
| test_product_redirect_moves_only_gain () | |
| test_wrong_polarity_product_rejected () | |
| main () | |
Variables | |
| int | ATOL = 1e-12 |
check_coalescence_product_population.py — Phase-1 unit tests for the
cross-population COALESCENCE extension (½⟨111⟩ → ⟨100⟩ loop-conversion work).
Covers the Layer-1 core change in `core/{edge_classes,rag,graph_walker}.py`:
1. Same-population coalescence conserves signed-defect content
(regression for the factor-2 gain fix in `_c_coalescence`).
2. Cross-population *junction* coalescence bulk-111 × bulk-111 → bulk-100
conserves TOTAL SIA content summed over both populations.
3. Cross-population *absorption* coalescence bulk-100 × bulk-111 → bulk-100
(partner ≠ population, product = population) conserves content.
4. Splitting one coalescence edge into φ·(→bulk-100) + (1−φ)·(→bulk-111)
reproduces the single-edge total content flux (the φ-split is conservative).
5. A COALESCENCE product_population of the *wrong* polarity is rejected.
Run: python codes/Python_Testing/check_coalescence_product_population.py
Exit code 0 on success, 1 on any failure. Also importable as pytest tests.
|
protected |
d/dt of the signed-defect content Σ_n n·c_n summed over named blocks.
Definition at line 38 of file check_coalescence_product_population.py.
|
protected |
Definition at line 67 of file check_coalescence_product_population.py.
|
protected |
Definition at line 49 of file check_coalescence_product_population.py.
|
protected |
Definition at line 78 of file check_coalescence_product_population.py.
|
protected |
bulk-111 (mobile) + bulk-100 (sessile), shared monomer pool on 111.
Definition at line 57 of file check_coalescence_product_population.py.
| check_coalescence_product_population.main | ( | ) |
Definition at line 188 of file check_coalescence_product_population.py.
| check_coalescence_product_population.test_absorption_conserves_content | ( | ) |
bulk-100 × bulk-111 → bulk-100 : product = population (no redirect).
Definition at line 116 of file check_coalescence_product_population.py.
| check_coalescence_product_population.test_junction_conserves_total_content | ( | ) |
bulk-111 × bulk-111 → bulk-100 : Σn over BOTH pops must be flat.
Definition at line 97 of file check_coalescence_product_population.py.
| check_coalescence_product_population.test_product_redirect_moves_only_gain | ( | ) |
Redirecting the product to bulk-100 must move ONLY the gain.
With the same kernel and reactants, a self-coalescence (product → 111)
and a junction (product → 100) consume 111 identically; they differ only
in where the product is deposited. Hence, element-wise,
d111(self) == d111(junction)[pure loss] + d100(junction)[pure gain]
so the redirect is content-preserving relative to the un-redirected edge.
Definition at line 133 of file check_coalescence_product_population.py.
| check_coalescence_product_population.test_same_population_conserves_content | ( | ) |
Definition at line 84 of file check_coalescence_product_population.py.
| check_coalescence_product_population.test_wrong_polarity_product_rejected | ( | ) |
Definition at line 174 of file check_coalescence_product_population.py.
| int check_coalescence_product_population.ATOL = 1e-12 |
Definition at line 34 of file check_coalescence_product_population.py.