RadCluster
Graph-based cluster dynamics for irradiated materials
Loading...
Searching...
No Matches
Classes | Functions
py_utils.core.graph_walker Namespace Reference

Classes

class  _WalkContext
 
class  GraphWalker
 

Functions

np.ndarray _as_size_array (kernel, int n)
 

Detailed Description

core/graph_walker.py — The master equation as a graph-walking accumulator.

Host-independent.  Implements the "graph walker" of Ghoniem (2026),
*A Generalized Graph-Based Cluster Dynamics Framework*, Section 3.3:

    dc_a/dt = G_a + sum_r S_ar J_r(c) - D_a c_a

The walker visits every admissible edge of a :class:`ReactionAdmissibilityGraph`,
evaluates the reaction flux J_r from the edge's rate kernel, and deposits
the signed stoichiometric contribution S_ar J_r into the affected vertices
of the flat ODE state vector defined by a :class:`StateLayout`.

This is a *reference* discrete (one-ODE-per-size) accumulator: it carries
no host parameters and no EUROFER assumptions — it dispatches purely on
:class:`EdgeClass`.  The size-resolved rate kernels are precomputed
arrays registered on the RAG by a host material (Layer 2).  The
production solver remains the C++ core; this Python walker is the
executable specification the C++ must agree with, and the substrate for
the bin-moment "reconstruct -> walk -> project" reduction.

Sign convention.  Every per-class routine below realises exactly the
stoichiometric contract fixed in ``EDGE_CLASS_SPEC``; because those signs
are structural, summed signed-defect content q = chi*n is conserved by
construction for every intra-host reaction (sources/sinks aside).

Function Documentation

◆ _as_size_array()

np.ndarray py_utils.core.graph_walker._as_size_array (   kernel,
int  n 
)
protected
Broadcast a scalar kernel to length ``n``; pass an array through.

Definition at line 290 of file graph_walker.py.