|
RadCluster
Graph-based cluster dynamics for irradiated materials
|
Functions | |
| check (name, ok, detail="") | |
| last (key) | |
Variables | |
| ROOT = Path(r"d:/GitHub/RadCluster/radcluster_code") | |
| dict | BASELINE |
| int | RTOL = 1e-5 |
| list | failures = [] |
| sim | |
| rag = getattr(sim, "material_rag", None) | |
| layout = getattr(sim, "state_layout", None) | |
| bool | rag_ok = True |
| dict | active = {ec for ec in EdgeClass if rag.edges_of_class(ec)} |
| dict | expected |
| cfg = sim._default_solver_config() | |
| results | |
| val = last(key) | |
| rel = abs(val - ref) / abs(ref) | |
| dfp | |
| dhe | |
Stage-4 validation — the two-layer RadCluster_2_1 on the im5vm2 case.
This is the capstone regression test for the graph-based two-layer
refactor. It reproduces the RadCluster_1_0 reference case
full_system / full_CD_fission, I = V = 1000, i_mobile = 5,
v_mobile = 2, T = 673 K, G = 1e-6 dpa/s, t in [1e-6, 1e-2] s
and checks two things:
(A) STRUCTURE — that a RadClusterSimulation now carries the live
two-layer description: an abstract-core ReactionAdmissibilityGraph
instantiated by the EUROFER-97 material layer (Layer 1 + Layer 2).
(B) PHYSICS — that running through the restructured (core/ + materials/)
C++ solver still reproduces the locked post-Stage-2 baseline, i.e.
the refactor is behaviour-preserving.
Reference values are the post-Stage-2 baseline (the G_He single-source
fix is included by design); agreement to 1e-5 relative — comfortably
above the ~5e-7 solver-tolerance noise — counts as a pass.
Run: python codes/Python_Testing/test_two_layer_im5vm2.py
Exit code 0 = PASS, 1 = FAIL.
| test_two_layer_im5vm2.check | ( | name, | |
| ok, | |||
detail = "" |
|||
| ) |
Definition at line 50 of file test_two_layer_im5vm2.py.
| test_two_layer_im5vm2.last | ( | key | ) |
Definition at line 122 of file test_two_layer_im5vm2.py.
| dict test_two_layer_im5vm2.active = {ec for ec in EdgeClass if rag.edges_of_class(ec)} |
Definition at line 92 of file test_two_layer_im5vm2.py.
| dict test_two_layer_im5vm2.BASELINE |
Definition at line 37 of file test_two_layer_im5vm2.py.
| test_two_layer_im5vm2.cfg = sim._default_solver_config() |
Definition at line 106 of file test_two_layer_im5vm2.py.
| test_two_layer_im5vm2.dfp |
Definition at line 137 of file test_two_layer_im5vm2.py.
| test_two_layer_im5vm2.dhe |
Definition at line 137 of file test_two_layer_im5vm2.py.
| dict test_two_layer_im5vm2.expected |
Definition at line 93 of file test_two_layer_im5vm2.py.
| list test_two_layer_im5vm2.failures = [] |
Definition at line 47 of file test_two_layer_im5vm2.py.
| test_two_layer_im5vm2.layout = getattr(sim, "state_layout", None) |
Definition at line 75 of file test_two_layer_im5vm2.py.
| test_two_layer_im5vm2.rag = getattr(sim, "material_rag", None) |
Definition at line 74 of file test_two_layer_im5vm2.py.
| bool test_two_layer_im5vm2.rag_ok = True |
Definition at line 81 of file test_two_layer_im5vm2.py.
| test_two_layer_im5vm2.rel = abs(val - ref) / abs(ref) |
Definition at line 132 of file test_two_layer_im5vm2.py.
| test_two_layer_im5vm2.results |
Definition at line 114 of file test_two_layer_im5vm2.py.
| test_two_layer_im5vm2.ROOT = Path(r"d:/GitHub/RadCluster/radcluster_code") |
Definition at line 30 of file test_two_layer_im5vm2.py.
| int test_two_layer_im5vm2.RTOL = 1e-5 |
Definition at line 45 of file test_two_layer_im5vm2.py.
| test_two_layer_im5vm2.sim |
Definition at line 62 of file test_two_layer_im5vm2.py.
| test_two_layer_im5vm2.val = last(key) |
Definition at line 131 of file test_two_layer_im5vm2.py.