Finite element mesh (source code)

= Finite element mesh
{title2=$\mathcal T_h$, $h=\max_j(x_{j+1}-x_j)$}

= Mesh
{synonym}

A <finite element mesh> partitions a domain into simple regions called elements, such as <intervals>, <triangles> or <tetrahedra>. In a conforming partition, distinct element interiors are disjoint, their closures cover the domain closure, and any nonempty intersection is a common face, edge or vertex of both elements. Chen's author notes give this compatibility condition for simplicial <meshes>.https://webapps.math.uci.edu/~chenlong/226/Ch2FEM.pdf[Long Chen, Introduction to Finite Element Methods, §2.1, pp. 3–4; updated January 17, 2024]{ref} Local <piecewise polynomial functions> and local <integrals> are defined on these regions; compatible degrees of freedom join them into a global <conforming finite element space>. The assembled <stiffness matrix> and <mass matrix> then inherit the local overlap pattern.

For the <finite element solution of the one-dimensional Poisson equation>, a <mesh> is simply an ordered list
$$
0=x_0<x_1<\cdots<x_n=1,\qquad
\mathcal T_h=\{[x_j,x_{j+1}]:0\leq j<n\},\qquad
h=\max_{0\leq j<n}(x_{j+1}-x_j).
$$
Nodes are the endpoints; elements are the intervening <intervals>. Four equal elements have five nodes but only three unknown nodal values after imposing the zero <Dirichlet boundary conditions>. A nonuniform partition such as $0,1/8,1/4,1/2,1$ has element lengths $1/8,1/8,1/4,1/2$ and $h=1/2$, so counting elements alone does not measure the largest unresolved scale.

Refining a <finite element mesh> replaces some or all elements by smaller ones. For continuous <piecewise linear functions> in one dimension, retaining all old nodes gives nested <conforming finite element spaces> $V_h\subset V_{h/2}$ when every <interval> is bisected. The old approximation remains available, and the new interior nodes allow additional changes of slope. With a symmetric <coercive bilinear form> and exact integration, best approximation from <Galerkin orthogonality> means that the <energy norm> error cannot increase under such nested refinement.

For the <finite element solution of the one-dimensional Poisson equation>, uniform refinement from four to eight elements increases the unknown count from three to seven. The exact formulas give maximum errors $0.0078125$ and $0.001953125$, and <energy norm> errors approximately $0.0721688$ and $0.0360844$. Refinement near a region of strong curvature can spend unknowns where the <linear interpolation> error matters most; convergence in a general problem still needs approximation and regularity assumptions such as those in the <finite element interpolation estimate>.