preconditioner
Jacobi preconditioner for the system matrix A = J M⁻¹ Jᵀ + C.
JacobiPreconditioner
¶
Bases: LinearOperator
A Jacobi (diagonal) preconditioner for the system matrix A = J M⁻¹ Jᵀ + C.
This class provides a .matvec() method that applies the inverse of the diagonal of A, for use with Warp's iterative solvers.
Source code in src/axion/optim/preconditioner.py
matvec
¶
Performs the preconditioning operation z = betay + alpha(M⁻¹@x),
where M⁻¹ is the inverse diagonal matrix stored in _P_inv_diag.
Source code in src/axion/optim/preconditioner.py
update
¶
Re-computes the preconditioner's data. This must be called each time the Jacobian (J) or compliance (C) values change.
Source code in src/axion/optim/preconditioner.py
apply_preconditioner_kernel
¶
Applies the Jacobi preconditioner: z = beta*y + alpha * P⁻¹ * x
Source code in src/axion/optim/preconditioner.py
compute_inv_diag_kernel
¶
Computes the inverse of the diagonal of the system matrix A = J M⁻¹ Jᵀ + C. The result P_inv_diag[i] = 1.0 / A[i,i] is stored.