|
RadCluster
Graph-based cluster dynamics for irradiated materials
|
Functions | |
| _key (str node) | |
| collect_hyperedges (G) | |
| str | _cell_text_colour (rgba) |
| _draw_matrix (ax, grid, mask_outside, n_max, cmap, norm, fmt) | |
| _schematic (ax) | |
| None | build_figure (int n_max, Path out) |
Variables | |
| int | _LABEL_FONTSIZE = 22 |
| int | _TICK_FONTSIZE = 20 |
| int | _PLOT_FONTSIZE = 20 |
| float | _LW = 3.0 |
| float | _LW_THIN = 2.4 |
| int | _DPI = 150 |
| str | _INK = "#1a1a1a" |
| str | _GREY_TEXT = "#6a6a6a" |
| str | _OUTSIDE = "#e8e7e3" |
| _SEQ | |
| _DIV | |
| dict | _POP_LABEL |
| ap = argparse.ArgumentParser(description=__doc__) | |
| type | |
| int | |
| default | |
| a = ap.parse_args() | |
make_rag_hyperedge_figure.py — the binary half of the EUROFER-97 RAG.
Companion to ``make_rag_figure.py``, which draws the unary skeleton and
omits COALESCENCE and ANNIHILATION because they are directed *hyperedges*
(two tails, one head) and O(n_max**2) in count -- 360 arcs at n_max=8,
6564 at n_max=30. A node-link drawing of those is a solid block.
A hyperedge family is a *reaction table*, so it is drawn as one: the
(n, m) plane, with the cell carrying the head the pair maps to. Every
cell IS one hyperedge, so nothing is sampled or elided.
The pairs are reconstructed from the materialized graph by grouping arcs
on ``hyper_id`` -- each id carries exactly the two tail->head arcs of one
hyperedge -- so this figure, like its companion, is generated from the
declaration rather than from a transcription of the arithmetic.
ENCODING. Coalescence carries a magnitude (the product size n+m), so it
gets the sequential blue ramp. Annihilation carries a polarity -- which
sub-space survives the encounter -- so it gets the diverging blue<->red
pair with a neutral gray midpoint at n == m, where the two annihilate
exactly and the content leaves through SINK. Blue means vacancy in both
panels and in the companion figure.
Usage::
cd radcluster_code
python codes/make_rag_hyperedge_figure.py --n-max 8 \
--out ../docs/Formulation/reaction_admissibility_graph/figures/eurofer_rag_hyperedges.png
|
protected |
Definition at line 118 of file make_rag_hyperedge_figure.py.
|
protected |
Definition at line 124 of file make_rag_hyperedge_figure.py.
|
protected |
Definition at line 92 of file make_rag_hyperedge_figure.py.
|
protected |
The two-tails/one-head convention, drawn once.
Definition at line 155 of file make_rag_hyperedge_figure.py.
| None make_rag_hyperedge_figure.build_figure | ( | int | n_max, |
| Path | out | ||
| ) |
Definition at line 188 of file make_rag_hyperedge_figure.py.
| make_rag_hyperedge_figure.collect_hyperedges | ( | G | ) |
Group materialized arcs by ``hyper_id`` -> (tails, head, label). ``to_networkx`` emits each binary reaction as its two tail->head arcs sharing one ``hyper_id``, which is exactly enough to recover the (n, m) pair and its product without re-deriving the arithmetic here.
Definition at line 99 of file make_rag_hyperedge_figure.py.
|
protected |
Definition at line 80 of file make_rag_hyperedge_figure.py.
|
protected |
Definition at line 59 of file make_rag_hyperedge_figure.py.
|
protected |
Definition at line 72 of file make_rag_hyperedge_figure.py.
|
protected |
Definition at line 71 of file make_rag_hyperedge_figure.py.
|
protected |
Definition at line 54 of file make_rag_hyperedge_figure.py.
|
protected |
Definition at line 57 of file make_rag_hyperedge_figure.py.
|
protected |
Definition at line 58 of file make_rag_hyperedge_figure.py.
|
protected |
Definition at line 73 of file make_rag_hyperedge_figure.py.
|
protected |
Definition at line 56 of file make_rag_hyperedge_figure.py.
|
protected |
Definition at line 85 of file make_rag_hyperedge_figure.py.
|
protected |
Definition at line 76 of file make_rag_hyperedge_figure.py.
|
protected |
Definition at line 55 of file make_rag_hyperedge_figure.py.
| make_rag_hyperedge_figure.a = ap.parse_args() |
Definition at line 283 of file make_rag_hyperedge_figure.py.
| make_rag_hyperedge_figure.ap = argparse.ArgumentParser(description=__doc__) |
Definition at line 279 of file make_rag_hyperedge_figure.py.
| make_rag_hyperedge_figure.default |
Definition at line 280 of file make_rag_hyperedge_figure.py.
| make_rag_hyperedge_figure.int |
Definition at line 280 of file make_rag_hyperedge_figure.py.
| make_rag_hyperedge_figure.type |
Definition at line 280 of file make_rag_hyperedge_figure.py.