Part I, Chapter 1 Introduction to finite elements This chapter introduces key notions about finite elements that are repeatedly used in this book, i.e., degrees of freedom, shape functions, and interpolation operator. These notions are illustrated on Lagrange finite elements, for which the degrees of freedom are values at specific nodes, and modal finite elements, for which the degrees of freedom are moments against specific test functions. 1.1 Introductory example This section introduces the notion of finite element through a simple example in one space dimension. Let K = [−1, 1] and consider a smooth function v : K → R; to fix the ideas, let us assume that v is continuous, i.e., v ∈ C 0 (K). Our objective is to devise an interpolation operator that approximates v in a finite-dimensional functional space, say P . For simplicity, we assume that P = Pk for some k ∈ N, where Pk is the real vector space composed of univariate polynomial P functions of degree at most k, i.e., a function p : R → R is in Pk if p(t) = l∈{0: k} αl tl where αl ∈ R for all l ∈ {0: k}. Let us consider (k+1) disctint points {ai }i∈{0: k} in K, and let us call these points nodes. Then, we would like to construct an operator IK : C 0 (K) → Pk such that IK (v) verifies IK (v) ∈ Pk , IK (v)(ai ) = v(ai ), ∀i ∈ {0: k}, (1.1) for any v ∈ C 0 (K). These conditions uniquely determine IK (v) since a polynomial in Pk is uniquely determined by the value it takes at (k + 1) distinct points in R. For the same reason, Pk is pointwise invariant under IK , i.e., IK (p) = p for all p ∈ Pk . To obtain an explicit representation of IK (v), we introduce the Lagrange interpolation polynomials defined as follows: Q i6=j∈{0: k} (t − aj ) [a0 ...ak ] , ∀t ∈ R, (1.2) Li (t) = Q i6=j∈{0: k} (ai − aj ) ♥♥ 2 Chapter 1. Introduction to finite elements [a ] for all i ∈ {0: k}. We set L0 0 ≡ 1 if k = 0. By construction, the Lagrange interpolation polynomials are such that [a0 ...ak ] Li (aj ) = δij , ∀i, j ∈ {0: k}, (1.3) where δij is the Kronecker delta. The Lagrange interpolation polynomials of degree k ∈ {1, 2, 3} using equidistant nodes in K (including both endpoints) [a ...a ] are shown in Figure 1.1. We observe that the family {Li 0 k }i∈{0: k} forms a basis of Pk . Indeed, since dim(Pk ) = k + 1, we only need to show linear Pk [a ...a ] independence. Assume that i=0 αi Li 0 k ≡ 0, then evaluating this linear combination at the nodes {ai }i∈{0: k} implies that a0 = . . . = ak = 0, which proves the result. The polynomial function IK (v) defined by (1.1) has the [a ...a ] following representation in the basis {Li 0 k }i∈{0: k} : IK (v)(t) = k X [a0 ...ak ] v(ai )Li (t). (1.4) i=0 1 1 1 0.5 0.5 0.5 0 0 0 -1 -0.5 0 0.5 1 -1 -0.5 0 0.5 1 -1 -0.5 0 0.5 1 Fig. 1.1. Lagrange interpolation polynomials with equidistant nodes in the interval K = [−1, 1] of degree k = 1 (left), 2 (center), and 3 (right). Remark 1.1 (Key concepts). To sum up, we have used three important ingredients to build the interpolation operator IK : the interval K = [−1, 1], the finite-dimensional space P = Pk , and a set of degrees of freedom, i.e., linear mappings {σi }i∈{0: k} acting on continuous functions, which consist of evaluations at the nodes {ai }i∈{0: k} , i.e., σi (v) = v(ai ). A key observation concerning the degrees of freedom is that they uniquely determine functions in P , i.e., if σi (p) = 0 for all i ∈ {0: k} for some p ∈ Pk then p = 0. 1.2 Finite element as a triple Following Ciarlet [141, p. 93], a finite element is defined as a triple: (K, P, Σ). Part I. Getting Started 3 Definition 1.2 (Finite element). Let d ≥ 1. Let nsh ≥ 1. A finite element consists of a triple, (K, P, Σ), where: (i) K is a compact, connected, Lipschitz set in Rd with non-empty interior. (ii) P is a finite-dimensional vector space of functions p : K → Rq for some positive integer q (typically q = 1 or d); P is generally composed of polynomial functions, possibly composed with some smooth diffeomorphism. (iii) Σ is a set of nsh linear forms from P to R, say Σ = {σi }i∈N with N := {1: nsh }, such that the map ΦΣ : P → Rnsh acting as ΦΣ (p) = σi (p) i∈N (1.5) is an isomorphism. The linear forms σi are called degrees of freedom. Proposition 1.3 (Shape functions). dim(P ) = nsh and there exists a basis {θi }i∈N of P such that σi (θj ) = δij , ∀i, j ∈ N , (1.6) with δij the Kronecker symbol. The functions θi are called shape functions. Proof. Direct consequence of ΦΣ : P → Rnsh being an isomorphism; observe nsh that {θi }i∈N is the image by Φ−1 . ⊓ ⊔ Σ of the canonical basis of R Another important consequence of (iii) is that Σ is a basis of L(P ; R), the space of the linear forms from P to R. Indeed, dim(L(P ; R)) = dim(P ) = nsh , and Plinear independence of the degrees of freedom follows from the fact that if P i∈N λi σi vanishes identically on P for some real numbers λi , then 0 = i∈N λi σi (θj ) = λj for all j ∈ N . Remark 1.4 (Unisolvence). Owing to the rank theorem (or rank-nullity theorem), the bijectivity of the map ΦΣ is equivalent to ( dim P ≥ nsh = card Σ, ∀p ∈ P, [ σi (p) = 0, ∀i ∈ N ] =⇒ [ p = 0 ]. This property is henceforth referred to as unisolvence. ⊓ ⊔ Example 1.5 (Set K). A precise definition of Lipschitz sets can be found in Definition B.1. At this stage, one can think of K as being a polyhedron in Rd , e.g., a triangle or a square if d = 2 and a tetrahedron, a cube or a prism if d = 3; see Figure 1.2. More generally, K can also be the image of a polyhedron by some smooth diffeomorphism. ⊓ ⊔ 4 Chapter 1. Introduction to finite elements Fig. 1.2. Simple examples of polyhedra in R2 and R3 ; dashed lines are used for hidden parts of the polyhedron in R3 . 1.3 Interpolation: finite element as a quadruple The notion of interpolation operator is central to the finite element theory; this operator maps functions defined over K onto P using the shape functions and the degrees of freedom of the finite element. The term “interpolation” is used here in a broad sense, since the degrees of freedom are not necessarily point evaluations. The construction of the interpolation operator requires to extend the domain of the linear forms in Σ so that they can act on functions in a space larger than P , which we denote V (K). Definition 1.6 (Interpolation operator). Let (K, P, Σ) be a finite element. Assume that there exists a Banach space V (K) ⊂ L1 (K; Rq ) such that: (i) P ⊂ V (K). (ii) The linear forms {σ1 , . . . , σnsh } can be extended to L(V (K); R). (This means that these linear forms are bounded on V (K), i.e., there exists cΣ such that |σi (v)| ≤ cΣ kvkV (K) for all v ∈ V (K) and all i ∈ N .) Then, we define IK : V (K) → P , the interpolation operator associated with the finite element (K, P, Σ), by X IK (v)(x) = σi (v)θi (x), ∀x ∈ K, (1.7) i∈N for all v ∈ V (K). V (K) is the domain of IK , and P is its codomain. By construction, IK ∈ L(V (K); V (K)). Proposition 1.7 (P -invariance). P is pointwise invariant under IK , i.e., IK (p) = p for all p ∈ P . As a result, IK is a projection, i.e., IK ◦IK = IK P P Proof. Letting p = j∈N αj θj yields IK (p) = i,j∈N αj σi (θj )θi = p owing to (1.6). This shows that P is pointwise invariant under IK , whence it immediately follows that IK is a projection. ⊓ ⊔ A finite element could actually be defined as a quadruple (K, P, Σ, V (K)), where the triple (K, P, Σ) satisfies Definition 1.2 and V (K) satisfies Definition 1.6. The choice for V (K) plays a key role in the analysis of the approximation properties of IK , and many choices are possible. Under the mild assumption that P ⊂ L∞ (K; Rq ), it is possible to extend the degrees of freedom so that V (K) = L1 (K; Rq ) (see §11.2). However, different (more restrictive) Part I. Getting Started 5 choices for V (K) are interesting in practice. For instance, it is often useful to build IK v by using the values of the function v (or of its derivatives) at some points in K, or along the edges of K, or on the faces of K. In this case, it is natural to set V (K) = C l (K; Rq ) for some integer l ≥ 0 or V (K) = W s,p (K; Rq ) for some real numbers s ≥ 0 and p ∈ [1, ∞], see §B.6. (We abuse the notation since we should write W s,p (int(K); Rq ), where int(K) denotes the interior of the set K in Rd .) 1.4 Examples: Lagrange and modal finite elements We consider in this section Lagrange and modal finite elements. 1.4.1 Lagrange finite elements We focus our attention on scalar-valued Lagrange (or nodal) elements. The extension to vector-valued functions can be done by proceeding componentwise. The degrees of freedom of Lagrange finite elements are point values. Definition 1.8 (Lagrange finite element). Let (K, P, Σ) be a scalar-valued finite element (q = 1 in Definition 1.2). If there is a set of points {ai }i∈N in K such that, for all i ∈ N , σi (p) = p(ai ), ∀p ∈ P, (1.8) (K, P, Σ) is called a Lagrange finite element. The points {ai }i∈N are called the nodes of the element. The shape functions {θi }i∈N , which are such that θi (aj ) = δij , ∀i, j ∈ N , (1.9) form the so-called nodal basis of P associated with the nodes {ai }i∈N . Examples are presented in Chapters 2 and 3. Following Definition 1.6, the L acts as follows: Lagrange interpolation operator IK X L IK (v)(x) = v(ai )θi (x), ∀x ∈ K. (1.10) i∈N L By construction, IK (v) matches the values of v at the Lagrange nodes, i.e., L L IK (v)(aj ) = v(aj ) for all j ∈ N . A possible choice for the domain of IK is 0 V (K) = C (K) equipped with the uniform norm kvkC 0 (K) = supx∈K |v(x)| for all v ∈ C 0 (K) (recall that K is a closed set in Rd , so that functions in C 0 (K) are continuous up to the boundary). An alternative choice using Sobolev spaces is V (K) = W s,p (K) with p ∈ [1, ∞] and s > dp , since functions in W s,p (K) have a continuous representative for s > dp ; see Theorem B.101. 6 Chapter 1. Introduction to finite elements 1.4.2 Modal finite elements The degrees of freedom of modal finite elements are moments against test functions using some measure over K. For simplicity, we consider the uniform measure and work in L2 (K; Rq ) with q ≥ 1. Proposition 1.9 (Modal finite element). Let K be as in Definition 1.2. Let P be a finite-dimensional subspace of L2 (K; Rq ) and let {ζi }i∈N be a basis of P . Let Σ = {σi }i∈N be composed of the following linear forms σi : P → R: Z 1 (ζi , p)ℓ2 (Rq ) dx, ∀p ∈ P, ∀i ∈ N . (1.11) σi (p) = |K| K (The factor |K|−1 is meant to make σi independent of the size of K.) Then, (K, P, Σ) is a finite element called modal finite element. Proof. We verify unisolvence. By definition, dim(PP ) = card(Σ). Let p ∈ P be such that σ (p) = 0 for all i ∈ N . Writing p = i i∈N αi ζi , we infer that R P ⊓ ⊔ 0 = j∈N αj σj (p) = |K|−1 K kpk2ℓ2 (Rq ) dx, so that p = 0. Examples are presented in Chapter 2. Let us introduce the mass matrix M of order nsh with entries Z Mij = (ζi , ζj )ℓ2 (Rq ) dx, ∀i, j ∈ N . (1.12) K One can verify that the matrix M is symmetric positive-definite (see ExerP cise 1.4). Then, the shape functions are given by θj = |K| m∈N (M−1 )mj ζm , for all j ∈ N , since Z Z X 1 (ζi , θj )ℓ2 (Rq ) dx = (M−1 )mj σi (θj ) = (ζi , ζm )ℓ2 (Rq ) dx |K| K K m∈N X = (M−1 )mj Mim = δij , m∈N for all i, j ∈ N . If the basis {ζi }i∈N is L2 -orthogonal, the shape functions are given by θi = (|K|/kζi k2L2 (K;Rq ) )ζi for all i ∈ N . Furthermore, following m Definition 1.6, the modal interpolation operator IK acts as follows: X 1 Z m IK (v)(x) = (ζi , v)ℓ2 (Rq ) dx θi (x), ∀x ∈ K. (1.13) |K| K i∈N The domain of IK can be defined to be V (K) = L2 (K; Rq ), or even V (K) = L1 (K; Rq ) if P ⊂ L∞ (K; Rq ). Part I. Getting Started 7 1.5 The Lebesgue constant(♦) Recall from Definition 1.6 that the interpolation operator IK is a bounded linear operator from V (K) onto P . Since P ⊂ V (K), we can equip P with the norm of V (K) and view IK as an endomorphism in V (K), i.e., IK ∈ L(V (K)). In this section, we study the quantity kIK kL(V (K)) := kIK (v)kV (K) , kvkV (K) v∈V (K) sup (1.14) which is called the Lebesgue constant for IK . In this book, we abuse the notation by writing the supremum over v ∈ V (K) instead of v ∈ V (K) \ {0}. Lemma 1.10 (Lower bound). kIK kL(V (K)) ≥ 1. Proof. Since P is non-trivial (i.e., P 6= {0}) and since IK (p) = p for all p ∈ P owing to Proposition 1.7, we infer that kIK (p)kV (K) kIK (v)kV (K) ≥ sup = 1. kvk kpkV (K) p∈P V (K) v∈V (K) sup ⊓ ⊔ The Lebesgue constant arises naturally in the estimate of the interpolation error in terms of the best approximation of V (K) by P . In particular, the next result shows that a large value of the Lebesgue constant may lead to poor approximation properties of IK . Theorem 1.11 (Interpolation error). The following holds: kv − IK (v)kV (K) ≤ (1 + kIK kL(V (K)) ) inf kv − pkV (K) , p∈P (1.15) for all v ∈ V (K), and kv − IK (v)kV (K) ≤ kIK kL(V (K)) inf p∈P kv − pkV (K) if V (K) is a Hilbert space. Proof. Since IK (p) = p for all p ∈ P , we infer that v − IK (v) = (I − IK )(v) = (I − IK )(v − p) where I is the identity operator in V (K), so that kv − IK (v)kV (K) ≤ kI − IK kL(V (K)) kv − pkV (K) ≤ (1 + kIK kL(V (K)) )kv − pkV (K) , where we have used the triangle inequality. We obtain (1.15) by taking the infimum over p ∈ P . Assume now that V (K) is a Hilbert space. We use the fact that in any Hilbert space H, any operator T ∈ L(H) such that 0 6= T ◦T = T 6= I verifies kT kL(H) = kI − T kL(H) , see Kato [305], Xu and Zikatanov [482], Szyld [441]. We can apply this result with H = V (K) and T = IK . Indeed, IK 6= 0 since P is non-trivial, IK 6= I since P is a proper subset of V (K), and IK ◦IK = IK owing to Proposition 1.7. We infer that kv − IK (v)kV (K) ≤ kI − IK kL(V (K)) kv − pkV (K) = kIK kL(V (K)) kv − pkV (K) , and conclude by taking the infimum over p ∈ P . ⊓ ⊔ 8 Chapter 1. Introduction to finite elements Example 1.12 (Lagrange elements). The Lebesgue constant for the LaL grange interpolation operator IK with nodes {ai }i∈N and space V (K) = 0 N L C (K) is denoted Λ := kIK kL(C 0 (K)) , so that, owing to Theorem 1.11, L kv − IK (v)kC 0 (K) ≤ (1 + ΛN ) inf p∈P kv − pkC 0 (K) . One can verify (see Exercise 1.5) that ΛN = kλN kC 0 (K) with the Lebesgue function λN (x) := P ⊓ ⊔ i∈N |θi (x)|, for all x ∈ K. Example 1.13 (Modal elements). Consider a modal finite element, see Proposition 1.9, with an L2 -orthogonal basis {ζi }i∈N of P and V (K) = L2 (K; Rq ). Then, the L2 -orthogonal projection from L2 (K; Rq ) onto P , say ΠP , is such that ! Z X 1 (ζi , v)ℓ2 (Rq ) dx ζi , ∀v ∈ L2 (K; Rq ). ΠP (v) = kζi k2L2 (K;Rq ) K i∈N m Since θi = (|K|/kζi k2L2 (K;Rq ) )ζi , we infer from (1.13) that IK = ΠP . The 2 m 2 m Pythagoras identity kvkL2 (K;Rq ) = kIK (v)kL2 (K;Rq ) + kv − IK (v)k2L2 (K;Rq ) m m implies that kIK kL(L2 (K;Rq )) ≤ 1, which in turn gives kIK kL(L2 (K;Rq )) = 1 owing to Lemma 1.10. ⊓ ⊔ In the rest of this section, we assume that V (K) is a Hilbert space with inner product (·, ·)V (K) . Following ideas developed in Maday et al. [341], we show that the Lebesgue constant can be related to the stability of an oblique projector. Let qi be the Riesz–Fréchet representative in V (K) of the linear form σi for all i ∈ N , i.e., σi (v) = (v, qi )V (K) for all v ∈ V (K) and all i ∈ N , see Theorem A.44, and set Q := span{(qi )i∈N }. Lemma 1.14 (Oblique projection). Let IK be defined by (1.7). Then, IK is the oblique projector onto P along Q⊥ , and the Lebesgue constant is (p,q)V (K) −1 kIK kL(V (K)) = αP Q with αP Q = inf p∈P supq∈Q kpkV (K) kqkV (K) . Proof. (1) Unisolvence implies that P ∩ Q⊥ = {0}. Let now v ∈ V (K). We observe that IK (v) ∈ P and that (qi , IK (v) − v)V (K) = σi (IK (v)) − σi (v) = 0, ∀i ∈ N . Hence, IK (v) − v ∈ Q⊥ . From the decomposition v = IK (v) + (v − IK (v)), we infer that V (K) = P + Q⊥ . Therefore, the sum is direct, and IK (v) is the oblique projection of v onto P along Q⊥ . Furthermore, for all v ∈ V (K), (IK (v), q)V (K) (v, q)V (K) = sup ≤ kvkV (K) , kqkV (K) q∈Q q∈Q kqkV (K) αP Q kIK (v)kV (K) ≤ sup −1 showing that kIK kL(V (K)) ≤ αP Q. (2) To prove the reverse bound, let us first show that IK (ΠQ (p)) = p for all Part I. Getting Started 9 p ∈ P , where ΠQ denotes the orthogonal projector onto Q. We first observe that (IK (ΠQ (p)), q)V (K) = (ΠQ (p), q)V (K) = (p, q)V (K) , for all q ∈ Q, where we have used the fact that both IK and ΠQ are projectors along Q⊥ . The above identity implies that IK (ΠQ (p)) − p ∈ P ∩ Q⊥ = {0}. Hence, IK (ΠQ (p)) = p. Since P is a finite-dimensional space, a compactness argument shows that there is p∗ ∈ P with kp∗ kV (K) = 1 such that αP Q = supq∈Q (p∗ ,q)V (K) kqkV (K) = kΠQ (p∗ )kV (K) . We conclude that kIK kL(V (K)) ≥ kp∗ kV (K) kIK (ΠQ (p∗ ))kV (K) 1 = = . kΠQ (p∗ )kV (K) kΠQ (p∗ )kV (K) αP Q ⊓ ⊔ Further results on the Lebesgue constant for one-dimensional Lagrange elements can be found in §2.2.1. Exercises Exercise 1.1 (Linear combination). Let S ∈ Rnsh ×nsh be an invertible matrix. Let (K, PP, Σ) be a finite element. Let Σ̃ = {σ̃i }i∈N with degrees of freedom σ̃i = i′ ∈N Sii′ σi′ for all i ∈ N . (i) Prove that (K, P, Σ̃) is a finite element. (ii) Write the shape functions {θ̃j }j∈N and verify that the interpolation operator does not depend on the matrix S, i.e., ĨK (v)(x) = IK (v)(x) for all v ∈ V (K) and all x ∈ K. Exercise 1.2 (Hermite). Let K = [0, 1] and let P = P3 . Let Σ = {σ1 , σ2 , σ3 , σ4 } be the linear forms on P such that, for all p ∈ P , σ1 (p) = p(0), σ2 (p) = p′ (0), σ3 (p) = p(1), σ4 (p) = p′ (1). (i) Show that (K, P, Σ) is a finite element. (ii) Compute the shape functions. (iii) Indicate possible choices for the domain of the interpolation operator in the form V (K) = C l (K) or H s (K) for suitable l and s. Exercise 1.3 (Powell–Sabin). Consider the unit segment K = [0, 1] and let PK be composed of the functions that are piecewise quadratic over the intervals [0, 12 ] ∪ [ 12 , 1] and are of class C 1 over K, i.e., functions in P are continuous and their first derivative is continuous at 21 . Let Σ = {σ1 , . . . , σ4 } be the linear forms on P such that σ1 (p) = p(0), σ2 (p) = p′ (0), σ3 (p) = p(1), σ4 (p) = p′ (1). (Note: a two-dimensional version of this finite element on triangles has been developed in [380].) 10 Chapter 1. Introduction to finite elements (i) Prove that the triple (K, P, Σ) is a finite element. (ii) Verify that the first two shape functions are ( ( t(1 − 23 t), 1 − 2t2 , for t ∈ [0, 12 ], θ (t) = θ1 (t) = 2 1 2 2(1 − t)2 for t ∈ [ 12 , 1]. 2 (1 − t) for t ∈ [0, 21 ], for t ∈ [ 21 , 1], and compute the two other shape functions. Exercise 1.4 (Mass matrix). Prove that the mass matrix M defined by (1.12) is symmetric positive-definite. Exercise 1.5 (Lebesgue constant for Lagrange element). Prove that L the Lebesgue constant ΛN defined in Example 1.12 is equal to kIK kL(C 0 (K)) . L N (Hint: To prove the bound kIK kL(C 0 (K)) ≥ ΛP , consider a set of functions {ψi }i∈N taking values in [0, 1] and such that i∈N ψi (x) = 1 for all x ∈ K and ψi (aj ) = δij for all i, j ∈ N .) Exercise 1.6 (Lagrange interpolation). Let K = [a, b] and let p ∈ [1, ∞). 1 1 (i) Prove that kvkL∞ (K) ≤ (b − a)− p kvkLp (K) + (b − a)1− p kv ′ kLp (K) for all Ry v ∈ W 1,p (K) (Hint: for v ∈ C 1 (K), use v(x) − v(y) = x v ′ (t) dt, where |v(y)| = minz∈K |v(z)|, then use the density of C 1 (K) in W 1,p (K)). (ii) Prove that W 1,p (K) embeds continuously in C 0 (K). L (iii) Let IK be the interpolation operator based on the linear Lagrange finite element using nodes a and b. Determine the two shape functions and L prove that IK can be extended to W 1,p (K). (iv) Assuming that w ∈ W 1,p (K) is zero at some point in K, show that kwkLp (K) ≤ (b − a)kw′ kLp (K) . L (v) Prove the following estimates: k(v − IK v)′ kLp (K) ≤ (b − a)kv ′′ kLp (K) , L L ′ L v)′ kLp (K) ≤ kv ′ kLp (K) , kv − IK vkLp (K) ≤ (b − a)k(v − IK v) kLp (K) , k(IK 2,p for all p ∈ (1, ∞] and all v ∈ W (K). Exercise 1.7 (Variation on P2 ). Let K = [0, 1], P = P2 and Σ = {σ1 , σ2 , σ3 } such that σ1 (p) = p(0), σ2 (p) = 2p( 12 ) − p(0) − p(1), σ3 (p) = p1). (i) Show that (K, P, Σ) is a finite element. (ii) Compute the shape functions. (iii) Indicate possible choices for the domain of the interpolation operator in the form V (K) = C l (K) or H s (K) for suitable l and s.