|
RadCluster
Graph-based cluster dynamics for irradiated materials
|
Go to the source code of this file.
Classes | |
| struct | UserData |
Typedefs | |
| using | CVRhsFn_t = int(*)(sunrealtype, N_Vector, N_Vector, void *) |
Functions | |
| void | build_kernel_tables (Parameters &P) |
| int | rhs_full_CD (sunrealtype t, N_Vector y, N_Vector ydot, void *user_data) |
| int | rhs_bin_moment (sunrealtype t, N_Vector y, N_Vector ydot, void *user_data) |
| int | prec_setup (sunrealtype t, N_Vector y, N_Vector fy, sunbooleantype jok, sunbooleantype *jcurPtr, sunrealtype gamma, void *user_data) |
| int | prec_solve (sunrealtype t, N_Vector y, N_Vector fy, N_Vector r, N_Vector z, sunrealtype gamma, sunrealtype delta, int lr, void *user_data) |
rate_equations.h — ODE RHS declarations for RadCluster_2_1.
Two RHS callbacks are provided: rhs_full_CD() — full per-size master equations (Eqs. 152, 155, 157) dispatches between Case 1 (fusion) and Case 2 (fission) depending on Parameters.he_mode. rhs_bin_moment() — Chapter 9 size-bin moment RHS (Eqs. 193-208)
Window-solver data structures are shared with the solver.cpp infrastructure inherited from Eurofer_CD.
Physics reference: Ghoniem (2026), Rate_Equations.pdf.
Definition in file rate_equations.h.
| using CVRhsFn_t = int(*)(sunrealtype, N_Vector, N_Vector, void*) |
Definition at line 32 of file rate_equations.h.
| void build_kernel_tables | ( | Parameters & | P | ) |
Populate the y-independent size lookup tables in P (cbrt/sqrt/pow23/xi, the fused Marian junction yield, and the per-bin Σn / Σn² reconstruction moments). Must be called ONCE after build_parameters() and BEFORE the first RHS evaluation. Idempotent.
Purely a cost optimization: every entry is produced by the same std:: call the kernel made inline before, and the kernel expressions are otherwise unchanged, so the RHS remains bit-identical. If this is never called the kernels fall back to computing the values inline (correct, just slower).
Definition at line 270 of file rate_kernels.cpp.
| int prec_setup | ( | sunrealtype | t, |
| N_Vector | y, | ||
| N_Vector | fy, | ||
| sunbooleantype | jok, | ||
| sunbooleantype * | jcurPtr, | ||
| sunrealtype | gamma, | ||
| void * | user_data | ||
| ) |
Jacobi diagonal preconditioner setup (for GMRES, window mode).
Definition at line 370 of file rhs_dispatch.cpp.
| int prec_solve | ( | sunrealtype | t, |
| N_Vector | y, | ||
| N_Vector | fy, | ||
| N_Vector | r, | ||
| N_Vector | z, | ||
| sunrealtype | gamma, | ||
| sunrealtype | delta, | ||
| int | lr, | ||
| void * | user_data | ||
| ) |
Definition at line 390 of file rhs_dispatch.cpp.
| int rhs_bin_moment | ( | sunrealtype | t, |
| N_Vector | y, | ||
| N_Vector | ydot, | ||
| void * | user_data | ||
| ) |
Size-bin moment RHS (Chapter 9, Eqs. 193-216). Intra-bin closure dispatched by Parameters.shape_function: 0 = constant (piecewise-constant, 1 moment/bin) 1 = linear (hat-function / dual-basis, 2 moments/bin) 2 = lognormal (log-normal shape, 3 moments/bin)
Definition at line 1514 of file rate_kernels.cpp.
| int rhs_full_CD | ( | sunrealtype | t, |
| N_Vector | y, | ||
| N_Vector | ydot, | ||
| void * | user_data | ||
| ) |
Full per-size RHS (Eqs. 152, 155, 157).
Dispatches between: he_mode == 0 (Case 2, fission/decoupled, Eq. 175) he_mode == 1 (Case 1, fusion/mean-field, Eq. 174)
Definition at line 1491 of file rate_kernels.cpp.