Series: Finite Element MethodShape 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^\hat{T} with vertices x^0=(0,0)\hat{x}_0 = (0,0), x^1=(1,0)\hat{x}_1 = (1,0), x^2=(0,1)\hat{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^\hat{T} is provided by the barycentric coordinates L0L_0, L1L_1, L2L_2, defined by

L0(x^,y^)=1x^y^,L1(x^,y^)=x^,L2(x^,y^)=y^.L_0(\hat{x}, \hat{y}) = 1 - \hat{x} - \hat{y}, \qquad L_1(\hat{x}, \hat{y}) = \hat{x}, \qquad L_2(\hat{x}, \hat{y}) = \hat{y}.

Each LiL_i equals one at vertex ii and zero at the other two, and they satisfy L0+L1+L2=1L_0 + L_1 + L_2 = 1 everywhere on T^\hat{T}. The Tri3 shape functions are exactly the barycentric coordinates:

N0=L0=1x^y^,N1=L1=x^,N2=L2=y^.N_0 = L_0 = 1 - \hat{x} - \hat{y}, \qquad N_1 = L_1 = \hat{x}, \qquad N_2 = L_2 = \hat{y}.

The partition of unity N0+N1+N2=1N_0 + N_1 + N_2 = 1 follows immediately. Since all three functions are linear, their reference-domain gradients are constant:

N0=(11),N1=(10),N2=(01).\nabla N_0 = \begin{pmatrix}-1\\-1\end{pmatrix}, \qquad \nabla N_1 = \begin{pmatrix}1\\0\end{pmatrix}, \qquad \nabla N_2 = \begin{pmatrix}0\\1\end{pmatrix}.

The figure below shows the three shape functions as filled contour plots over the reference triangle.

Shape functions of the Tri3 element

Any linear function ff on T^\hat{T} is recovered exactly as f=f(x^0)N0+f(x^1)N1+f(x^2)N2f = f(\hat{x}_0)\,N_0 + f(\hat{x}_1)\,N_1 + f(\hat{x}_2)\,N_2. When the physical element has vertices x0x_0, x1x_1, x2x_2 in Rd\mathbb{R}^d, the same combination Fe(x^)=x0N0+x1N1+x2N2F_e(\hat{x}) = x_0 N_0 + x_1 N_1 + x_2 N_2 gives the affine isoparametric mapping from T^\hat{T} to the physical triangle.