Computing Library › Numerical Methods
Numerical Methods

The Finite Element Method

A discretization that represents the solution as a sum of local basis functions over a mesh and enforces the equation in a weak, integral sense.

From strong form to weak form

The finite element method (FEM) starts by rewriting a differential equation in weak form: instead of requiring the equation to hold pointwise, it requires that the equation, multiplied by a test function and integrated over the domain, hold for all test functions in a chosen space. This weak formulation lowers the smoothness required of the solution and integrates boundary conditions naturally, making it well suited to complex geometries and heterogeneous materials.

Basis functions on a mesh

Kronos motion — mesh

The domain is divided into elements (triangles, quadrilaterals, tetrahedra), and the solution is represented as a weighted sum of basis functions, each nonzero only over a few neighboring elements. Substituting this representation into the weak form and choosing the test functions from the same space (the Galerkin method) yields a sparse linear system for the basis coefficients. The local support of the basis functions is what makes the system sparse.

Assembly and solution

Strengths and the fusion connection

FEM's great advantage is geometric flexibility: it meshes arbitrary shapes and handles complex boundary conditions cleanly, which is why it dominates structural mechanics, electromagnetics, and multiphysics coupling. In fusion it is used for magnet and structural analysis, for electromagnetic field computation, and in some plasma equilibrium and MHD codes. Its rigorous mathematical foundation supports reliable a posteriori error estimation and adaptivity, and it produces the large sparse systems handled by sparse direct and Krylov solvers.