Algorithm Search⌘K

Definitionintro

Lagrange finite element

Also called Pk Lagrange element.

The element whose degrees of freedom are values at nodes, giving continuous piecewise polynomials of degree k.

The Lagrange finite element of degree kk is the element whose shape functions are the polynomials of degree at most kk on a cell and whose degrees of freedom are the values of the function at a fixed set of nodes. Its nodal basis functions are 11 at one node and 00 at all the others, so the coefficient of a finite element function is its value at that node. On a mesh, neighboring cells share the nodes on their common face, and this makes the global function continuous, so the space lies in H1H^1 and suits second-order problems such as the Poisson equation. The case k=1k = 1 on triangles is Courant's piecewise linear element.

Definition

On a simplex. Let K⊂RdK \subset \mathbb{R}^d be a simplex with vertices a0,…,ada_0, \ldots, a_d and let k≥1k \ge 1. The Lagrange element of degree kk is the Ciarlet finite element (K,Pk,N)(K, \mathcal{P}_k, \mathcal{N}) with

N={v↦v(xβ)},xβ=∑i=0dβik ai,β=(β0,…,βd), βi≥0 integers, ∑iβi=k.\mathcal{N} = \{v \mapsto v(x_\beta)\}, \qquad x_\beta = \sum_{i=0}^d \frac{\beta_i}{k}\,a_i, \qquad \beta = (\beta_0, \ldots, \beta_d), \ \beta_i \ge 0 \text{ integers}, \ \sum_i \beta_i = k .

The nodes xβx_\beta form the principal lattice of order kk. Their number equals dim⁡Pk=(k+dd)\dim\mathcal{P}_k = \binom{k+d}{d}: in 2D it is (k+1)(k+2)/2(k+1)(k+2)/2, which is 3,6,103, 6, 10 for k=1,2,3k = 1, 2, 3, and in 3D it is (k+1)(k+2)(k+3)/6(k+1)(k+2)(k+3)/6, which is 4,10,204, 10, 20.

Unisolvence and continuity. A polynomial of degree kk that vanishes at the principal lattice is zero. The proof goes face by face: the nodes on a face are the principal lattice of that face, so by induction on dd the polynomial vanishes on the face and contains the barycentric coordinate of the face as a factor. The same face property gives continuity. Two cells that share a face have the same nodes on it, the restriction of each polynomial to the face is a polynomial of degree kk fixed by those nodes, so the two restrictions agree. The global space

Vh={v∈C(Ω‾):v∣K∈Pk for all K∈Th}V_h = \{v \in C(\overline\Omega) : v|_K \in \mathcal{P}_k \text{ for all } K \in \mathcal{T}_h\}

is therefore a subspace of H1(Ω)H^1(\Omega). Its nodal basis function ϕi\phi_i is 11 at the global node xix_i, 00 at all other nodes, and nonzero only on the cells that contain xix_i.

On boxes. On a rectangle or a brick the space Qk\mathcal{Q}_k of polynomials of degree at most kk in each variable separately, with the tensor product of k+1k+1 nodes per direction, is the tensor-product Lagrange element. Q1 on a square has the four vertex values and the basis (1−x)(1−y)(1-x)(1-y), x(1−y)x(1-y), xyxy, (1−x)y(1-x)y.

Basis in barycentric coordinates. With barycentric coordinates λi\lambda_i of the simplex, the P1 basis is λi\lambda_i. The P2 basis is λi(2λi−1)\lambda_i(2\lambda_i - 1) for each vertex and 4λiλj4\lambda_i\lambda_j for the edge between vertices ii and jj. At an edge midpoint, λi=λj=12\lambda_i = \lambda_j = \tfrac12, the edge function is 11 and the vertex functions are 00. The six functions add up to 2(∑iλi)2−∑iλi=12(\sum_i\lambda_i)^2 - \sum_i\lambda_i = 1.

Examples and non-examples

P1 on an interval. On [xi−1,xi][x_{i-1}, x_i] of length hh the two shape functions are linear and the element matrices for a(u,v)=∫u′v′a(u, v) = \int u'v' and the mass form (u,v)(u, v) are

AK=1h(1−1−11),MK=h6(2112).A_K = \frac1h\begin{pmatrix} 1 & -1 \\ -1 & 1\end{pmatrix}, \qquad M_K = \frac h6\begin{pmatrix} 2 & 1 \\ 1 & 2\end{pmatrix}.

P2 on an interval. On [0,1][0, 1] with nodes 0,12,10, \tfrac12, 1 the basis is ϕ0=(1−x)(1−2x)\phi_0 = (1 - x)(1 - 2x), ϕ1/2=4x(1−x)\phi_{1/2} = 4x(1 - x) and ϕ1=x(2x−1)\phi_1 = x(2x - 1). For example ϕ1/2(12)=4⋅12⋅12=1\phi_{1/2}(\tfrac12) = 4\cdot\tfrac12\cdot\tfrac12 = 1. On a cell of length hh, with the local order left, middle, right, the exact element matrices are

AK=13h(7−81−816−81−87),MK=h30(42−12162−124).A_K = \frac1{3h}\begin{pmatrix} 7 & -8 & 1 \\ -8 & 16 & -8 \\ 1 & -8 & 7\end{pmatrix}, \qquad M_K = \frac h{30}\begin{pmatrix} 4 & 2 & -1 \\ 2 & 16 & 2 \\ -1 & 2 & 4\end{pmatrix}.

