Finite Element Methods for Partial Differential
Equations
Definition
The Finite Element Method (FEM) is a numerical technique for obtaining approximate solutions to
boundary value problems for partial differential equations (PDEs) by partitioning a spatial domain
into a finite collection of small elements and constructing the solution as a linear combination of
simple local shape functions defined on these elements. The method is built upon a variational
(weak) formulation of the PDE, projects the problem onto a finite-dimensional subspace, and
results in a sparse system of algebraic equations that can be solved with standard linear or
nonlinear solvers.
Core Principles
• Variational (weak) formulation
• Many PDE models can be rewritten as a problem of finding a function u in a function space V
such that a(u, v) = l(v) for all test functions v in V, where a is a bilinear form and l is a linear form.
• The weak form typically lowers differentiability requirements on the solution and naturally
incorporates boundary conditions (Neumann, Robin) while Dirichlet conditions are enforced via the
choice of the function space or by modification of the system.
• Finite dimensional discretization
• Replace the infinite dimensional space V by a finite dimensional subspace V_h spanned by a
finite set of basis (shape) functions {phi_i}, i = 1, ..., N_h.
• Approximate the solution by u_h = sum over i of U_i phi_i, where U_i are unknown coefficients.
• Galerkin projection
• The coefficients U_i are determined by requiring the residual to be orthogonal to the discrete
space, i.e., a(u_h, phi_j) = l(phi_j) for j = 1, ..., N_h.
• This yields a linear system in matrix form K U = f, where K is the stiffness matrix with entries K_ij
= a(phi_j, phi_i) and f is the load vector with entries f_i = l(phi_i).
• Basis functions and meshing
• The domain is partitioned into elements (triangles or quadrilaterals in 2D; tetrahedra or hexahedra
in 3D). On each element, simple polynomials (linear, quadratic, cubic, etc.) define the local shape
functions.
• The global shape functions are assembled from the local ones, typically ensuring continuity
across element interfaces (for standard conforming FEM).
• Isoparametric and curved elements
• For curved geometries, the same basis functions used to approximate the solution are often
employed to approximate the geometry, via an isoparametric mapping between a reference element
and physical elements.
• Assembly and sparsity
• Element-level contributions to K and f are assembled into a global sparse system by mapping
local degrees of freedom to global indices.
Page 1
• The resulting matrices are typically large, sparse, symmetric (for many self-adjoint PDEs), and
positive definite (for standard elliptic problems with Dirichlet BCs), enabling efficient solvers.
• Boundary conditions
• Dirichlet conditions (essential BC) are incorporated by modifying the function space or altering
rows and right-hand sides of the system to fix certain degrees of freedom.
• Neumann and Robin conditions (natural BC) appear naturally in the linear form l(v) or as
additional surface integrals in a(u, v).
• Time discretization (transient problems)
• For parabolic or hyperbolic PDEs, time stepping is used in conjunction with spatial FEM
discretization. Common schemes include backward Euler, Crank-Nicolson, and Newmark methods.
• Transient problems lead to sequences of linear systems in time, often requiring mass matrices M
in addition to the stiffness matrix K.
• Error, convergence, and adaptivity
• Under mild regularity, the discretization error e = u - u_h converges to zero as mesh size h
decreases and polynomial degree p increases, with rates depending on p, h, and solution regularity.
• A posteriori error estimation and adaptive mesh refinement (AMR) use computed residuals to
guide mesh refinement where the error is most significant.
• Numerical integration and implementation
• Element integrals are often evaluated with numerical quadrature rules on reference elements,
mapped to physical elements.
• Efficient implementation relies on sparse storage, effective preconditioning, and scalable solvers
for large-scale problems.
Mathematical/Scientific Context
PDE setting and weak form
• Let Omega be a bounded domain in R^d with boundary Gamma, decomposed into Dirichlet part
Gamma_D and Neumann part Gamma_N (Gamma = Gamma_D union Gamma_N).
• A typical elliptic model is the Poisson-type problem:
-div( a(x) grad u ) = f in Omega
u = g on Gamma_D
a(x) grad u dot n = h on Gamma_N
where a(x) is a positive definite tensor or scalar coefficient, f is a source term, g prescribes the
solution on the Dirichlet boundary, and h prescribes the flux on the Neumann boundary.
• Weak form:
• Find u in V such that a(u, v) = l(v) for all v in V.
• Here V = { v in H1(Omega) : v = g on Gamma_D } is a subspace of the Sobolev space
H1(Omega) (functions with square-integrable first derivatives and square-integrable values on
Omega and on Gamma, with the Dirichlet constraint incorporated).
• The bilinear form a(u, v) typically is integral over Omega of grad u dot a(x) grad v dx (possibly with
more terms for anisotropy or reduced, e.g., div( a grad u ) form). The linear form l(v) is integral over
Omega f v dx plus boundary terms if Neumann data are present, e.g., integral over Gamma_N h v
ds.
Page 2
• For the simplest Poisson problem with homogeneous Dirichlet boundary conditions (u = 0 on
Gamma), the weak form simplifies to:
• Find u in H1_0(Omega) such that integral over Omega grad u dot grad v dx = integral over
Omega f v dx for all v in H1_0(Omega).
Finite element space and discretization
• Choose a mesh T_h of Omega into elements (triangles or quadrilaterals in 2D; tetrahedra or
hexahedra in 3D).
• Define a finite element space V_h subset V as the space of continuous functions that are
piecewise polynomials on each element and satisfy the Dirichlet data (if any) on Gamma_D.
Examples:
• P1 elements: piecewise linear polynomials, linear on each element, continuous across element
boundaries.
• P2 elements: piecewise quadratic polynomials, continuous across boundaries.
• Isoparametric elements: the same basis used to approximate geometry and solution.
• Basis functions {phi_i} for V_h are typically nodal basis functions associated with mesh nodes
(degrees of freedom). The approximate solution is
• u_h = sum over i=1 to N_h of U_i phi_i.
• Assemble the system:
• K_ij = a(phi_j, phi_i) for i, j = 1, ..., N_h (stiffness matrix).
• f_i = l(phi_i) for i = 1, ..., N_h (load vector).
• Solve K U = f for the unknown nodal values U = [U_1, ..., U_N_h]^T.
• Boundary conditions:
• Dirichlet: fix some U_i to prescribed boundary values; modify K and f accordingly (or use a penalty
or Lagrange multiplier approach).
• Neumann: included in f via the surface integral terms on Gamma_N.
• Time dependent problems (brief):
• For a transient diffusion equation u_t - div( a grad u ) = f, discretize space with FEM to get M
dU/dt + K U = F, where M is the mass matrix with entries M_ij = integral over Omega phi_i phi_j dx,
and K is the stiffness matrix as above. Time stepping with backward Euler gives (M/dt + K) U^n =
F^n + (M/dt) U^{n-1}.
Interpretation and properties
• K is typically symmetric and positive definite for standard elliptic problems with Dirichlet BCs,
which implies favorable solver behavior (e.g., Conjugate Gradient method).
• The choice of polynomial degree p and mesh size h controls the approximation power. Higher p
(p-refinement) and/or finer meshes (h-refinement) yield higher accuracy but increase the number of
unknowns.
• Interpolation error and convergence:
• Under sufficient regularity of the true solution u, the H1-norm error satisfies ||u - u_h||_H1 <= C
h^p, where p is the polynomial degree of the finite element space.
• In the L2-norm, the error typically behaves as ||u - u_h||_L2 <= C h^{p+1}, provided u is smooth
enough.
Page 3
• Adaptivity:
• A posteriori error estimators quantify the error using the computed solution, guiding adaptive
mesh refinement to resolve sharp gradients, boundary layers, or singularities efficiently.
• Extensions and variants:
• Mixed finite element methods introduce additional variables (e.g., flux) to handle certain problems
more naturally and guarantee conservation properties.
• Discontinuous Galerkin methods permit discontinuities between elements and offer advantages
for certain PDEs, including convection-dominated problems.
• Isogeometric analysis uses spline-based basis functions to achieve higher smoothness and better
geometry representation.
• hp-FEM combines mesh refinement (h) with increased polynomial degree (p) for exponential
convergence in some problems.
Practical aspects
• Element choice and shape functions
• Linear (P1) elements on triangles are simple and robust, often used for teaching and basic
problems.
• Quadratic (P2) elements on triangles or quadrilaterals provide higher accuracy with modest
increase in unknowns.
• In 3D, tetrahedral or hexahedral elements are common; curved geometry can be captured with
higher order or isoparametric mappings.
• Numerical integration
• Element integrals are evaluated using quadrature rules on a reference element and mapped to
each physical element.
• The order of the quadrature must be sufficient to accurately integrate the polynomials involved in
a and l.
• Solvers and preconditioning
• Sparse direct solvers (e.g., multifrontal methods) are robust but can be memory-intensive for large
problems.
• Iterative solvers (e.g., Conjugate Gradient for SPD systems, GMRES for non-symmetric systems)
with suitable preconditioners (algebraic multigrid, domain decomposition) scale well to large
problems.
• Software layers
• Problem specification (PDE, BCs) mesh generation (geometry, discretization) element-level
computations (shape functions, quadrature, local matrices) assembly of global sparse matrix and
vector solver post-processing (error analysis, visualization).
Applications
• Structural mechanics
• Linear and nonlinear elasticity: modeling stress, strain, and deformation in solids; common in
aerospace, automotive, civil engineering.
• Coupled thermo-mechanical problems where temperature fields affect material stiffness and vice
versa.
Page 4
• Heat conduction and diffusion
• Transient and steady-state diffusion problems in engineering and environmental science; modeling
thermal insulation, cooling of electronic components, and contaminant transport.
• Fluid mechanics and convection-diffusion
• Steady and unsteady diffusion-advection problems; Stokes flow and incompressible
Navier-Stokes equations can be approximated with mixed or stabilized FEM approaches.
• Electromagnetics
• Solving Maxwell's equations in frequency or time domain for waveguides, antennas, and
scattering problems; edge elements (Nedelec elements) are used to enforce tangential continuity.
• Acoustics and vibroacoustics
• Helmholtz problems, damped wave equations, and vibration analysis in mechanical and
aeroacoustic contexts.
• Geophysics and biomechanics
• Groundwater flow, subsurface drainage, and biomechanical simulations of tissues, bones, and
organs requiring anisotropic material models and complex geometries.
• Additive manufacturing and material science
• Heat treatment, phase-field models, and diffusion in composites; FEM enables simulation-driven
design and optimization.
Summary
• The finite element method provides a principled framework to convert PDE boundary value
problems into tractable algebraic systems by:
• recasting the PDE in a variational (weak) form to accommodate weaker regularity and complex
boundaries,
• discretizing the variational problem with a finite element space defined on a mesh of the domain,
• assembling a sparse system that reflects the physics through bilinear and linear forms,
• solving for the approximate solution and analyzing its accuracy via convergence theory and error
estimation.
• Core strengths include flexibility to handle complex geometries, heterogeneous and anisotropic
materials, and a wide range of PDE types, along with powerful adaptive strategies to concentrate
computational effort where it matters most.
• Mastery of FEM requires understanding the interplay between mathematical formulation,
discretization choices (mesh, basis functions, and refinement strategy), numerical integration,
solver technology, and problem-specific physics.
If you would like, I can add a small worked example (Poisson problem on a simple domain with
Dirichlet boundary conditions) to illustrate the steps from weak form to the assembled linear system
and its solution.
Page 5