Series: Finite Element Method › Shape Functions on Reference Elements
The Line2 Element
The simplest 1D element is the Line2 element: a 2-node linear element on the
reference interval [0,1] with nodes at x^0=0 and x^1=1.
In the library, it is implemented in elements/line2.py
by the class Line2.
The two shape functions are the linear Lagrange basis polynomials on [0,1]:
N0(x^)=1−x^,N1(x^)=x^.
Each is equal to one at its own node and zero at the other. Together they form a
partition of unity, N0+N1=1, and any linear function on [0,1] can be
written as f(x^)=f(0)N0(x^)+f(1)N1(x^). The
reference-domain gradients are constant:
dx^dN0=−1,dx^dN1=1.

When a physical line element has nodes at positions x0 and x1 in space,
the mapping Fe(x^)=x0N0(x^)+x1N1(x^)=x0+(x1−x0)x^, 0≤x^≤1, carries the reference interval to the physical element. The same
shape functions therefore serve a dual role: they define both the approximation
space and the isoparametric geometry mapping.