Computing Library › Solvers Methods
Solvers Methods

Jacobian-Free Newton-Krylov

JFNK approximates Jacobian-vector products by finite differences of residuals, solving large nonlinear systems without ever forming the Jacobian.

Never building the matrix

Jacobian-free Newton-Krylov (JFNK) is a matrix-free realization of the Newton-Krylov method. Krylov solvers like GMRES need only the product of the Jacobian with a vector, never the matrix itself. JFNK exploits this by approximating the Jacobian-vector product with a finite difference of the nonlinear residual: J*v is estimated as [F(u + eps*v) - F(u)] / eps for a small perturbation eps. Each Krylov iteration then costs one extra residual evaluation.

This eliminates the need to derive, form, or store the Jacobian, which for complex multi-physics systems can be prohibitively difficult and memory-intensive. The method sees the nonlinear operator only through function evaluations.

Kronos motion — solvers

Choosing the perturbation

The finite-difference parameter eps must balance two errors: too large and the linear approximation is poor; too small and floating-point cancellation corrupts the difference. Standard formulas scale eps with the norms of u and v and the square root of machine precision, giving a robust default that adapts to the problem's magnitudes.

Preconditioning is still required

Being matrix-free does not remove the need for preconditioning; a poorly conditioned system still makes GMRES stall. JFNK preconditioners are often built from an approximate, cheaply formed Jacobian or from physics-based operator splittings, applied on the left or right of the matrix-free product. This blend of matrix-free accuracy and approximate-matrix preconditioning is the practical heart of the method.

JFNK is favored for tightly coupled fusion multi-physics, where writing an exact Jacobian across transport, fields, and atomic physics would be impractical but residual evaluations are readily available.