Methods, A to Z
The inverse lookup. You have heard of a method and want to know where it applies, or you are choosing between two and want to know what each costs.
Five families of methods, and one section for each. Read the method's class first: a method outside its class is not a slower answer, it is a wrong one, or a run that does not finish. Inside a section, each method gives three things. Its class comes first, as the link to the page that argues for it. Then the step: the arithmetic at the centre of the method, the update it repeats or the equation it solves. Then the price: what it needs from you, and what it will not do. Where a method has several variants, the step is the representative member, and the class links say what each variant covers.
| family | what it answers | entries |
|---|---|---|
| Finding a state | : one unknown, or equations in unknowns | 19 |
| Linear systems | : one answer that satisfies many equations at once | 20 |
| Eigenvalues | : the directions a matrix does not turn | 8 |
| Moving problems | : an answer that travels, or settles, in time | 19 |
| Averaging | : an answer that is a distribution, not a number | 11 |
A family counts once, and a method filed under two classes appears in both, so the column is entries rather than a partition of the book's methods.
Finding a state
Bisection
Class: Root
; keep the half where changes sign
A bracket. Certain, and slow: about three steps per digit
Secant, false position
Class: Root
Two points. No derivative; can leave the bracket
Newton
Class: Root, Optimisation
The Jacobian, and a start close enough. Fast, local, fragile
Quasi-Newton (Broyden)
Class: Root, Optimisation
; the least-change update of , then
Gradients, not second derivatives. The stored matrix grows with the problem
Brent
Class: Root
, guarded by a bracket and bisected when it stalls
A bracket, no derivative. The default for one equation
Fixed-point iteration
Class: Root
, with at the answer
A map whose error shrinks. Converges when it contracts, and most interesting cases do not
Continuation, homotopy
Class: Root, Saddle point
, as
A solved case to walk from. The tool for several solutions and toggle points
Trust region
Class: Root, Optimisation
A radius inside which the model is trusted. Survives a poor linear model; each step is a subproblem
Levenberg–Marquardt
Class: Root, Optimisation
; adjust after the step
A least-squares residual. Damps the step, so it survives a bad start
Gradient descent
Class: Optimisation
A gradient. Cheap steps, slow arrival, and it zig-zags in a narrow valley
Quasi-Newton (BFGS)
Class: Optimisation
; the least-change rank-two update of
Gradients. Better than descent, and needs memory for the matrix
Gauss–Newton
Class: Optimisation
, then
A least-squares residual and its Jacobian. The fitting workhorse
Nelder–Mead
Class: Optimisation
, with
Nothing but values. Fine in a few variables, unreliable beyond
Simplex method
Class: Optimisation (linear)
subject to , ; pivot between vertices
A linear problem in standard form. Corners, exactly
Interior point
Class: Optimisation
subject to , as
A convex problem. Scales to large systems; needs a linear solve
Sequential quadratic programming (SQP)
Class: Optimisation
subject to
Smooth constraints. Expensive steps; the general answer
Stochastic gradient, Adam
Class: Optimisation (noisy)
A sampled gradient. Fast on huge data, imprecise at the answer
Multistart, basin hopping
Class: Optimisation (not convex)
from starts
Many cheap runs. No guarantee; a way of finding a better local minimum
Bayesian optimisation
Class: Optimisation (expensive)
A surrogate and a prior. Best when one run costs a day
The symbols used above.
- is the function whose zero you want.
- carries the same idea for several equations at once: a vector that is zero when they all hold.
- and bracket one root, and is the point halfway between them.
- is the current guess and the next.
- is the Jacobian, the matrix of 's first derivatives.
- is a running approximation to the Jacobian, is the step taken, and is the change it produced.
- is the linear step a method solves for.
- is the third point that inverse quadratic interpolation (IQI) fits through , and .
- is the map a fixed-point iteration applies, and is the point it settles at.
- walks a homotopy from a problem you can solve, , to the one you want.
- In the trust-region method, is the radius, the trial step, the local model and its gradient.
- From gradient descent onward, is the objective rather than a residual, is the step length, is a residual and is the identity matrix.
- In the simplex method, is the cost vector, the constraint matrix, its right-hand side and the variables.
- is a slack in the interior-point method, where is the barrier weight.
- In the sampling methods, are the parameters being learned, and are running estimates of the gradient and of its square, guards a division, and is the best value seen so far.
- There is an expectation over the surrogate model, and is the -th starting point.
Linear systems
Dense LU, with pivoting
Class: Linear system
; solve , then
A few thousand unknowns. Cubic work, and it answers every right-hand side
Cholesky
Class: Linear system (symmetric positive definite)
for
Half the work of LU, and it refuses anything indefinite
QR, SVD
Class: Linear system (rectangular), Eigenvalues
, ;
Least squares, rank, and a diagnostic of conditioning. Expensive, and honest
Normal equations
Class: Linear system (least squares)
, with
Simple, and it squares the condition number. Avoid unless the matrix is well conditioned
Sparse direct (Cholesky, LU, multifrontal)
Class: Linear system, Elliptic, Saddle point
, with chosen to limit fill
A factorisation and an ordering. Excellent in two dimensions; fill-in limits three
Conjugate gradients
Class: Linear system (symmetric positive definite)
, ,
A symmetric positive definite matrix. Needs a preconditioner to be quick
GMRES, BiCGSTAB
Class: Linear system, Saddle point
The matrix, and a preconditioner. Memory grows with the iteration count
MINRES
Class: Linear system (indefinite), Saddle point
the same minimum for , with a three-term recurrence
Symmetry and indefiniteness. The right Krylov method for a block system
Iterative refinement
Class: Linear system (ill-conditioned)
; solve , then
A factorisation and a residual. Recovers digits a single solve loses
Multigrid, algebraic multigrid (AMG)
Class: Linear system, Elliptic
, with smoothing before and after
A hierarchy of meshes, or a matrix graph. Close to linear in the size
Preconditioners (ILU, Jacobi, AMG)
Class: Linear system, Elliptic, Saddle point
with ; ILU uses
The matrix. The difference between converging and not
Jacobi, Gauss–Seidel, SOR
Class: Linear system, Elliptic
A mesh. A smoother inside multigrid, and slow on its own
Domain decomposition
Class: Elliptic
, with
A partition of the region. Scales on many cores; needs an interface solve
Fast Fourier transform (FFT)
Class: Elliptic (constant coefficients)
in
A regular, periodic grid. Exact and fast, and refuses everything else
Boundary element
Class: Elliptic
The boundary alone. Linear, homogeneous, unbounded regions; a varying coefficient inside defeats it
Schur complement
Class: Saddle point
; solve
A good solver for the state block. The Schur complement is dense
Uzawa
Class: Saddle point
,
Iteration on the multiplier alone. Quick to write, slow without help
Null-space method
Class: Saddle point
with spanning ; solve
A parameterisation of the allowed directions. Exact constraints, small systems
Constraint elimination
Class: Saddle point
; solve
A simple, local constraint. Removes unknowns; dense, coupled constraints defeat it
Augmented Lagrangian
Class: Saddle point
, then
A penalty and a multiplier together. Better conditioning; the penalty term hides the constraint error
The symbols used above.
- is the matrix, the right-hand side and the answer they solve for.
- is a permutation, which reorders rows for stability.
- and are the lower and upper triangular factors, and is the intermediate vector in a two-stage solve.
- is the condition number: the factor by which a relative error in can grow in .
- has orthonormal columns and is upper triangular.
- In the singular value decomposition, and are orthogonal and holds the singular values.
- is a preconditioner that approximates , and is its incomplete factorisation.
- is the residual at step , the search direction, and the distance moved along it.
- is the Krylov space spanned by , and the products after them.
- is the starting guess.
- In relaxation, are entries of , of , and is the over-relaxation weight.
- restricts a vector to subdomain , and is that subdomain's matrix.
- In the boundary-element method, is the region, its boundary, the outward normal, the unknown field, the Green's function, and the local boundary geometry factor.
- is the Schur complement of the block system.
- There is the constraint matrix, and are its two right-hand sides, and is the multiplier, with the step in Uzawa.
- spans the directions the constraints allow, is the coordinate vector in that basis, is one particular solution, and maps reduced unknowns back to the full set.
- is the augmentation weight.
- In the Fourier method, is the number of grid points, the value at point , its coefficient, and the imaginary unit.
Eigenvalues
QR algorithm
Class: Eigenvalues (dense)
,
The whole matrix. All eigenvalues, and cubic cost
QZ
Class: Eigenvalues (generalised)
,
Two dense matrices. Handles a singular mass matrix
Power iteration
Class: Eigenvalues (extreme)
,
One matrix-vector product. The largest eigenvalue, slowly
Inverse iteration, shift-invert
Class: Eigenvalues (interior)
,
A linear solve with a shifted matrix. The practical route to interior eigenvalues
Lanczos, Arnoldi
Class: Eigenvalues (sparse)
; eigenvalues of
A Krylov subspace. A few extreme eigenvalues of a large matrix
Subspace iteration
Class: Eigenvalues (sparse)
A block of vectors. Several dominant eigenvalues at once; interior ones are out of reach
Jacobi–Davidson
Class: Eigenvalues (interior, non-linear)
A preconditioner and a target. Complex to set up, and worth it
Contour integral (FEAST)
Class: Eigenvalues (interior)
, eigenvalues inside
A contour and a linear solve. Every eigenvalue in a window; needs a good shifted solver
The symbols used above.
- and are the matrices, and is the identity.
- is an eigenvalue with eigenvector , so .
- is the shift chosen to bring a wanted eigenvalue to the top of the spectrum.
- In the QR algorithm, is the factorisation and is the next matrix in the sequence.
- In QZ, and are the triangular factors of and .
- is the current vector, and is its length.
- holds the basis vectors of a Krylov subspace.
- is the small matrix the projection produces, is the entry immediately below its corner, and is the last unit vector.
- is the current estimate of an eigenvalue and its eigenvector, with the residual left by the Davidson correction.
- In the contour method, is the closed curve and the variable integrated around it, so is one shifted inverse solve at each point of the curve.
Moving problems
Forward Euler, explicit Runge–Kutta
Class: Parabolic, Hyperbolic
; RK4 adds
A step inside the stability limit. Cheap per step
Backward Euler
Class: Parabolic (stiff)
A linear solve per step. Unconditionally stable, first order
Crank–Nicolson
Class: Parabolic
A linear solve per step. Second order, and it rings at a sharp start
BDF, Radau, implicit Runge–Kutta
Class: Parabolic (stiff)
A linear solve and an error estimate. The stiff default
Adaptive step control
Class: Parabolic, Hyperbolic
An error estimator. Turns a fixed step into a trustworthy one
ADI
Class: Parabolic (grid)
, then swap and
A rectangular grid. Splits the solve by direction
Spectral methods
Class: Parabolic
; differentiate the
A smooth solution in a simple region. Very accurate; a shock or a complex boundary defeats it
Exponential integrators
Class: Parabolic
A dominant linear term and a small non-linear one. Exact in the linear part, and no help when it is not
Method of characteristics
Class: Hyperbolic
; is constant along
Known paths. Exact where they exist
Upwind
Class: Hyperbolic
for
The direction of travel. Stable, and it diffuses the answer
Lax–Wendroff
Class: Hyperbolic
Second order in space and time. Smooth waves; it wiggles at a shock
Godunov, finite volume
Class: Hyperbolic (conservation)
A flux function. Correct shocks, more work per face
Riemann solvers (Roe, HLLC, exact)
Class: Hyperbolic (conservation)
A flux between two states. Correct wave speeds; check the entropy fix
WENO, limiters
Class: Hyperbolic
,
A stencil and a smoothness measure. High order without wiggles
Discontinuous Galerkin
Class: Hyperbolic, Elliptic
A mesh with local polynomials. High order and complex geometry, more unknowns
Spectral element
Class: Hyperbolic
, with nodal
Large elements with a high order inside each. Smooth waves over long times; not shocks
Symplectic integration
Class: Hyperbolic (Hamiltonian)
,
A structure to preserve. Long-time boundedness that others lose
Projection (Chorin)
Class: Saddle point (moving)
, then
A pressure solve per step. The standard route for incompressible flow
SIMPLE
Class: Saddle point (steady)
, then
A pressure correction. The workhorse of steady flow solvers
The symbols used above.
- is the field being advanced and its value at step ; and are the time and space steps.
- is the right-hand side of the semi-discrete system , and is a cell index.
- In Runge–Kutta, to are the stage slopes.
- In BDF and Radau, and are the coefficients of the method and is the number of past steps it uses.
- In adaptive step control, is the error you ask for, the error you estimate, and the order of the method.
- and are the one-dimensional operators in each direction, and is the half-step in ADI.
- In the spectral methods, are the basis functions and their coefficients.
- is the linear part of the operator, its non-linear part, and the first exponential-integrator function.
- is the wave speed and is the flux at a cell face.
- In WENO, are the weights, the ideal weights, the smoothness indicators, and a guard against dividing by zero.
- In the Galerkin method, is an element, the approximation, a test function and the numerical flux at the element's edge.
- In the spectral-element method, are the nodal polynomials and the order inside an element.
- In the Hamiltonian method, is position, is momentum, the potential and the mass matrix.
- In projection and SIMPLE, is the velocity before the correction, the pressure-like potential, the correction to the pressure, and a coefficient of the discretised momentum equation.
Averaging
Monte Carlo
Class: Averaging
, with standard error
A model you can run. Error falls as one over the root of the runs
Importance sampling
Class: Averaging (rare)
A good proposal distribution. Enormous gains, or enormous variance
Stratified and Latin hypercube sampling
Class: Averaging
; LHS draws once in every stratum of every input
A smooth response in a modest dimension. Spreads the draws; a discontinuous response defeats it
Quasi-Monte Carlo
Class: Averaging (smooth)
with low-discrepancy ; error
A low-discrepancy sequence. Faster convergence, no honest error bar
Control variates, antithetic pairs
Class: Averaging
,
A correlated cheap model. Free accuracy when the correlation is strong
Markov chain Monte Carlo
Class: Averaging (Bayesian)
; accept with probability
A target known up to a constant. Correlated samples and a burn-in
Particle filter, sequential Monte Carlo
Class: Averaging (sequential)
, then resample
A state model and a likelihood. Degenerates in high dimension
Kalman filter, ensemble Kalman
Class: Averaging (linear, Gaussian)
, with
A linear model and Gaussian noise. Optimal, and only there
Bootstrap
Class: Averaging (data)
from resamples;
A sample. Error bars without a formula, and none for dependence
Least-squares fit
Class: Optimisation, Linear system
; solve for the coefficients
A model linear in its parameters. A small residual is not a good fit
Gaussian quadrature
Class: Averaging (deterministic)
; exact to degree
A smooth integrand. Exact to a degree, and hopeless above about ten dimensions
The symbols used above.
- is the mean you want, an estimate of it, and the estimate from samples.
- is the quantity being averaged and is the -th draw.
- is the standard deviation of one draw, which is why the standard error is .
- is the density you want and the density you draw from, so their ratio is the weight.
- In stratified sampling, labels a stratum, is its share of the probability and the average inside it.
- In the control-variate method, is a correlated quantity whose average you know, is the fitted slope, and and are covariance and variance.
- In Markov chain Monte Carlo, is the current state, the proposal, the target density and the proposal density, and is the probability of accepting the proposal.
- In the particle filter, is the weight of particle , is the observation, and is the state at the step before.
- In the Kalman filter, is the estimate at step using the data up to , is the gain, is a covariance, maps state to observation, and is the observation noise covariance.
- In the bootstrap, is the estimate from resample , is the number of resamples, and is a standard deviation.
- In quadrature, is the weight function inside the integral, while and are the quadrature weights and nodes, of them.