Computing Library › Solvers Methods
Solvers Methods

Matrix-Free Methods

Matrix-free methods provide the action of an operator on a vector without assembling or storing the operator as an explicit matrix.

Operators as functions, not arrays

Many iterative algorithms (Krylov solvers, power iteration, some eigensolvers) require only the result of applying an operator to a vector, never the operator's individual entries. Matrix-free methods take advantage of this by implementing the operator as a routine that computes A*v directly, from the underlying physics or discretization, rather than building the matrix A and multiplying. The matrix is never stored.

The motivation is memory and, often, speed. High-order discretizations in three dimensions produce matrices whose storage and bandwidth swamp modern hardware. Recomputing the action on the fly can be faster than fetching a huge sparse matrix from memory, because current processors are limited more by memory bandwidth than by arithmetic.

Kronos motion — solvers

Where the action comes from

In JFNK the action is a finite difference of the nonlinear residual. In high-order finite element and spectral element methods, the action is computed by sum-factorization, evaluating element integrals through tensor-product operations that scale far better than a dense elemental matrix. In stencil-based finite difference and volume codes, the action is simply the stencil applied to the vector.

Tradeoffs and preconditioning

Matrix-free operators save memory and can improve arithmetic intensity, but they preclude preconditioners that inspect matrix entries directly, such as incomplete factorizations. Practical matrix-free codes therefore rely on operator-based preconditioners: multigrid, domain decomposition, or approximate matrices assembled at low order specifically for preconditioning.

Matrix-free techniques are increasingly central to scalable high-order fusion simulation, where storing full system matrices at the required resolution would be infeasible.