Series: Finite Element Method › Shape Functions on Reference Elements
The Tri3 Element
The Tri3 element is the simplest triangular element: 3 nodes, one at each
vertex of the reference triangle, with linear shape functions. The
reference domain is the right triangle T^ with vertices
x^0=(0,0), x^1=(1,0), x^2=(0,1), matching the
triangle reference domain.
In the library, it is implemented in elements/tri3.py
by the class Tri3.
A natural coordinate system on T^ is provided by the barycentric
coordinates L0, L1, L2, defined by
L0(x^,y^)=1−x^−y^,L1(x^,y^)=x^,L2(x^,y^)=y^.
Each Li equals one at vertex i and zero at the other two, and they satisfy
L0+L1+L2=1 everywhere on T^. The Tri3 shape functions are
exactly the barycentric coordinates:
N0=L0=1−x^−y^,N1=L1=x^,N2=L2=y^.
The partition of unity N0+N1+N2=1 follows immediately. Since all
three functions are linear, their reference-domain gradients are constant:
∇N0=(−1−1),∇N1=(10),∇N2=(01).
The figure below shows the three shape functions as filled contour plots over the
reference triangle.

Any linear function f on T^ is recovered exactly as
f=f(x^0)N0+f(x^1)N1+f(x^2)N2. When the
physical element has vertices x0, x1, x2 in Rd, the same
combination Fe(x^)=x0N0+x1N1+x2N2 gives the affine
isoparametric mapping from T^ to the physical triangle.