Skip to content

Solver and numerics

Nasr Ghoniem edited this page Oct 3, 2026 · 2 revisions

Solver and numerics

Time integration uses SUNDIALS CVODE with the variable-order BDF method. The method suits the stiffness of coupled defect kinetics: the rates span many decades, and the physical times range from microseconds to $10^8$ s.

Solver modes

Mode Description
full_system CVODE on the full state vector
active_window two independent sliding windows, one over SIA size and one over vacancy size, with an OpenMP-parallel right-hand side

In the active_window mode the number of threads is selected automatically. Set the environment variable OMP_NUM_THREADS to override it.

Linear solvers

linsol Linear solver Note
dense dense direct
band banded direct
gmres GMRES with the Jacobi or the Woodbury preconditioner
klu KLU sparse direct needs SuiteSparse/KLU. Discrete equations only

The Woodbury preconditioner

For the GMRES path the Jacobian has the structure $J = T + U V^T$:

  • $T$ is banded, with half-bandwidth $\max(2 i_{\rm mobile}, 2 v_{\rm mobile}) + 1$
  • $U V^T$ is a correction of rank $r = i_{\rm mobile} + v_{\rm mobile}$, which comes from the coupling of the mobile species

The Woodbury preconditioner exploits this structure exactly. It uses a LAPACK banded factorization for $T$ and a dense factorization of the $r \times r$ Schur complement.

It is the default for full_system with GMRES. For the active_window mode the active system is small, and Jacobi with GMRES converges faster.

Note: The Woodbury preconditioner needs LAPACK. Without LAPACK the solver uses the Jacobi preconditioner.

Cost control

  • The bin-moment reduction integrates $O(10^2)$ unknowns for a size range that would need one ODE per cluster size in the discrete formulation.
  • The helium reductions remove the second dimension of the vacancy-helium grid.
  • The adaptive domain (run_adaptive()) expands the tracked size range only when the population reaches the boundary.

Reproducibility

Every run records the git hash, the machine and the resolved parameters, and it reports the conservation residuals. See Outputs and provenance and Verification.

Clone this wiki locally