The rows of AKA_K add up to zero because constants have zero derivative. The entries of MKM_K add up to hh, the length of the cell, because the basis functions add up to 11.

An interpolation error by hand. Interpolate u=x3u = x^3 on [0,1][0, 1] by one P2 element. The nodal values are 0,18,10, \tfrac18, 1, so Iu=18ϕ1/2+ϕ1=32x2−12xI u = \tfrac18\phi_{1/2} + \phi_1 = \tfrac32x^2 - \tfrac12x and u−Iu=x(x−12)(x−1)u - Iu = x(x - \tfrac12)(x - 1), the node polynomial. Its maximum size is 3/36≈0.0481\sqrt3/36 \approx 0.0481, at x=12±123x = \tfrac12 \pm \tfrac1{2\sqrt3}.

Convergence rates. For −u′′=π2sin⁡(πx)-u'' = \pi^2\sin(\pi x) on (0,1)(0, 1) with u(0)=0u(0) = 0 and u(1)=1u(1) = 1, so u=sin⁡(πx)+xu = \sin(\pi x) + x, the Galerkin solutions on nn equal cells give these errors. The code is the 1D solver of finite element assembly.

nn P1, ∥u−uh∥0\Vert u - u_h\Vert_0 P1, ∣u−uh∣1\vert u - u_h\vert_1 P2, ∥u−uh∥0\Vert u - u_h\Vert_0 P2, ∣u−uh∣1\vert u - u_h\vert_1
4 3.928e-02 4.985e-01 1.952e-03 5.062e-02
8 9.921e-03 2.512e-01 2.457e-04 1.274e-02
16 2.487e-03 1.258e-01 3.076e-05 3.190e-03
32 6.220e-04 6.295e-02 3.847e-06 7.978e-04

The observed orders from the last two rows are 2.002.00 and 1.001.00 for P1 and 3.003.00 and 2.002.00 for P2, as the estimates ∥u−uh∥0≤Chk+1∣u∣k+1\|u - u_h\|_0 \le Ch^{k+1}|u|_{k+1} and ∣u−uh∣1≤Chk∣u∣k+1|u - u_h|_1 \le Ch^k|u|_{k+1} predict. For the same number of unknowns, P2 on 16 cells (33 nodes) is about 20 times more accurate in L2L^2 than P1 on 32 cells (33 nodes).

Non-example: discontinuous elements. The same Pk\mathcal{P}_k with nodes strictly inside each cell gives a space of discontinuous functions. It is not a subspace of H1H^1, and it needs the discontinuous Galerkin weak form.

Non-example: a hanging node. Split one of two neighboring triangles so that a new vertex sits at the midpoint of the shared edge, but not the other. Gluing P1 elements by nodes gives a function that is not continuous along that edge, unless the value at the hanging node is constrained to the mean of the values at the two ends of the edge.

Non-example: wrong nodes. Six nodes on a triangle that lie on one conic do not determine a quadratic. The Ciarlet finite element page gives an example.

  • Ciarlet finite element. The general triple of which the Lagrange element is the case with point values as degrees of freedom.
  • Hermite elements. Add derivative values to the degrees of freedom, for C1C^1 continuity in one dimension or for plates.
  • Spectral elements. Use Qk\mathcal{Q}_k with Gauss-Lobatto-Legendre nodes in place of equispaced ones, which keeps the basis well conditioned for large kk and makes nodal quadrature accurate. See spectral element method and Gauss-Lobatto quadrature.
  • Hierarchical bases. Span the same Pk\mathcal{P}_k with a basis in which raising kk adds functions and keeps the old ones, as the hp finite element method needs.
  • Isoparametric elements. Use the Lagrange basis of degree kk also to map the reference cell, which gives curved cells.

References

  1. Susanne C. Brenner and L. Ridgway Scott, The Mathematical Theory of Finite Element Methods, third edition, Springer, 2008, Chapter 3 (Lagrange elements on simplices and rectangles, continuity of the global space)
  2. Philippe G. Ciarlet, The Finite Element Method for Elliptic Problems, SIAM Classics in Applied Mathematics 40, 2002, Chapter 2 (simplicial and rectangular Lagrange finite elements, the principal lattice)
  3. Alexandre Ern and Jean-Luc Guermond, Theory and Practice of Finite Elements, Applied Mathematical Sciences 159, Springer, 2004, Chapter 1 (Lagrange finite elements and their interpolation)
  4. R. Courant, Variational methods for the solution of problems of equilibrium and vibrations, Bulletin of the American Mathematical Society 49(1) (1943) 1-23, the appendix with piecewise linear functions on triangles

Where this leads

About this page

The build computes these levels from the evidence in the repository. Each row says what the next level needs. Read what the levels mean.

LadderLevelWhat the next level needs
Human proofH0 no proof
  • add a proof in proofs/ (06.5)
LeanL0 no Lean part
  • name a Lean module in the lean field (07)
VisualV0 none
  • add viz/scene.ts or a figure (10)
WritingW4 complete
  • a review of the text: no review record reviews/3GDP61/text.yaml