Advanced Finite Element Methods · 2017. 1. 30. · In the Finite Element method, which is...

62
Advanced Finite Element Methods Eric Sonnendr¨ ucker Max-Planck-Institut f¨ ur Plasmaphysik und Zentrum Mathematik, TU M¨ unchen Lecture notes Wintersemester 2016/2017 January 30, 2017

Transcript of Advanced Finite Element Methods · 2017. 1. 30. · In the Finite Element method, which is...

Page 1: Advanced Finite Element Methods · 2017. 1. 30. · In the Finite Element method, which is mathematically more involved, the ... An example of an unstructured Finite Element mesh

Advanced Finite Element Methods

Eric SonnendruckerMax-Planck-Institut fur Plasmaphysik

undZentrum Mathematik, TU Munchen

Lecture notes

Wintersemester 2016/2017

January 30, 2017

Page 2: Advanced Finite Element Methods · 2017. 1. 30. · In the Finite Element method, which is mathematically more involved, the ... An example of an unstructured Finite Element mesh

Contents

1 The classical finite element method (FEM) 21.1 Principle of the method . . . . . . . . . . . . . . . . . . . . . . . . 21.2 Basic properties of the Sobolev spacesHm(Ω), H(div,Ω) andH(div,Ω) 7

1.2.1 The Sobolev space Hm . . . . . . . . . . . . . . . . . . . . . 71.2.2 The Sobolev space H(div,Ω) . . . . . . . . . . . . . . . . . . 71.2.3 The Sobolev space H(curl,Ω) . . . . . . . . . . . . . . . . . 7

1.3 The variational (or weak) form of a boundary value problem . . . . 81.3.1 Case of homogeneous Dirichlet boundary conditions . . . . . 81.3.2 Case of non homogeneous Dirichlet boundary conditions . . 91.3.3 Case of Neumann boundary conditions . . . . . . . . . . . . 10

1.4 Solution of the the variational formulation . . . . . . . . . . . . . . 111.5 Description of a Finite Element . . . . . . . . . . . . . . . . . . . . 12

1.5.1 Formal definition of a Finite Element . . . . . . . . . . . . . 121.5.2 C0 Lagrange Finite Elements . . . . . . . . . . . . . . . . . 131.5.3 H(div,Ω) conforming Finite Elements . . . . . . . . . . . . 161.5.4 H(curl,Ω) conforming Finite Elements . . . . . . . . . . . . 19

1.6 Change of local basis . . . . . . . . . . . . . . . . . . . . . . . . . . 201.7 Construction of the Finite Element approximation space . . . . . . 22

1.7.1 The mapping . . . . . . . . . . . . . . . . . . . . . . . . . . 221.7.2 Bases of tangent and cotangent spaces in curvilinear coordi-

nates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 231.7.3 H1 conforming Finite Elements . . . . . . . . . . . . . . . . 251.7.4 H(curl,Ω) conforming Finite Elements . . . . . . . . . . . . 271.7.5 H(div,Ω) conforming Finite Elements . . . . . . . . . . . . 31

1.8 Convergence of the Finite Element method . . . . . . . . . . . . . . 351.9 The discontinuous Galerkin (DG) method . . . . . . . . . . . . . . 38

2 Finite Element Exterior Calculus (FEEC) 422.1 Some tools from differential geometry . . . . . . . . . . . . . . . . . 422.2 Maxwell’s equations with differential forms . . . . . . . . . . . . . . 532.3 Discrete differential forms based on B-splines . . . . . . . . . . . . 56

1

Page 3: Advanced Finite Element Methods · 2017. 1. 30. · In the Finite Element method, which is mathematically more involved, the ... An example of an unstructured Finite Element mesh

Chapter 1

The classical finite elementmethod (FEM)

1.1 Principle of the method

For solving a problem on a computer that can only store a finite amount of infor-mation a discrete form of the problem is needed. In the Finite Difference methodone simply computes an approximation of the solution at a finite number of gridpoints. In the Finite Element method, which is mathematically more involved, theidea is to look for the solution in a finite dimensional vector space, i.e. for somewell chosen vector space Vh, with basis (ϕi)0≤i≤N−1, the approximate solution hasthe form

uh(x) =N−1∑i=0

uiϕi(x).

The basis being given, the approximate solution uh is fully determined by itscoefficients ui in this basis, which need not be values of uh at some points in thecomputational domain, but can be in some cases.

The question now becomes how to choose Vh and determine the coefficients uisuch that uh is a good approximation of the solution u of the original problem.Let us consider as a first example the Poisson problem with homogeneous Dirichletboundary conditions:

−∆u = f, in Ω, u = 0, on ∂Ω. (1.1)

The first idea, introduced by Ritz in his thesis in Gottingen in 1902, was to trans-form the boundary problem into an equivalent minimisation problem. Indeed, viathe Dirichlet principle (1.1) is equivalent to the minimisation problem

minu∈H1

0 (Ω)

(1

2

∫Ω

|∇u(x)|2 dx−∫

Ω

f(x)u(x) dx

). (1.2)

We shall need the following Hilbert spaces, defined for a domain Ω ∈ Rd

H1(Ω) = u ∈ L2(Ω), ∇u ∈ (L2(Ω))d, H10 (Ω) = u ∈ H1(Ω), u = 0 on ∂Ω.

2

Page 4: Advanced Finite Element Methods · 2017. 1. 30. · In the Finite Element method, which is mathematically more involved, the ... An example of an unstructured Finite Element mesh

The scalar product associated to these Hilbert spaces is

(u, v)1 =

∫Ω

∇u(x) · ∇v(x) dx+

∫Ω

u(x)v(x) dx.

Moreover, we denote by

‖u‖1,Ω =

∫Ω

|∇u(x)|2 dx+

∫Ω

u(x)2 dx, |u|1,Ω =

∫Ω

|∇u(x)|2 dx, ‖u‖0,Ω =

∫Ω

u(x)2 dx,

the norm in H1(Ω), the semi-norm in H1(Ω) and the norm in L2(Ω). Then,the original problem being transformed into a minimisation problem, it becomesquite natural to look for an approximation in a finite dimensional subspace of thefunction space in which the minimisation problem is posed (in our case H1

0 (Ω)),which means that the minimisation is performed by considering only minima in afinite dimensional subspace. Then if the form of finite dimensional space is chosensuch that any function of the original space can be approximated to any giventolerance, by a function of the approximation space, we should be able to get agood approximation. Ritz who was actually looking at solutions for the bilaplacianequation, chose as basis functions for Vh a finite number of eigenfunctions of hisoperator.

The standard method to solve a minimisation problem with a cost functionalJ defined on a Hilbert space V , of the form

minu∈V

J [u],

is to solve the associated Euler equation J ′[u] = 0 obtained by computing theFrechet derivative of the functional that we want to minimise. Note that theFrechet derivative gives a rigorous definition of the functional derivative used inphysics for functions that are in a Banach (including Hilbert) space. Consider afunctional J from a Hilbert space V into R. Its Frechet derivative J ′, assuming itexists, is a linear form on V , which means that it maps any function from V to ascalar. It can be computed using the Gateaux formula:

J ′[u](v) = limε→0

J [u+ εv]− J [u]

ε. (1.3)

Let us apply this formula to our problem for which

J [u] =1

2

∫Ω

|∇u(x)|2 dx−∫

Ω

f(x)u(x) dx.

We have for any v ∈ V = H10 (Ω)

J [u+ εv] =1

2

∫Ω

|∇u(x) + εv(x)|2 dx−∫

Ω

f(x)(u(x) + εv(x)) dx

=1

2

(∫Ω

|∇u(x)|2 dx+ 2ε

∫Ω

∇u(x) · ∇v(x) dx+ ε2

∫Ω

|∇u(x)|2 dx

)−∫

Ω

f(x)u(x) dx− ε∫

Ω

f(x)v(x) dx.

3

Page 5: Advanced Finite Element Methods · 2017. 1. 30. · In the Finite Element method, which is mathematically more involved, the ... An example of an unstructured Finite Element mesh

From which we deduce, using the Gateaux formula (1.3) that

J ′[u](v) =

∫Ω

∇u(x) · ∇v(x) dx−∫

Ω

f(x)v(x) dx.

Note that J ′[u] being a linear form on V is defined by applying it to some vectorv ∈ V . Finally the solution of our minimisation problem (1.2), is a solution of theEuler equation J ′[u] = 0 or equivalently J ′[u](v) = 0 for all v ∈ V , which reads∫

Ω

∇u(x) · ∇v(x) dx =

∫Ω

f(x)v(x) dx ∀v ∈ H10 (Ω). (1.4)

This is also what is called the variational formulation, or the weak formulation ofthe original boundary value problem (1.1). Note that this variational formulationexpresses in some sense the orthogonality of the residual to the space in whichthe solution is sought. This is more general than Euler equations of minimisationproblems as noticed by Galerkin and has a wide range of applications. One caneven extend this concept by making the residual orthogonal to a different functionspace, than the one in which the solution lives. Such methods are called Petrov-Galerkin methods and are beyond the scope of this lecture.

So the principle of the Galerkin (or Ritz-Galerkin) method is to look for asolution in a finite dimensional subspace Vh ⊂ V of the original space and to usethe same variational formulation (1.4) as the one defining the exact solution, withtest functions also in Vh to characterise the solution. What remains to be donenow is to choose Vh with good approximation properties. As we will see later, thestability of the Galerkin method follows directly from the well-posedness of thevariational problem (1.4).

The finite dimensional space Vh is in general defined by its basis functions. Forthose, Ritz used eigenfunctions of the problem. But those are in general cumber-some to compute. Galerkin proposed to use general classes of simple functions,trigonometric functions or polynomials, that are know to be able to approximateany continuous function with a finite number of basis functions. Trigonometricpolynomials which are linked to Fourier series are very good in periodic domains,with a few simple extensions. Polynomials enjoy more widespread applications,however to get a good conditioning of the linear system that is obtained at theend, care needs to be taken in the choice of the basis functions. The monomialbasis (1, x, x2, . . . ) has very bad properties. Best approximations are provided bythe orthogonal Legendre polynomials or by the Chebyshev polynomials which areused in practice. Note that all the basis functions we have mentioned up to nowhave a global support in the computational domain and thus lead to full matricesin the linear system, which can be computationally expensive. Methods using suchbases are actually not known as Finite Element methods but rather as spectralmethods.

Another ingredient is needed to define what is known as Finite Element meth-ods. This was introduced by Courant in 1943 [7] and consists in using basisfunctions with a small support in the computational domain, so that its productwith other basis functions vanishes for most of the other basis functions leading

4

Page 6: Advanced Finite Element Methods · 2017. 1. 30. · In the Finite Element method, which is mathematically more involved, the ... An example of an unstructured Finite Element mesh

to a very sparse matrix, i.e. with very few non zero terms, in the linear system,which can be solved very efficiently on a computer. To this aim, the computa-tional domain is decomposed into small elements, in general triangles or quads in2D and the basis functions are chosen to be relatively low order polynomials, oneach of these elements. Convergence being achieved by taking smaller elementslike the cells in the Finite Difference method. In 1D a finite element mesh will looklike a finite difference mesh. An example of an unstructured Finite Element meshin 2D is displayed in Figure 1.1, which shows the great flexibility in particular tohandle complicated boundaries with finite elements, which finite differences do notprovide. This is a key to its very wide usage.

0.00 0.05 0.10 0.15 0.20 0.25 0.30 0.35

0.0

0.1

0.2

0.3

0.4

Figure 1.1: Example of a 2D finite element mesh consisting of triangles.

The article by Gander and Wanner [12] provides a clear and well documentedoverview of the historical developments of the Finite Element method. For moretechnical historical developments of the Finite Difference and Finite Element meth-ods on can also consult [15].

In summary, the finite element method consists in looking for a solution ofa variational problem like (1.4), in a finite dimensional subspace Vh of the spaceV where the exact solution is defined. The space Vh is characterised by a basis(ϕ1, . . . , ϕN) so that finding the solution of the variational problem amounts tosolving a linear system. Indeed, express the trial function uh and the test functionuh on this basis:

uh(x) =N∑j=1

ujϕj(x), uh(x) =N∑i=1

uiϕi(x),

5

Page 7: Advanced Finite Element Methods · 2017. 1. 30. · In the Finite Element method, which is mathematically more involved, the ... An example of an unstructured Finite Element mesh

and plug these expressions in the variational problem (1.4). This yields

N∑i=1

N∑j=1

ujui

∫Ω

∇ϕi(x) · ∇ϕj(x) dx =N∑i=1

ui

∫Ω

f(x)ϕi(x) dx.

This can be expressed in matrix form, U>h AhUh = U>h bh, which is equivalent tothe linear system AhUh = bh as the previous equality is true for all Uh, where

Uh = (u1, . . . , uN)>, Uh = (u1, . . . , uN)>, bh = (

∫Ω

f(x)ϕ1(x) dx, . . . ,

∫Ω

f(x)ϕN(x) dx)>

and the matrix Ah is defined by its entries which are

(

∫Ω

∇ϕi(x) · ∇ϕj(x) dx)1≤i,j≤N .

In order to completely determine the Finite Element problem, we still need toconstruct a Finite Element space Vh of dimension N and a basis for it (ϕ1, ·,varphiN). In some case, for simple domains, one can use a global basis, like atruncated Fourier expansion, or Chebyshev polynomials. However these have thedrawback of having a support on the full domain leading to dense approximationmatrices, and also of being limited to simple typically rectangular domains. There-fore one generally constructs a basis by first defining a mesh of the computationaldomain and then defining the basis function locally on each cell, using continuityrequirements at the cell interfaces to enforce Vh ⊂ V , where V is the functionspace where the original variational problem is posed.

A simple example is the case of locally Lagrange polynomials in 1D. Considerthe interval [a, b] and subdivide it into a mesh a = x0 < x1 < · · · < xM−1 < xM =b. The mesh can be uniform or not. The function space we are approximating isH1

0 ([a, b]). Define now the interpolation points, consisting of all interior grid pointsand midpoints of each cell:

y1 =x0 + x1

2, y2 = x1, y3 =

x1 + x2

2, y4 = x2, . . . yN−1 = xM−1, yN =

xM−1 + xM2

,

where N = 2M − 1. We can know define the basis functions locally on each cell asbeing the piecewise polynomial such that ϕi(yj) = δij, where the Kronecker symbolδij is one if i = j and zero else. This correspond in each cell to a Lagrange basispolynomial. Each basis function is thus associated to one interpolation point,which is called degree of freedom in the Finite Element terminology. Note thatthe basis functions associated to a cell mid-point have a support restricted to thecorresponding cell, i.e. they are zero in all the other cells. On the other hand, thebasis functions associated to a grid point have a support of the two cell sharingthis grid points. Because Vh ⊂ H1

0 all the basis functions of Vh need to vanish atthe endpoints a and b of the computational domain. Therefore there is no degreeof freedom at the end points and there are correspondingly no basis functionsassociated to the end points.

6

Page 8: Advanced Finite Element Methods · 2017. 1. 30. · In the Finite Element method, which is mathematically more involved, the ... An example of an unstructured Finite Element mesh

1.2 Basic properties of the Sobolev spaces Hm(Ω),

H(div,Ω) and H(div,Ω)

In the course of the lecture we shall work with the Sobolev spacesHm(Ω), H(div,Ω)and H(div,Ω) and recall here there basic properties without proof. For a moredetailed presentation with proofs we refer to Section 2.1. of [5].

1.2.1 The Sobolev space Hm

For any integer m ≥ 1, one can define

Hm(Ω) = v ∈ L2(Ω) | Dαv ∈ L2(Ω), |α| ≤ m (1.5)

The most classical second order operator is the Laplace operator, which readsin an arbitrary dimension d (generally d = 1, 2 or 3),

∆u =d∑i=1

∂2u

∂x2d

.

The classical Green formula for the Laplace operator readsFor essential boundary conditions related with this Green formula we shall

define the spaceH1

0 (Ω) = v ∈ H1(Ω) | v|∂Ω = 0.

And other classical operator which comes from elasticity is the bilaplacianoperator ∆2 = ∆∆, which is a fourth order operator. The Green formula neededfor variational formulations of PDEs based on the bilaplacian reads∫

Ω

∆2u v dx =

∫Ω

u∆2v dx +

∫∂Ω

(u∂∆v

∂n− v∂∆u

∂n+ ∆u

∂v

∂n−∆v

∂u

∂n

)dσ (1.6)

H20 (Ω) = v ∈ H1(Ω) | v|∂Ω = 0,

∂v

∂n

∣∣∂Ω

= 0.

1.2.2 The Sobolev space H(div,Ω)∫Ω

∇ · u v dx = −∫

Ω

u · ∇v dx+

∫∂Ω

u · ν v dσ (1.7)

1.2.3 The Sobolev space H(curl,Ω)

The Green’s formula that will be useful for variational problems involving the curloperator reads ∫

Ω

u · ∇ × v =

∫Ω

∇× u · v +

∫∂Ω

(u× n) · v ds. (1.8)

7

Page 9: Advanced Finite Element Methods · 2017. 1. 30. · In the Finite Element method, which is mathematically more involved, the ... An example of an unstructured Finite Element mesh

1.3 The variational (or weak) form of a bound-

ary value problem

The variational form of a boundary value problem contains all its elements, whichare the partial differential equation in the interior of the domain and the boundaryconditions. There are two very distinct ways to handle the boundary conditionsdepending on how they appear when deriving the variational formulation. If theyappear on the test function they are called essential boundary conditions and needto be included in the space where the solution is looked for. If they appear onthe trial function, which will be the approximate solution, they can be handledin a natural way in the variational formulation. Such boundary conditions arecalled natural boundary conditions. We will see on the examples of Dirichlet andNeumann boundary conditions how this works in practice.

In order to define the variational formulation, we will need the following Greenformula: For u ∈ H2(Ω) and v ∈ H1(Ω)

−∫

Ω

∆u v dx =

∫Ω

∇u · ∇v dx−∫∂Ω

∂u

∂nv dσ. (1.9)

Here H2(Ω) denotes the Hilbert space of the functions whose partial derivativesup to second order are in L2(Ω) and ∂u

∂n= ∇u ·ν, where ν is the outbound normal

at any point of the boundary.

Remark 1 Functions in Sobolev spaces are not necessarily continuous and hencetheir value on the boundary is not naturally defined. In fact, one can define,what is called a trace on the boundary, by first defining it for sufficiently smoothfunctions and then extending it by continuity, typically using a Green’s formulalike (1.9). So the Green’s formula also tells us what kind of trace can be defined.For a more detailed description one can consult a classical functional analysis ora Finite Element textbook like for example [5].

1.3.1 Case of homogeneous Dirichlet boundary conditions

Let f ∈ L2(Ω). Consider the boundary value problem

−∆u = f in Ω, (1.10)

u = 0 on ∂Ω. (1.11)

Assume that u ∈ H2(Ω), multiply (1.10) by v ∈ H1(Ω) and integrate using theGreen formula (1.9), which yields∫

Ω

∇u · ∇v dx−∫∂Ω

∂u

∂nv dσ =

∫Ω

fv dx.

Here u does not appear in the boundary integral, so we cannot apply the boundarycondition directly. But in the end u will be in the same function space as the test

8

Page 10: Advanced Finite Element Methods · 2017. 1. 30. · In the Finite Element method, which is mathematically more involved, the ... An example of an unstructured Finite Element mesh

function v, which appears directly in the boundary integral. This is the case ofan essential boundary condition. So we take test functions v vanishing on theboundary. We then get the following variational formulation:Find u ∈ H1

0 (Ω) such that∫Ω

∇u · ∇v dx =

∫Ω

fv dx ∀v ∈ H10 (Ω). (1.12)

The solutions of this variational formulation are called weak solutions of theoriginal boundary value problem. The solutions which are also in H2(Ω) are calledstrong solutions. Indeed we can prove that such a solution is also a solution ofthe initial boundary value problem (1.10)-(1.11). If u ∈ H2(Ω), the Green formula(1.9) can be used, and as ϕ vanishes on the boundary it yields

−∫

Ω

∆uϕ dx =

∫Ω

fϕ dx ∀v ∈ H10 (Ω).

This implies, as H10 (Ω) is dense in L2(Ω), that −∆u = f in L2(Ω) and so almost

everywhere. On the other hand as u ∈ H10 (Ω), u = 0 on ∂Ω. So u is a strong

solution of (1.10)-(1.11).

1.3.2 Case of non homogeneous Dirichlet boundary condi-tions

Let f ∈ L2(Ω) and u0 ∈ H1(Ω). We consider the problem

−∆u = f in Ω, (1.13)

u = u0 on ∂Ω. (1.14)

As the value of u on the boundary cannot be directly put in the function space if itis not zero, as else the function space would not be stable by linear combinations,we need to bring the problem back to the homogeneous case. To this aim letu = u − u0. We then show as previously that u is a solution of the variationalproblemFind u ∈ H1

0 (Ω) such that∫Ω

∇u · ∇v dx =

∫Ω

fv −∫

Ω

∇u0 · ∇v dx ∀v ∈ H10 (Ω). (1.15)

This is the variational problem that needs to be solved for non homogeneousDirichlet boundary conditions. In practice u0 is only known on the boundary andneeds to be extended to the whole domain. For standard finite elements one canpick the degrees of freedom on the boundary to be the projection (or finite elementinterpolation) of u0 on the boundary and let the inner degrees of freedom be zero.

9

Page 11: Advanced Finite Element Methods · 2017. 1. 30. · In the Finite Element method, which is mathematically more involved, the ... An example of an unstructured Finite Element mesh

1.3.3 Case of Neumann boundary conditions

Let f ∈ L2(Ω) and g ∈ H1(Ω). We consider the problem

−∆u+ u = f in Ω, (1.16)

∂u

∂n= g on ∂Ω. (1.17)

Assuming that u ∈ H2(Ω), we multiply by a test function v ∈ H1(Ω) and integrateusing the Green formula (1.9), which yields∫

Ω

∇u · ∇v dx−∫∂Ω

∂u

∂nv dσ +

∫Ω

uv dx =

∫Ω

fv dx.

Replacing ∂u∂n

by its value g on the boundary, we obtain the variational formulationFind u ∈ H1(Ω) such that∫

Ω

∇u · ∇v dx +

∫Ω

uv dx =

∫Ω

fv dx +

∫∂Ω

gv dσ ∀v ∈ H1(Ω). (1.18)

Let us now show that u is a strong solution of the boundary value problem,provided it is in H2(Ω). As H1

0 (Ω) ⊂ H1(Ω) one can first take only test functionsin H1

0 (Ω). Then as in the case of homogeneous Dirichlet conditions it follows fromthe Green formula (1.9) that∫

Ω

(−∆u+ u)ϕ dx =

∫Ω

fϕ dx ∀ϕ ∈ H10 (Ω).

This implies, as H10 (Ω) is dense in L2(Ω), that −∆u + u = f in L2(Ω) and so

almost everywhere.It now remains to verify that we have the boundary condition

∂u

∂n= g on ∂Ω.

For that we start from (1.18) and apply the Green formula (1.9), which yields

−∫

Ω

∆u v dx+

∫∂Ω

∂u

∂nv dσ +

∫Ω

uv dx =

∫Ω

fv dx+

∫∂Ω

gv dσ ∀v ∈ H1(Ω),

and as −∆u+ u = f , it remains∫∂Ω

∂u

∂nv dσ =

∫∂Ω

gv dσ ∀v ∈ H1(Ω),

which yields that ∂u∂n

= g on ∂Ω.

10

Page 12: Advanced Finite Element Methods · 2017. 1. 30. · In the Finite Element method, which is mathematically more involved, the ... An example of an unstructured Finite Element mesh

1.4 Solution of the the variational formulation

The variational problems we consider in this chapter, as the examples from theprevious section, can be written in the following abstract formFind u ∈ V such that

a(u, v) = l(v) ∀v ∈ V, (1.19)

where V is a Hilbert space, a is a symmetric continuous and coercive bilinear formand l a continuous linear form.

The most convenient tool for provient existence and uniqueness of the solutionof a variational problem is the Lax-Milgram theorem that we recall here:

Theorem 1 (Lax-Milgram) Let V a Hilbert space with the norm ‖.‖V . Leta(., .) be a continuous, symmetric and coercive bilinear form on V × V , i.e.

1. (Continuity): there exists C such that for all u, v ∈ V

|a(u, v)| ≤ C‖u‖V ‖v‖V .

2. (Coercivity): there exists a constant α > 0 such that for all u ∈ V

a(u, u) > α‖u‖2V .

Let l(.) a continuous linear form on V , i.e. there exists C such that for all v ∈ V

|l(v)| ≤ C‖v‖V .

Then there exists a unique u ∈ V such that

a(u, v) = l(v) ∀v ∈ V.

To illustrate the use of the Lax-Milgram theorem, let us apply it to the examplesof the previous section. The case of the problem with homogeneous Dirichletboundary conditions, yields to the variational formulation (1.12), which fits intothe framework of the Lax-Milgram theorem with V = H1

0 (Ω), a(u, v) =∫

Ω∇u ·

∇v dx, l(v) =∫

Ωfv dx. The continuity of the bilinear form a and the linear

form l follows from the Cauchy-Schwarz inequality. a is clearly symmetric and thecoercivity is a consequence of the Poincare inequality:

‖u‖0,Ω ≤ C|u|1,Ω ∀u ∈ H10 (Ω), (1.20)

which implies that

a(u, u) = |u|1,Ω ≥1

2|u|1,Ω +

1

2C|u|0,Ω ≥ min(

1

2,

1

2C)‖u‖1,Ω.

The case of Neumann boundary conditions yields the variational formulation(1.18), in which case V = H1(Ω), a is the H1 scalar product which is clearlycontinuous, symmetric and coercive, and l(v) =

∫Ωfv dx +

∫∂Ωgv dσ, which is a

continuous linear form thanks to the Cauchy-Schwarz inequality and the continuityof the trace.

11

Page 13: Advanced Finite Element Methods · 2017. 1. 30. · In the Finite Element method, which is mathematically more involved, the ... An example of an unstructured Finite Element mesh

1.5 Description of a Finite Element

1.5.1 Formal definition of a Finite Element

Let (K,P,Σ) be a triple such that(i) K is a closed subset of Rn of non empty interior,(ii) P is a finite dimensional vector space of functions defined on K,(iii) Σ is a set of linear forms on P of finite cardinal N , Σ = σ1, . . . , σN.

Definition 1 The elements of Σ are called degrees of freedom of the Finite Ele-ment.

The degrees of freedom characterise the basis of P associated to the Finite Element.

Definition 2 Σ is said to be P -unisolvent if for any N-tuple (α1, . . . , αN), thereexists a unique element p ∈ P such that σi(p) = αi pour i = 1, . . . , N .

Definition 3 The triple (K,P,Σ) of Rn is called Finite Element of Rn if itsatisfies (i), (ii) and (iii) and if Σ is P -unisolvent.

In the definition of a Finite Element, K is the domain on which the Finite El-ement is defined, P is the finite dimensional approximation space, and Σ uniquelydefines a basis of P , which is needed to build the Finite Element matrices associ-ated to the variational formulation applied to functions in the Finite Dimensionalapproximation space. This basis can be either defined through the degrees of free-dom or directly by exhibiting an explicit formula for the basis functions. In thislast case the degrees of freedom are not explicitly needed.

The unisolvence property is needed to establish that the elements of P char-acterised by the degrees of freedom actually form a basis of P . In practice, this isdone by first verifying that the dimension is right, i.e. that the number of degreesof freedom is equal to dimP = N and then by checking either the injectivity orthe surjectivity, which both imply the bijectivity if the dimension is right, of themapping

P → RN

p 7→ (σ1(p), . . . , σN(p))

This can be formalised in the two following lemmas:

Lemma 1 The set Σ is P -unisolvent if and only if the two following propertiesare satisfied

(i) dimP = |Σ| (where |Σ| denotes the number of elements in the set Σ).

(ii) σj(p) = 0 for j = 1, . . . , N ⇒ p = 0.

Lemma 2 The set Σ is P -unisolvent if and only if the two following propertiesare satisfied

12

Page 14: Advanced Finite Element Methods · 2017. 1. 30. · In the Finite Element method, which is mathematically more involved, the ... An example of an unstructured Finite Element mesh

(i) dimP = |Σ| = N .

(ii) There exist N linearly independent functions pi ∈ P, i = 1, . . . , N such thatσj(pi) = δij.

In addition to its local definition, independent of its neighbours, the degrees offreedom of a Finite Element need to be chosen to allow a natural embedding intothe function spaces in which the variational formulation is defined. In practice forFinite Element spaces embedded in L2 no continuity is required, for Finite Ele-ment spaces embedded in H1 C0 continuity is required, for Finite Element spacesembedded in H2 C1 continuity is required, for Finite Element spaces embeddedin H(curl,Ω) C0 continuity of the tangential component is required and for FiniteElement spaces embedded in H(div,Ω) C0 continuity of the normal component isrequired.

We will thus present examples of Finite Elements according to their conformity,i.e. to the space in which they can be naturally embedded. Note that the conti-nuity requirement is enforced by sharing the degrees of freedom on the interfacebetween two elements and by making sure that these define uniquely the trace ofP on the interface.

Remark 2 Note that not all degrees of freedom on the interface need to be sharedbetween the elements sharing the interface. This needs to be decided when con-structing the global Finite Element space from the reference element.

1.5.2 C0 Lagrange Finite Elements

These are continuous Finite Elements, and the continuity will be enforced bysharing the degrees of freedom on the interface. Thanks to this continuity propertythe Finite Element constructed from those will be included in H1. These elementsare called H1 conforming.

1D Lagrange Pk Element Let a, b ∈ R, a < b. Let K = [a, b], P = Pk the setof polynomials of degree k on [a, b], Σ = σ0, . . . , σk, where a = x0 < x1 < · · · <xk = b are distinct points and

σk : P → R,p 7→ p(xi).

Moreover Σ is P -unisolvant, using Lemma 2. Indeed the Lagrange polynomials atthe interpolation points x0, x1, . . . , xk which read

lk,i(x) =

∏0≤j≤kj 6=i

(x− xj)

∏0≤j≤kj 6=i

(xi − xj)(1.21)

13

Page 15: Advanced Finite Element Methods · 2017. 1. 30. · In the Finite Element method, which is mathematically more involved, the ... An example of an unstructured Finite Element mesh

satisfy lk,i(xj) = δij, 0 ≤ i, j ≤ k.The fact that the points are all distinct makes the Lagrange interpolation

problem well posed. The first and last point being on the boundary, will correspondto shared degrees of freedom. The corresponding basis function will be shared withthe neighbouring element.

For low degree polynomials, typically up to three, the degrees of freedom canbe chosen uniformly spaced. For higher degree, the resulting matrices have betterproperties in particular a better condition number if Gauss-Lobatto points arechosen. Note that high order Lagrange Finite Elements based on Gauss-Lobattopoints are often called spectral elements.

The extension from one to multiple dimensions is generally done in two ways.Either one builds finite elements based on simplices, or on tensor products of 1Delements. There are other possibilities but they are less classical.

Simplex based Pk Finite Elements. A simplex in n dimensions is the convexhull of n + 1 affine independent points. In 2D this is a non degenerate trianglein 3D a tetrahedron. In simplices basis functions are most easily expressed usingthe barycentric coordinates associated to the vertices of the simplex, that we shalldenote by a0, . . . , an ∈ Rn. The barycentric coordinate, classically denoted by(λi)0≤i≤n, associated to the vertex ai is the affine function with value 1 at ai and0 at the n other vertices. More precisely, for any point x = (x1, . . . , xn)> ∈ Rn,

λi(x) = αi,0 +n∑l=1

αi,lxl, i = 0, . . . , n. (1.22)

The coefficients (αi,l)0≤l≤n being determined by the relations λi(aj) = δij.Example: Pk in 2D. For 3 non aligned points a1, a2, and a3 in R2 let K be the

triangle defined by a1, a2 and a3. Let P = Pk be the vector space of polynomialsof degree k in 2D

Pk = Span(xαyβ), (α, β) ∈ N2, 0 ≤ α + β ≤ k.

The dimension of Pk is (k+1)(k+2)2

. Putting the Lagrange interpolation points on alattice with k+ 1 points on the edges and then one point less at each level startingfrom one edge, we get (k+1)+k+(k−1)+ · · ·+1 = (k+1)(k+2)/2 interpolationpoints and so also degrees of freedom, which is the same as the dimension ofthe space (see Figure 1.2 for an example with k = 3). The basis functions can beexpressed using the barycentric coordinates. In our example with k = 3. The threebasis functions associated to the three vertices are (9/2)λi(λi−1/3)(λi−2/3), thebasis function associated associated to the point closest to ai on the edge [ai, aj]is (27/2)λiλj(λi − 1/3). There are six basis functions of this form. Finally thebasis function associated to the center point is 27λ1λ2λ3. We thus find 10 basisfunctions for P3, whose dimension is 10.

Hypercube based Qk Finite Element. Let K be the hypercube of dimensionn K =

∏1≤i≤n[ai, bi]. Let P = Qk be the vector space of polynomials of degree k

14

Page 16: Advanced Finite Element Methods · 2017. 1. 30. · In the Finite Element method, which is mathematically more involved, the ... An example of an unstructured Finite Element mesh

We also end up with a total of 6 basis functions, with each basis having a value 1 at its assigned node and avalue of zero at all the other mesh nodes in the element.

Again this has the form

so we can easily determine the coefficients of all 6 basis functions in the quadratic case by inverting the matrixM. Each column of the inverted matrix is a set of coefficients for a basis function.

P3 Cubic ElementsP3 Cubic Elements

In the case of cubic finite elements, the basis functions are cubic polynomials of degree 3 with the designationP3

We now have 10 unknowns so we need a total of 10 node points on the triangle element to determine thecoefficients of the basis functions in the same manner as the P2 case.

Experiment 1Experiment 1In this experiment we will solve Poisson’s equation over a square region using Finite Elements with linear,quadratic and cubic elements and compare the results. We will solve

Similarly, here are the interpolation functions of the nine-node Lagrange element. The nodes in the x-direction are placed at x = , x = 0, and x

= while the the nodes in the y-direction are at y = , y = 0, and y = .

In[28]:=Transpose[HermiteElement1D[-L1,0,L1,0,x]].HermiteElement1D[-L2,0,L2,0,y]

Out[28]=

However, the situation becomes more complicated when you consider the elements whose nodes are not equally spaced in a grid. For example,

you cannot generate the shape functions for triangular elements or the rectangular elements with irregular node locations by using the above

tensor product approach. Here are two examples in which the interpolation functions cannot be generated.

In[29]:=p1=ElementPlot[1,-1,-1,-1,0,3/2,0,0, AspectRatio->1, Axes->True, PlotRange->-2,2,-2,2, NodeColor->RGBColor[0,0,1], DisplayFunction->Identity];

In[30]:=p2=ElementPlot[1,1,1,-1,-1,-1,-1,1,0,0, AspectRatio->1, Axes->True, PlotRange->-2,2,-2,2, NodeColor->RGBColor[0,0,1], DisplayFunction->Identity];

In[31]:=

5.3.2 Triangular Elements

Use the functions TriangularCompleteness, RectangularCompleteness, and ShapeFunction2D to generate interpolation

functions for triangular and general rectangular elements.

First, consider the triangular element with four nodal points and obtain a set of Lagrange-type shape functions, namely c = 0. Do not specify the

minimum number of symmetric terms to be dropped from the full polynomial.

Figure 1.2: (Left) P3 Finite Element, (Right) Q2 Finite Element

in each direction:

Qk = Span(xα11 . . . xαn

n ), (α1, . . . , αn) ∈ Nn, 0 ≤ α1, . . . , αn ≤ k.

The degrees of freedom for this element is obtained by choosing k + 1 distinctpoints ai = xi,0 < · · · < xi,k = bi in each direction. The corresponding basisfunctions are the products in all directions of all the 1D Lagrange basis functions.The Lagrange basis for Qk is (lk,i1(x1) . . . lk,in(xn))0≤i1,...,in≤k, where the lk,ij(xj)denote the 1D Lagrange basis functions at the interpolation points xj,0, . . . , xj,k.The dimension of Qk in n dimensions is (k + 1)n, which is also the number of thebasis functions. An example with k = 2 in 2D is given in Figure 1.2. Here thedimension of Q2 is nine and the nine basis functions are lk,i(x)lk,j(y), 0 ≤ i, j ≤ 2.

Discontinuous finite elements

Functions that are only in L2 can be defined piecewise on each cell without anycontinuity requirements. Then there is no restriction on the degrees of freedom.

Classical discontinuous Finite Elements are nodal Lagrange elements based onGauss points as the quadrature points. Even though their approximation orderis lower for the same number of points it is sometimes convenient to place thedegrees of freedom at Gauss-Lobatto points, where one point on each side is onthe edge. This makes easier the computation of edge integrals. However in thiscase, as the Finite Element is discontinuous, degrees of freedom on the interfaceare not shared by neighbouring elements.

Another class of classical discontinuous Finite Elements are modal elementswhere the basis functions are generally taken to be the orthonormal Legendrepolynomials (Li)0≤i≤k, which have the advantage of yielding the identity as a massmatrix. The corresponding degrees of freedom are σi(p) =

∫p(x)Li(x) dx. Such

constructions, where each element of the basis has a deferent degree, are calledhierarchical finite elements and facilitate what is called the p refinement consistingin obtaining a more accurate approximation by taking a higher order polynomialrather that refining the grid. Indeed in this case when refining only one basisfunction needs to be added to the existing one rather than replacing all the basisfunctions as would be necessary for the previously seen Finite Elements where allbasis functions have the same degree.

15

Page 17: Advanced Finite Element Methods · 2017. 1. 30. · In the Finite Element method, which is mathematically more involved, the ... An example of an unstructured Finite Element mesh

1.5.3 H(div,Ω) conforming Finite Elements

The H(div,Ω) space consists of vector fields. Each element as n components inn dimensions. Moreover, as we have seen before H(div,Ω) vector fields have acontinuous normal component and a discontinuous tangential component. Let usexplain how such elements can be constructed in two dimensions. This can begeneralised to higher dimensions.

Tensor product construction. Due to the given continuity requirements aH(div,Ω) conforming Finite Element can be constructed, by defining separatelyan approximation of the tangential component and of the normal component. Inthis case K = [−1, 1]× [−1, 1],

P = p = (px, py)> | px ∈ Qk−1,k, py ∈ Qk,k−1,

whereQm,n = Span(xαyβ, 0 ≤ α ≤ m, 0 ≤ β ≤ n).

For px the degrees of freedom are the Gauss points in x and the Gauss-Lobattopoints in y, such that px is discontinuous in x and continuous in y. It is the otherway for py. This enables arbitrarily high order H(div,Ω) conforming elements.

The Raviart-Thomas (RT) Finite Element. K is a non degenerate triangleof vertices (a1, a2, a3). For the element of order k + 1, k ≥ 0, denoting by Pk thespace of homogeneous polynomials of degree k (i.e. all the monomials are exactlyof degree k)

P = RTk = (Pk)2 +

(xy

)Pk.

In two dimensions dimPk = (k+1)(k+2)/2 and dim Pk = k+1, so that dimRTk =(k+ 1)(k+ 3). This yields in particular dimRT0 = 3, dimRT1 = 8, dimRT2 = 15.The degrees of freedom are constructed starting from the edges in order to enforcethe continuity requirements. This is our first example of moment based degrees offreedom, defined by 1D moments along the edges to enforce continuity and then2D moments in the triangle to complete the missing degrees of freedom.

Σ =

p 7→

∫ei

p · νsl ds, 0 ≤ l ≤ k, p 7→∫K

p(x1, x2) · xli dxi, 0 ≤ l ≤ k − 1, i = 1, 2

.

We count here k + 1 degrees of freedom for each of the three edges, and 2k innerdegrees of freedom, which are in total 3(k+1)+2k(k+1)/2 = (k+1)(k+3) whichis precisely the dimension of RTk. To prove the unisolvence it is thus enough toprove that a polynomial which vanishes on all degrees of freedom is necessarilyzero. Note that because the monomials in our degrees of freedom are a basis ofthe polynomial spaces Pk(ei), i = 1, 2, 3 and Pk−1(K) respectively this is given bythe following lemma:

16

Page 18: Advanced Finite Element Methods · 2017. 1. 30. · In the Finite Element method, which is mathematically more involved, the ... An example of an unstructured Finite Element mesh

Lemma 3 Let k ≥ 0, and p ∈ RTk(K) then∫ei

p · ν r ds = 0, ∀r ∈ Pk(ei), (1.23)∫K

p · q dx = 0 ∀q ∈ (Pk−1)2 (1.24)

implies that p = 0.

Remark 3 Note that instead of the monomials one can use (1.23) and (1.24)applied to arbitrary bases of Pk(ei) and (Pk−1)2 respectively.

Proof. Let p ∈ RTk such that (1.23) and (1.24) are satisfied. Then p = q+

(xy

with q ∈ (Pk)2 and ψ ∈ Pk. Let us first observe that on any of the three edgesei we have p · ν ∈ Pk(ei), this is obvioulsy the case for q · ν. On the other handif (x(s), y(s)) defines a parametrisation of ei, then by definition of the normalnx(x(s)− x(s0)) + ny(y(s)− y(s0)) = 0 so that nxx(s) + nyy(s) is constant on ei.It follows that on the edge ei

ν ·(xy

)ψ = (nxx+ nyy)ψ.

Then as (nxx + nyy) is a constant, (nxx + nyy)ψ is a polynomial of degree k likeψ.

Now computing the divergence of p we find, as ψ(x, y) =∑k

l=0 αlxlyk−l,

∇ · p = ∇ · q + 2ψ +

(xy

)· ∇ψ = ∇ · q + (k + 2)ψ.

Hence, taking q = ∇ϕ with ϕ ∈ Pk in (1.24), and using Green’s formula∫K

p · ∇ϕ dx =

∫∂K

p · νϕ ds+

∫K

∇ · pϕ dx.

we find, using (1.23) for the left hand side and (1.24) for the boundary term, that∇ · p is a polynomial of degree k orthogonal to all polynomials of degree k. Thusit is 0. Then because ∇ · q ∈ Pk−1 it also follows that ψ = 0 and hence p ∈ (Pk)2.

Now in order to conclude we assume that the reference triangle has one edgeon x = 0 and one edge on y = 0 and is in the positive quarter plane. The thecondition p · ν = 0 yields that px = 0 for x = 0, hence px = xψ1 with ψ1 ∈ Pk−1

and py = 0 for y = 0, hence py = yψ2 with ψ2 ∈ Pk−1. Then taking q = (ψ1, ψ2)>

in (1.24), we obtain ∫K

(xψ21 + yψ2

2) dx = 0

from which it follows as both terms are positive that they are both zero. So p = 0which was what we needed to prove.

Remark 4 Obviously, the procedure used here to construct the Finite Element,by first setting the boundary degrees of freedom to ensure the required continuityand then complete with the needed inner degrees of freedom can also be applied toquads.

17

Page 19: Advanced Finite Element Methods · 2017. 1. 30. · In the Finite Element method, which is mathematically more involved, the ... An example of an unstructured Finite Element mesh

The Brezzi-Douglas-Marini (BDM) Finite Element. K is a non degener-ate triangle of vertices (a1, a2, a3). Here P is the full polynomial space in eachdirection P = BDMk = (Pk)2. As continuity of the normal component is neededon each of the three faces, these requires at least three degrees of freedom. Soand H(div,Ω) conforming BDMk element can only be constructed for k ≥ 1 asdimBDM0 = 2. In order to define the degrees of freedom, we need the followingspace

Nk = (Pk)2 +

(y−x

)Pk,

This space has obviously the same dimension as the corresponding RTk: dimNk =dimRTk = (k + 1)(k + 3). We can now define the degrees of freedom for theBDMk element: introducing (ψj)0 ≤ j ≤ k a basis of Pk on each edge (this couldbe the monomials sj as we used for Raviart-Thomas or any other basis), and(ϕj)0≤(k−1)(k+1) a basis of Nk−2

Σ =

p 7→

∫ei

p · νψj ds, 0 ≤ j ≤ k, i = 1, 2, 3,

p 7→∫K

p ·ϕj dx, 0 ≤ j ≤ (k − 1)(k + 1)

.

We first notice, that the number of degrees of freedom is 3(k+1)+(k−1)(k+1) =(k+1)(k+2) = dimP . So that proving that p ∈ P must vanish if all these degreesof freedom are zero is enough to prove unisolvence. Similarly as for the Raviart-Thomas element this follows from the following:

Lemma 4 Let k ≥ 1, and p ∈ Pk(K)2 then∫ei

p · ν ψ ds = 0, ∀ψ ∈ Pk(ei), (1.25)∫K

p · q dx = 0 ∀q ∈ Nk−2 (1.26)

implies that p = 0.

Proof. Let p ∈ Pk(K)2 verifying (1.25) and (1.26). For any ϕ ∈ Pk−1, we havethat ∇ϕ ∈ (Pk−2)2 ⊂ Nk−2, hence from (1.26) it follows that∫

K

p · ∇ϕ dx = 0 = −∫K

∇ · pϕ dx+

∫∂K

p · ν ϕ ds.

The last term is zero because of (1.25). Then ∇ · p is a polynomial of degreek − 1 orthogonal to all polynomials of degree k − 1. Hence it is zero. Thusp = (∂yψ,−∂xψ) for a ψ ∈ Pk+1. Moreover due to (1.25), p · ν = 0 on eachedge, this implies that the tangential derivative of ψ on each edge, and so ψ isconstant on all the edges. As it is defined up to a constant, on can choose ψ suchthat it vanishes on the three edges. Then introducing the barycentric coordinates

18

Page 20: Advanced Finite Element Methods · 2017. 1. 30. · In the Finite Element method, which is mathematically more involved, the ... An example of an unstructured Finite Element mesh

λ1, λ2, λ3 of the triangle, it follows that each λi divides ψ, so that ψ = λ1λ2λ3ψwith ψ ∈ Pk−2.

Let us now take q =

(y−x

)ψ ∈ Nk−2. Then from (1.26) it follows that∫

K

p · q dx =

∫K

(∂yψ−∂xψ

)·(y−x

)ψ dx =

∫K

kλ1λ2λ3ψ2 dx = 0

which implies that ψ = 0 and thus p = 0, which is the desired result.

Remark 5 The extension to 3D is straightforward, the degrees of freedom staythe same, the triangles being replaced by tetrahedra and the edges being replaced byfaces.

1.5.4 H(curl,Ω) conforming Finite Elements

Recall that for a 3D vector u = (u1, u2, u3)>, the curl is defined by the relation

∇× u =

∂2u3 − ∂3u2

∂3u1 − ∂1u3

∂1u2 − ∂2u1

.

In 2D, there is no dependency on the third coordinate and the curl degeneratesinto the vector curl of a scalar, for the first two components and the scalar curl ofa vector for the last component:

∇×u =

(curlu3

curl u

)with curlu3 =

(∂2u3

−∂1u3

), u =

(u1

u2

), curl u = ∂1u2−∂2u1.

H(curl,Ω) conforming elements have a continuous tangential component. Theycan thus be simply obtained in 2D by exchanging the two components of the vectorin the tensor product case.

For triangles, the natural finite element space, built as the Raviart-Thomaselement is the Nedelec Element defined by K = (a1, a2, a3), a non degeneratetriangle,

P = Nk = (Pk)2 +

(y−x

)Pk,

and the degrees of freedom are obtained from the Raviart-Thomas degrees of free-dom by replacing the normal ν = (ν1, ν2)> by the tangent τ = (ν2,−ν1). Uni-solvence is also easily adapted from the Raviart-Thomas case and is based on thefollowing

Lemma 5 Let k ≥ 0, and p ∈ RTk(K) then∫ei

p · τ r ds = 0, ∀r ∈ Pk(ei), (1.27)∫K

p · q dx = 0 ∀q ∈ (Pk−1)2 (1.28)

implies that p = 0.

19

Page 21: Advanced Finite Element Methods · 2017. 1. 30. · In the Finite Element method, which is mathematically more involved, the ... An example of an unstructured Finite Element mesh

Remark 6 The extension to 3D for tensor product element is also quite naturalby considering the components separetely and noticing that in 3D there are twotangential components and three normal components.

Simplex based H(curl,Ω) Finite Elements, which are constructed on tetrahedrain 3D are fundamentally different from their H(div,Ω) counterpart, unlike in 2Dwhere one could go from one to the other by a simple rotation of the components.There are also two classes of finite elements, like Raviart-Thomas and Brezzi-Douglas-Marini in 2D, which are called respectively Nedelec elements of first typeand of second type.

The 3D Nedelec space in which the elements of first type live and which is usedto define the degrees of freedom of the Nedelec elements of second type reads

Nk = (Pk)3 ⊕(x× (Pk)3

)(1.29)

and the degrees of freedom are defined by the following unisolvence lemma

Lemma 6 Let K be a non degenerate tetrahedron, with faces (fi)0≤i≤4, and edges(ei)0≤i≤6 k ≥ 0, and p ∈ Nk(K) then∫

ei

p · τ i r ds = 0, ∀r ∈ Pk(ei), (1.30)∫fi

(p× νi) · s ds = 0, ∀s ∈ (Pk−1(fi))2, (1.31)∫

K

p · q dx = 0 ∀q ∈ (Pk−2)2 (1.32)

implies that p = 0.

We denote here by τ i the unit vector along the edge ei and by νi the outward unitnormal on face fi.

1.6 Change of local basis

The local degrees of freedom Σ of a Finite Element defined by (K,P,Σ) can also beused to compute the element matrices with respect to the matrices correspondingto a simpler or easily computable basis of the same space P of dimension N . Thiscould for example be an orthonormal basis. This allows to compute the matricesonce for all in some basis and then to get the matrices in any other basis by justcomputing the corresponding generalised Vandermode matrix as follows.

Let us denote by (φl)0≤l≤N the reference basis in which the element matrices areknown. Let now (pj)0≤j≤N be another basis of the same linear space P associated tothe degrees of freedom (σi)0≤i≤N . Then pj can be expressed in the basis (φl)0≤l≤N :

pj(x) =N∑l=1

αj,lφl(x). (1.33)

20

Page 22: Advanced Finite Element Methods · 2017. 1. 30. · In the Finite Element method, which is mathematically more involved, the ... An example of an unstructured Finite Element mesh

Denoting by p = (p1, . . . , pN)>, φ = (φ1, . . . , φN)> and A = ((αj,l))1≤j,l≤N , thisrelation can be written in matrix form

p(x) = Aφ(x).

Applying the linear forms σi to relation (1.33) for 1 ≤ i ≤ N , we get

IN = V A>, (1.34)

where IN is the identity matrix and V = ((σi(φj)))1≤i,j≤N . The matrix V is calledgeneralised Vandermonde matrix, as in the case when ((φj))1≤j≤N is the monomialbasis (1, x, . . . , xN−1) of Pk in 1D and for a Lagrange Finite Element where σi(pj) =pj(xi), the matrix V is the classical Vandermonde matrix V = ((xj−1

i ))1≤i,j≤N .The generalised Vandermonde matrix V is explicitly computable when the basis

(φj)j and the degrees of freedom (σi)i are explicitly known. From relation (1.34),it follows immediately that A = V −>, where we denote by V −> the inverse of thetranspose of V .

One can also take the derivative of formula (1.33). Thus

∂xpj(x) =N∑l=1

αj,l∂xφl(x),

and the same for the other variables if needed. Applying again the linear form σito this equation for 1 ≤ i ≤ N , we find

Dxp = DxφA> = DxφV

−1,

where the matrices Dxp and Dxφ are defined respectively by their generic element((σi(∂xpj)))1≤i,j≤N and ((σi(∂xφj)))1≤i,j≤Nk

. Note that if (φj)j has been chosen suchDxφ is explicitly computable, we can, thanks to this relation explicitly compute thematrix Dxp and similarly the derivative matrices with respect to other variables.

We can express M the mass matrix on the reference element K using theVandermonde matrix V . Using formula (1.33),

pj(x) =N∑l=1

αj,lφl(x).

Hence ∫K

pi(x)pj(x) dx =N∑l=1

N∑m=1

αi,lαj,m

∫K

φl(x)φm(x) dx =N∑l=1

αi,lαj,m,

if the basis functions (φj)j are orthonormal on K. It follows that M = AA> =V −>V −1.

If the space P is stable by derivation, as is the case for the polynomial spacePk, we can also express the derivative ∂xGh or other derivatives in the basis

21

Page 23: Advanced Finite Element Methods · 2017. 1. 30. · In the Finite Element method, which is mathematically more involved, the ... An example of an unstructured Finite Element mesh

(pi)i and this derivative can also be characterised by the degrees of freedom(σi(∂xGh))1≤i≤Nk

. We denote by DxG the vector containing these degrees of free-dom, which can be expressed using G as follows. We have

∂xGh(x) =

Nk∑j=1

σj(Gh)∂xpj(x),

and so for 1 ≤ i ≤ N ,

σi(∂xGh) =

Nk∑j=1

σj(Gh)σi(∂xpj).

This can also be written DxG = (Dxp)G, denoting by Dxp the matrix with genericterm ((σi(∂xpj)))1≤i,j≤N .

1.7 Construction of the Finite Element approxi-

mation space

1.7.1 The mapping

A conforming Finite Element space Vh, is constructed from a reference element, bymapping the reference Finite Element defined previously to a collection of physicalelements that define an admissible mesh of the computational domain and ensuringthat Vh ⊂ V by equating degrees of freedom on the interface.

The coefficients of Finite Element matrices are defined as integrals involvingthe basis functions. The standard practice as well for convergence theory as forpractical implementation is to make a change of variables from one unique refer-ence element to each of the other elements. For Lagrange Finite Elements affinetransformation can be used for simplices and multi-linear transformation for tensorproduct elements. For higher order elements, when one wants to get a correspond-ing high order approximation of the boundary, a polynomial transformation ofthe same order as the Finite Element approximation of the elements touching theboundary is used. This is called isoparametric Finite Elements.

Let us call K ⊂ Rd the reference element and K ⊂ Rd any element of thephysical mesh. We then define the mapping

F : K → K,

x = (x1, . . . , xd)> 7→ x = F(x) = (F1(x)), . . . , Fd(x)))>.

As differential operators are involved we will need the Jacobian matrix of themapping, denoted by

DF (x) =

((∂Fi∂xj

))1≤i,j≤d

.

22

Page 24: Advanced Finite Element Methods · 2017. 1. 30. · In the Finite Element method, which is mathematically more involved, the ... An example of an unstructured Finite Element mesh

Let us denote by J(x) = det(DF (x)), for any scalar function v(x), v(x) = v(F(x)),by ∇ = ( ∂

∂x1, . . . , ∂

∂xd)> and finally by ∇ = ( ∂

∂x1, . . . , ∂

∂xd)>. We then find, using

the chain rule that∂v

∂xj=

d∑i=1

∂Fi∂xj

∂v

∂xi.

So that∇v(x) = (DF )>∇v(x)⇒ ∇v(x) = (DF )−>∇v(x). (1.35)

An important special case is when F is an affine map. This is typically usedfor simplicial Finite Elements (except on the boundary for high order elements asit brings back the method to second order). The classical Finite Element theoryis also based on affine mappings. In this case F(x) = Ax + b, where A is a d× dmatrix and b a d-component column vector. For a simplicial mesh, the affinetransformation, that is the components of A and b, is completely determined bythe imposing that F(ai) = ai 0 ≤ i ≤ d, i.e. that all vertices of the referenceelement K are mapped to the vertices of the current element K. We then have,for a0 = (0, . . . , 0) and the components of aij (1 ≤ j ≤ d) of ai are all 0 except theith component which is 1,

A =

a1,1 − a0,1 a2,1 − a0,1 . . . ad,1 − a0,1

a1,2 − a0,2 a2,2 − a0,2 . . . ad,2 − a0,2...

... . . ....

a1,d − a0,d a2,d − a0,d . . . ad,d − a0,d

, b = a0.

The jacobian matrix of the affine transformation is then the matrix A.

1.7.2 Bases of tangent and cotangent spaces in curvilinearcoordinates

A mapping from F : Rd → Rd defines a curvilinear coordinate system, whichinduces a natural vector space called tangent space a each point. The columnvectors of the jacobian matrix DF(x), ti = ∂F

∂xi1 ≤ i ≤ d define a basis of the

tangent space, which is the image of the canonical basis under the tangent mapdefined by the Jacobian matrix DF(x). In the case of an affine map F(x) = Ax+b,mapping the reference d- dimensional simplex into the simplex (a0, . . . ad), we haveDF(x) = A, independently of x and then ti = ai − a0, so that the tangent basisconsists of the vectors going from a0 to each of the other vertices of the simplex.See Figure 1.3 for a sketch in a triangle.

Note that the direction and length of the tangent basis vectors ti are com-pletely determined by the mapping F. They form a basis of Rd provided DF(x)is invertible at all points, in other words, provided the mapping F is a C1 diffeo-morphism. However this basis is in general neither orthogonal nor normed. In anorthonormal basis the coefficients of any vector in this basis v = v1e1 + · · ·+ vdedcan be expressed in the euclidian space Rd, i.e. endowed with a scalar product,by vi = v · ei. This does not work anymore in a non-orthogonal basis. This is why

23

Page 25: Advanced Finite Element Methods · 2017. 1. 30. · In the Finite Element method, which is mathematically more involved, the ... An example of an unstructured Finite Element mesh

a0

a1

a2

t1

t2

a0

a1

a2

t1

t2

n1

n2

Figure 1.3: Left: Tangent basis, Right: Tangent and cotangent basis vectors

in this case it is useful to use the dual basis, which consists of elements of L(Rd),that is linear forms on Rd, which map any vector to a real number. The dual basisis by definition the unique basis of the dual space such that di(tj) = δij. Thanksto the scalar product, in a euclidian space, each element di of the dual basis canbe uniquely associated to a vector ni of Rd by defining ni as the unique vectorverifying

ni · v = di(v) ∀v ∈ Rd.

Considering now the basis (t1, . . . , td), the dual basis n1, . . . ,nd ∈ Rd is defined byni · tj = δij, which means that ni is locally orthogonal to the hyperplane definedby (tj)j 6=i and normed by ni · ti = 1.

For an affine mapping defined by a simplex, as introduced above, ni is normalto the face defined by all the vertices but ai. See Figure 1.3 for a drawing inR2. An orthonormal basis is a special case: if the primal basis (t1, . . . , td) isorthonormal, then we have, following the definition of the dual basis, that ni = tifor i = 1, . . . , d.

Lemma 7 The matrix N(x) = [n1, . . . ,nd], whose columns are the elements ofthe dual basis of (t1, . . . , td) verifies

N(x) = (DF(x))−>. (1.36)

Proof. Let us denote DF(x) = [t1, . . . , td] to highlight that the tangent vectorsare the columns of the Jacobian matrix. Then, due to the definition of the dualbasis, we notice that

N>DF = ((ni · tj))1≤i,j≤d = ((δij))1≤i,j≤d = Id.

This shows that N> = (DF)−1, which is equivalent to the result we are lookingfor.

Proposition 1 In a three dimensional space (d = 3), the normal vectors areobtained from the tangent vector through the following relation:

n1 =1

Jt2 × t3, n2 =

1

Jt3 × t1, n3 =

1

Jt1 × t2.

24

Page 26: Advanced Finite Element Methods · 2017. 1. 30. · In the Finite Element method, which is mathematically more involved, the ... An example of an unstructured Finite Element mesh

Proof. As n1 is by definition orthogonal to t2 and t3 is is colinear to t2 × t3

and can be written n1 = αt2 × t3 for some scalar α. Now as t1 · n1 = 1 andt1 · t2 × t3 = J , we find α = 1/J . The same reasoning applies to the two othercomponents.

Remark 7 In the physics literature, the tangent basis is generally called covariantbasis and the basis of the dual cotangent space is called contravariant basis.

1.7.3 H1 conforming Finite Elements

Let us build the conforming Finite Element space V 0h based on the reference el-

ement (K, P , Σ) as a subspace of H1(Ω). For this we need a mesh denoted byT =

⋃1≤e≤Nel

Ki consisting of Nel disjoint conforming elements denoted each byKi. On this mesh we can then define V 0

h ⊂ H1(Ω) by

V 0h = vh ∈ C0(Ω) | vh|Ke = ve F−1

e , ve ∈ P , 1 ≤ e ≤ Nel.

This means that the space V 0h is defined element by element and that the finite

dimensional space on each element is defined as composition of the reference ele-ment space P and the local element mapping Fe. In the case when Fe is an affinemapping and P is a polynomial space, the mapped space is still a polynomial spaceof the same degree, but not in the general case. Let us denote by N = dimV 0

h

the dimension of the full Finite Element approximation space, and N = dim P thedimension of the local approximation space on each Element. If there are degreesof freedom shared between several elements we have N < NelN , and in all casesN ≤ NelN .

The Finite Element space V 0h being defined, the next step is to restrict the

variational formulation of the problem being considered to functions in V 0h . For

the Poisson problem with Neumann boundary conditions (1.18) this leads to thefollowing discrete variational formulation:Find uh ∈ V 0

h such that∫Ω

∇uh · ∇vh dx +

∫Ω

uhvh dx =

∫Ω

fvh dx +

∫∂Ω

gvh dσ ∀vh ∈ V 0h . (1.37)

This discrete variational formulation now this to be transformed to a linear systemfor practical implementation on a computer. To this aim, the integrals need to bedecomposed on single elements and then mapped back to the reference elementsso that the basis functions of the reference Finite Element space P can be pluggedin.

First splitting the integrals over the elements (1.37) becomes

Nel∑e=1

∫Ke

∇uh·∇vh dx+

Nel∑e=1

∫Ke

uhvh dx =

Nel∑e=1

∫Ke

fvh dx+

Nbel∑e=1

∫Γe

gvh dσ ∀vh ∈ V 0h .

The last sum is on the element touching the boundary of Ω. The next step isto make the change of variables x = Fe(x) in the integral over Ki. Then dx =

25

Page 27: Advanced Finite Element Methods · 2017. 1. 30. · In the Finite Element method, which is mathematically more involved, the ... An example of an unstructured Finite Element mesh

J(x) dx, where as introduced above, J = detDF . In the integrals not involvingderivatives we then simply get∫

Ke

uhvh dx =

∫K

ueveJ dx,

∫Ke

fvh dx =

∫K

fveJ dx.

The boundary integral is dealt with the same way, using the restriction of theelement mappings to the boundary and the appropriate Jacobian in the changeof variables. For the integral involving the gradients, we need to make use of thechain rule (1.35)∫

Ke

∇uh · ∇vh dx =

∫K

(DF )−>∇ue · (DF )−>∇veJ dx.

Finally, we can express ue, ve ∈ P , on the basis of P corresponding to the degreesof freedom Σ. Let us denote by (ϕi)1≤i≤N this basis. Then

ue(x) =N∑j=1

ujϕj(x), ve(x) =N∑i=1

viϕi(x).

By plugging these expressions in the element integrals defining the variationalformulation we obtain a linear system. First∫K

ueveJ dx =∑

1≤i,j≤N

ujvi

∫K

ϕiϕjJ dx = V >MeU, with Me = ((

∫K

ϕiϕjJ dx))1≤i,j≤N

where Me is called the element mass matrix, V = (v1, . . . , vN)>, U = (u1, . . . , uN)>.In the same way∫K

(DF )−>∇ue·(DF )−>∇veJ dx = V >AeU, with Ae =

∫K

(DF )−>∇ϕi·(DF )−>∇ϕjJ dx.

Ae is called the element stiffness matrix. Assuming for simplicity that the bound-ary term g vanishes, it remains to assemble the right-hand-side depending on f .The contribution on the element Ke is obtained by

∫K

fveJ dx =N∑i=1

vi

∫K

fϕiJ dx = V >b, with b = ((

∫K

fϕiJ dx))1≤i≤N .

From local to global. To go from the element matrices to the global matrices,the sum over the elements need to be performed and contributions of degrees offreedom shared between different elements need to be added. For this a datastructure associating a global number for each degree of freedom from the localnumber in each element needs to be created. This can define by a function Ψ whichto a couple, (element, local degree of freedom) (e, i) associates the global number

26

Page 28: Advanced Finite Element Methods · 2017. 1. 30. · In the Finite Element method, which is mathematically more involved, the ... An example of an unstructured Finite Element mesh

of the degree of freedom I (1 ≤ I ≤ dim(V 0h )) of the basis function ϕi of V 0

h suchthat (ϕI)|Ke = ϕi. Then the global matrix A is obtained by the algorithm:

A=0;for e = 1, Nel do

for i, j = 1, N do

A(Ψ(e, i),Ψ(e, j)) = A(Ψ(e, i),Ψ(e, j)) + Ae(i, j),

end

end

where Ae is the element stiffness matrix on Ke. The same procedure applies toall matrices involved in the variational formulation and also to the right-hand-side.

1.7.4 H(curl,Ω) conforming Finite Elements

Let us consider here the 3D case in which the curl operator is naturally defined.The 2D case can be obtained as a special case. The H(curl,Ω) function space andits conforming approximation consists of vectors. Hence on a change of basis, oneneeds to decide how the components of the vectors are transformed. In order tohave a natural map of the tangents to a face used in the definition of the degreesof freedom and that guarantee conformity, the vectors defining the edges of thereference element needed to be mapped to either the covariant or the contravariantbasis associated to the mapping. In the H(curl,Ω) case it turns out that the rightbasis is the contrariant basis (n1,n2,n3).

A vector v on the image element is defined from a vector v on the referenceelement by the transformation

v(x) = (DF(x))−>v(x), with x = F(x). (1.38)

This transformation is called the covariant Piola transform. In the context ofdifferential forms it is the natural pullback transformation of a 1-form (in a 3Dspace).

As the columns of (DF (x))−> are (n1,n2,n3) as observed in (1.36), we seewith this transformation formula that

v(x) = v1(x)n1(x) + v2(x)n2(x) + v3(x)n3(x), (1.39)

and in particular that the canonical basis (e1, e2, e3) on the reference element ismapped into (n1,n2,n3). We will also need the images of the outward normals tothe faces of the reference elements by this mapping.

Lemma 8 The image of any outward normal ν of the reference element by themapping (1.38) is λν, with λ = ‖ni‖ in case the face of the referece element isorthogonal to ei and for the face opposite to the origin in the case of a tetrahedronλ = ‖n1 + n2 + n3)‖/

√3.

Proof. The unit outward normal is constant on each face of the reference element.

27

Page 29: Advanced Finite Element Methods · 2017. 1. 30. · In the Finite Element method, which is mathematically more involved, the ... An example of an unstructured Finite Element mesh

For a tetrahedral reference element the unit normal to the face opposite toa1 is ν1 = e1 = (1, 0, 0)>, to the face opposite to a2 is ν2 = e2 = (0, 1, 0)>

and to the face opposite to a3 is ν3 = e3 = (0, 0, 1)>. Hence νi is mappedinto ni the corresponding vector of the contravariant basis. Because the outwardunit vector on each face is orthogonal to the face, ni and ν are aligned and inthe same direction. So the scaling factor with respect to the unit normal τ ,whose norm is one, is given by ‖ni‖. On the face opposite to a0, the outwardunit normal is ν = 1√

3(e1 + e2 + e3), which is mapped by the transformation

to n = 1√3(n1 + n2 + n3). On the other hand, this n is orthogonal to the face

(a1, a2, a3) of the element as n · (t2− t1) = n · (t3− t1) = 0. Here the scaling factorcompared to the unit normal is ‖n‖.

In the case of a cubic reference element, all the normals are parallel to one ofthe vector ei and the first part of the tetrahedron case applies.

In order to get an expression of a variational formulation defined in H(curl,Ω),we now need to compute the curl of a vector in this basis.

Proposition 2 We have the following properties:

1. For any vector field v, defining Dv the Jacobian matrix of v, we have

(∇× v)×w =((Dv)T −Dv

)w ∀w ∈ Rd.

2. The transformation rule of the Jacobian matrix under the transformation(1.38) reads

Dv(x) = S(x) + (DF(x))−>Dv(x)(DF(x))−1

where S is a symmetric matrix.

3. The transformation rule for the curl under the transformation (1.38) reads

∇× v(x) =1

J(x)DF(x)∇ × v(x). (1.40)

Proof. 1. Can be checked by comparing the expressions on the left and righthand sides.

2. We can express(1.38) as

v(x) = (DF)>(x)v(F(x)),

so that

vi(x) =3∑

k=1

∂Fk(x)

∂xivk(F(x)).

Let us now compute the coefficient on line i and column j of Dv(x).

∂vi∂xj

=3∑

k=1

(∂2Fk(x)

∂xi∂xjvk(F(x))

)+

3∑k=1

(∂Fk(x)

∂xi

3∑l=1

∂Fl∂xj

∂vk∂xl

),

28

Page 30: Advanced Finite Element Methods · 2017. 1. 30. · In the Finite Element method, which is mathematically more involved, the ... An example of an unstructured Finite Element mesh

so that we recognise that

Dv = S + (DF)>(Dv(x))(DF),

where S =∑3

k=1

(∂2Fk(x)∂xi∂xj

vk(F(x)))

is obviously symmetric. Multiplying this ex-

pression by (DF)−> on the left and by (DF)−1 on the right yields the result.3. Using 1. and 2. we get, for an arbitrary vector w ∈ R3 we find

(∇×v)×w = (DF)−>(

(Dv)> − Dv)

(DF)−1w = (DF)−>(

(∇ × v)× (DF)−1w).

(1.41)Not denoting by c1, c2, c3 the columns of the matrix (DF)−1 and taking w = e1 =(1, 0, 0)> so that (DF)−1w = c1, we notice that

(∇× v)× e1 =

0(∇× v)3

−(∇× v)2

=

c1 · (∇ × v)× c1

c2 · (∇ × v)× c1

c3 · (∇ × v)× c1

=

0

c1 × c2 · (∇ × v)

−c3 × c1 · (∇ × v)

.

And in the same way taking w = e2 the second vector of the canonical basis

(∇× v)× e2 =

−(∇× v)3

0(∇× v)1

=

c1 · (∇ × v)× c2

c2 · (∇ × v)× c2

c3 · (∇ × v)× c2

=

−c1 × c2 · (∇ × v)0

c2 × c3 · (∇ × v)

.

It now remains to ckeck that the inverse DF of (DF)−1 is defined by its three lines(c2 × c3)/J , (c3 × c1)/J , (c1 × c2)/J to realise that the three components of thecurl indeed satisfy (1.40).

Now using transformation (1.38) one can check by direct computation that allterms appearing in the curl Green’s formula (1.8) including the normal componentare exactly preserved.

Proposition 3 We have the following properties:

(i) ∫K

∇× u · v dx =

∫K

∇ × u · v dx (1.42)

(ii) For any face fi on the boundary of K image of the face fi of the referenceelement ∫

fi

u× ν · v dσ =

∫fi

u× ν · v dσ (1.43)

We observe in particular, that the term involving the curl is completely indepen-dent of the metric and has the same expression under any mapping. This is truealso for the boundary term.Proof. (i) Let us observe, as the columns of DF are the vectors t1, t2, t3 that dueto (1.40)

∇× u(x) =1

J(x)(c1t1 + c2t2 + c3t3) ,

29

Page 31: Advanced Finite Element Methods · 2017. 1. 30. · In the Finite Element method, which is mathematically more involved, the ... An example of an unstructured Finite Element mesh

where c1 = ∂x2u3 − ∂x3u2, c2 = ∂x3u1 − ∂x1u3, c3 = ∂x1u2 − ∂x2u1. Then, makingthe change of variables x = F(x), dx = J(x) dx and plugging this expression into(1.42), we find∫

K

∇× u · v dx =

∫K

1

J(x)(c1t1 + c2t2 + c3t3) · (v1n1 + v2n2 + v3n3)J(x) dx

=

∫K

(c1v1 + c2v2 + c3v3) dx =

∫K

∇ × u · v dx.

(ii) Lemma 8 gives us the image of the reference unit normal by the mapping.Let us first consider the case of a face of the reference element parallel to a coordi-nate plane. Let us express u and v in the contravariant basis using formula (1.39)and plug it into the expression of the left-hand side of (1.43), considering the faceorthogonal to n1, the others being dealt with in the same way. Note also that theboundary is defined as a parametric surface for which the area measure is definedby dσ = ‖t2 × t3‖ dσ, where dσ = dx2 dx3. We use also that by definition of n1

we have ‖t2× t3‖ = J‖n1‖. We introduce the parameter s to indicate whether n1

and ν are in the same direction or not.∫fi

u× ν · v dσ =

∫fi

(u1(x)n1(x) + u2(x)n2(x) + u3(x)n3(x))× (sn1/‖n1‖)

· (v1(x)n1(x) + v2(x)n2(x) + v3(x)n3(x))J‖n1‖ dx2 dx3

= s

∫fi

(u3v2 − u2v3)(n3 × n1 · n2)J dx2 dx3 = s

∫fi

(u3v2 − u2v3) dx2 dx3

=

∫fi

u× ν1 · v dσ

as n3 × n1 · n2 = 1/J

We can now assemble the matrices involved in a variational formulation posedon H(curl,Ω). Let us consider for example the variational formulationFind u ∈ H(curl,Ω) such that∫

Ω

u · v dx +

∫Ω

∇× u · ∇ × v dx =

∫Ω

f · v dx ∀v ∈ H(curl,Ω). (1.44)

Let us build the conforming Finite Element space V 1h ⊂ H(curl,Ω) based on the ref-

erence element (K, P 1, Σ1). For this we need a mesh denoted by T =⋃

1≤e≤NelKi

consisting of Nel disjoint conforming elements denoted each by Ki. On this meshwe can then define V 1

h ⊂ H(curl,Ω) by

V 1h = vh ∈ H(curl,Ω) |vh|Ke = (DF)−>ve F−1

e , ve ∈ P 1, 1 ≤ e ≤ Nel.

Now we can in the variational formulation (1.44) replace H(curl,Ω) by V 1h and u

and v by their discrete counterparts

uh(x) =

N1∑j=1

ujϕ1j(x), vh(x) =

N1∑i=1

viϕ1i (x),

30

Page 32: Advanced Finite Element Methods · 2017. 1. 30. · In the Finite Element method, which is mathematically more involved, the ... An example of an unstructured Finite Element mesh

where (ϕ1i )1≤i≤N1 stands for the basis of V 1

h associated to the Finite Element. Asfor the H1(Ω) conforming case, plugging these expressions into the variationalformulation leads to the matrix expression:

V >M1U + V >A1U = V >b,

where M1 = ((∫

Ωϕ1i ·ϕ1

j dx))i,j is the mass matrix in V 1h , A1 = ((

∫Ω∇× ϕ1

i · ∇×ϕ1j dx))i,j, and b = (

∫f ·ϕ1

i )i. There now only remains to compute these integrals.Let us start with the mass matrix M1.∫

Ω

ϕ1i ·ϕ1

j dx =

Nel∑e=1

∫Ke

ϕ1i ·ϕ1

j dx.

Then on each element Ke we make the change of variables x = Fe(x), dx =Je(x) dx to get∫

Ke

ϕ1i ·ϕ1

j dx =

∫K

(DFe)−>ϕ1

i · (DFe)−>ϕ1

jJe dx,

=

∫K

(ϕ1i,1n1 + ϕ1

i,2n2 + ϕ1i,3n3) · (ϕ1

j,1n1 + ϕ1j,2n2 + ϕ1

j,3n3)Je dx,

=

∫K

(ϕ1i )>Ge

nϕ1jJe dx,

where Gen = ((ni ·nj))1≤i,j≤3 is the contravariant metric tensor. This is the element

mass matrix on the element Ke as for the H1(Ω), the full mass matrix is obtainedby summing up the contributions from the different elements.

The procedure is the same for the A1 matrix. Let us here simply compute theexpression of the element matrix, using the expression of the curl given in (1.40):∫Ke

∇×ϕ1i · ∇ ×ϕ1

j dx =

∫K

1

Je(DFe)∇ × ϕ1

i ·1

Je(DFe)∇ × ϕ1

jJe dx,

=

∫K

(ci,1t1 + ci,2t2 + ci,3t3) · (cj,1t1 + cj,2t2 + cj,3t3)1

Jedx,

=

∫K

(∇ × ϕ1i )>Ge

t∇ × ϕ1j

1

Jedx,

where we have denoted ∇ × ϕi = (ci,1, ci,2, ci,3)> and Get = ((ti · tj))1≤i,j≤3 is the

covariant metric tensor.

1.7.5 H(div,Ω) conforming Finite Elements

The H(div,Ω) function space and its conforming approximation also consist ofvectors. Hence on a change of basis, one needs to decide how the components ofthe vectors are transformed. In order to have a natural map of the normal to aface used in the definition of the degrees of freedom and that guarantee conformity,the vectors defining the edges of the reference element needed to be mapped to

31

Page 33: Advanced Finite Element Methods · 2017. 1. 30. · In the Finite Element method, which is mathematically more involved, the ... An example of an unstructured Finite Element mesh

either the covariant or the contravariant basis associated to the mapping. In theH(div,Ω) case it turns out that the right basis is the covariant basis (t1, t2, t3).From the expression of the transformation rule for the curl (1.40) we see thatcomponents are exactly conserved if in addition we scale the length by 1/J(x).This then leads to the following transformation rule

v(x) =1

J(x)DF(x)v(x), with x = F (x). (1.45)

This transformation is called the contravariant Piola transform. In the context ofdifferential forms it is the natural pullback transformation of a 2-form (in a 3Dspace).

In order to get an expression of a variational formulation defined in H(div,Ω),we now need to compute the curl of a vector in this basis.

Proposition 4 We have the following properties

(i) The jacobian matrix of a vector field transforms in the following way

Dv = T +1

J(x)(DF(x))−1Dv(x)(DF(x)), (1.46)

where T is a matrix with vanishing trace.

(ii) The divergence transforms under the transformation rule (1.45)

∇ · v(x) =1

J(x)∇ · v(x). (1.47)

Proof. (i) The vector field v given by transform (1.45) can also be expressed onthe covariant basis by

v =1

J(v1t1 + v2t2 + v3t3).

Taking the dot product with ni yields vi = Jni · v, so that the derivative becomes

∂vi∂xj

=∂Jni∂xj

· v + Jni ·∂v

∂xj=∂Jni∂xj

· v + J3∑

k=1

3∑l=1

∂xi∂xk

∂vk∂xl

∂xl∂xj

,

as ni =(∂xi∂x1, ∂xi∂x2, ∂xi∂x3

)>. Now denoting by T = ((∂Jni

∂xj·v))1≤i,j≤3, this implies that

Dv = T + J(DF)Dv(DF)−1.

Let us not verify that the trace of T vanishes. To this aim let us first recall that

Jn1 = t2 × t3, Jn2 = t3 × t1, Jn3 = t1 × t2.

32

Page 34: Advanced Finite Element Methods · 2017. 1. 30. · In the Finite Element method, which is mathematically more involved, the ... An example of an unstructured Finite Element mesh

Moreover from the expression of tj we find that ∂ti∂xj

=∂tj∂xi

, so that

tr T =

(∂t2

∂x1

× t3 + t2 ×∂t3

∂x1

+∂t3

∂x2

× t1 + t3 ×∂t1

∂x2

+∂t1

∂x3

× t2 + t1 ×∂t2

∂x3

)· v,

=

(∂t2

∂x1

× t3 + t3 ×∂t2

∂x1

+ t2 ×∂t3

∂x1

+∂t3

∂x1

× t2 +∂t3

∂x2

× t1 + t1 ×∂t3

∂x2

)· v,

= 0.

We get the desired result by dividing by j, multiplying by (DF)−1 on the left andby (DF). Indeed the matrix T obtained from T in this process is similar to T upto the scalar scaling factor J and as similar matrices have the same trace it followsthat trT = 0.

(ii) Relation (1.47) is obtained by taking the trace of (1.46) and using againthat similar matrices have the same trace and that trT = 0

Now using transformation (1.45) one can check by direct computation thatall terms appearing in the divergence Green’s formula (1.7) including the normalcomponent are exactly preserved.

Proposition 5 We have the following properties:

(i) ∫K

u · ∇ϕ dx =

∫K

u · ∇ϕ dx (1.48)

(ii) ∫K

∇ · uϕ dx =

∫K

∇ · u ϕ dx (1.49)

(iii) For any face fi on the boundary of K image of the face fi of the referenceelement ∫

fi

u · ν ϕ dσ =

∫fi

u · ν ϕ dσ (1.50)

We observe in particular, that all these terms are completely independent of themetric and have the same expression under any mapping.Proof. (i) Let us as usual perform the change of variables x = F(x) dx = J(x) dx,using the transformation rule (1.45) for u in the integral∫

K

u · ∇ϕ dx =

∫K

1

J(DF)u · (DF)−>∇ϕJ dx =

∫K

u · ∇ϕ dx.

(ii) With the same change of variable and transformation rule for u, using(1.47) we find ∫

K

∇ · uϕ dx =

∫K

1

J∇ · u ϕJ dx =

∫K

∇ · u ϕ dx

33

Page 35: Advanced Finite Element Methods · 2017. 1. 30. · In the Finite Element method, which is mathematically more involved, the ... An example of an unstructured Finite Element mesh

(iii) Here the face fi is defined as a parametrized surface, the parametrizationbeing given by one of the faces of the reference element. Let us do the computationfor the face on the (x1, x2) plane for with the normal vector is ν = −e3. Theparametrization is then defined by

(x1, x2) 7→ F(x1, x2, 0)

and the measure is

dσ = ‖t1 × t2‖ dx1 dx2 = J‖n3‖ dx1 dx2.

Moreover the outward unit normal vector is related to the contravariant vector n3,which is by definition orthogonal to the face, by ν = −n3/‖n3‖. Finally, applyingthe transformation rule (1.45) for u we get∫

fi

u · ν ϕ dσ = −∫fi

1

J(DF)u · n3

‖n3‖ϕJ‖n3‖ dx1 dx2

= −∫fi

(u1t1+u2t2+u3t3)·n3ϕ dx1 dx2 = −∫fi

u3ϕ dx1 dx2 =

∫fi

u·ν ϕ dx1 dx2

To conclude, we assemble the matrices involved in a variational formulationposed on H(div,Ω). Let us consider for example the variational formulationFind u ∈ H(div,Ω) such that∫

Ω

u · v dx +

∫Ω

∇ · u · ∇ · v dx =

∫Ω

f · v dx ∀v ∈ H(div,Ω). (1.51)

We need to build the conforming Finite Element space V 2h ⊂ H(div,Ω) based on

the H(div,Ω) reference element (K, P , Σ). For this we consider as previously amesh denoted by T =

⋃1≤e≤Nel

Ki consisting of Nel disjoint conforming elementsdenoted each by Ki. On this mesh we can then define V 2

h ⊂ H(div,Ω) by

V 2h = vh ∈ H(div,Ω) |vh|Ke =

1

J(DF)ve F−1

e , ve ∈ P , 1 ≤ e ≤ Nel.

Now we can in the variational formulation (1.44) replace H(div,Ω) by V 2h and u

and v by their discrete counterparts

uh(x) =

N2∑j=1

ujϕ2j(x), vh(x) =

N2∑i=1

viϕ2i (x),

where (ϕ2i )1≤i≤N2 stands for the basis of V 2

h associated to the Finite Element. Asfor the H1(Ω) and H(curl,Ω) conforming case, plugging these expressions into thevariational formulation leads to the matrix expression:

V >M2U + V >A2U = V >b,

34

Page 36: Advanced Finite Element Methods · 2017. 1. 30. · In the Finite Element method, which is mathematically more involved, the ... An example of an unstructured Finite Element mesh

where M2 = ((∫

Ωϕ2i · ϕ2

j dx))i,j is the mass matrix in V 2h , A2 = ((

∫Ω∇ · ϕ2

i ∇ ·ϕ2j dx))i,j, and b = (

∫f ·ϕ2

i )i. There now only remains to compute these integrals.Let us start with the mass matrix M2∫

Ω

ϕ2i ·ϕ2

j dx =

Nel∑e=1

∫Ke

ϕ2i ·ϕ2

j dx.

Then on each element Ke we make the change of variables x = Fe(x), dx =Je(x) dx, using the contravariant Piola transform (1.45) for the vectors to get∫

Ke

ϕ2i ·ϕ2

j dx =

∫K

1

Je(DFe)ϕ

2i ·

1

Je(DFe)ϕ

2jJe dx,

=

∫K

1

Je(ϕ2

i,1t1 + ϕ2i,2t2 + ϕ2

i,3t3) · (ϕ2j,1t1 + ϕ2

j,2t2 + ϕ2j,3t3) dx,

=

∫K

(ϕ2i )>Gtϕ

2j

1

Jedx,

where Gt = ((ti · tj))1≤i,j≤3j is the covariant metric tensor. This is the elementmass matrix on the element Ke as for the H1(Ω), the full mass matrix is obtainedby summing up the contributions from the different elements.

The procedure is the same for the A2 matrix. Let us here compute the ex-pression of the element matrix, using the expression of the divergence given in(1.47): ∫

Ke

∇ ·ϕ2i ∇ ·ϕ2

j dx =

∫K

1

Je∇ · ϕ2

i

1

Je∇ · ϕ2

jJe dx,

=

∫K

1

Je∇ · ϕ2

i ∇ · ϕ2j dx.

Note that here the divergence is a scalar. There is no metric tensor in the matrix.Only the inverse Jacobian is present because of the mapping.

1.8 Convergence of the Finite Element method

The Ritz-Galerkin method consists in finding an approximate solution uh in afinite dimensional subspace of V . For convergence studies one needs to consider asequence of subspaces of V of larger and larger dimension so that they get closerto V . One then defines a sequence of problems parametrised by h that read:Find uh ∈ Vh such that

a(uh, vh) = l(vh) ∀vh ∈ Vh, (1.52)

where Vh ⊂ V is a vector space of dimension N . Let (ϕ1, . . . , ϕN) a basis of Vh. Anelement uh ∈ Vh can then be expanded as uh(x) =

∑Nj=1 ujϕj(x). Taking vh = ϕi

the equation (1.52) becomes using the linearity

N∑j=1

uja(ϕj, ϕi) = l(ϕi).

35

Page 37: Advanced Finite Element Methods · 2017. 1. 30. · In the Finite Element method, which is mathematically more involved, the ... An example of an unstructured Finite Element mesh

Then using the symmetry of a, we notice that the discrete variational formulation(1.52)is equivalent to the linear system

AUh = L, (1.53)

where A = (a(ϕi, ϕj))1≤i,j≤N , L is the column vector with components l(ϕi) andU is the column vector with the unknowns ui that are the coefficients of uh in thebasis (ϕ1, . . . , ϕN).

Theorem 2 Assume that a is a symmetric continuous and coercive bilinear formon a Hilbert space V and l a continuous linear form on V . Then the system (1.53)is equivalent to the discrete variational form (1.52) and admits a unique solution

Proof. For vh ∈ Vh, we denote by V the vector of its components in the basis(ϕ1, . . . , ϕN).

• Thanks to the bilinearity of a and the linearity of l the relation (1.52) canbe written equivalently

tV AUh = tV L ∀V ∈ RN , (1.54)

which means that the vector AUh − L ∈ RN is orthogonal to all the vectorsof RN , and so is the zero vector. Conversely it is clear that (1.53) implies(1.54) and so (1.52).

• Let vh ∈ Vh. Then, as a is coercive, there exists α > 0 such that

tV AV = a(vh, vh) ≥ α‖vh‖2 ≥ 0,

and tV AV = 0 = a(vh, vh) ⇒ ‖vh‖ = 0, which implies that vh = 0 and soV = 0. So A is symmetric, positive definite and therefore invertible.

After making sure the approximate solution exists for some given space Vh,one needs to make sure the approximation converges towards the exact solution.This results from two properties: 1) The Galerkin orthogonality, which comes fromthe conforming Gakerkin approximation, 2) The approximability property, whichmakes sure that for any v ∈ V there exist vh in some finite dimensional space ofthe family which is close enough to v.

Lemma 9 (Cea) Let u ∈ V the solution of (1.19) and uh ∈ Vh the solution of(1.52), with Vh ⊂ V . Then

‖u− uh‖ ≤ C infvh∈Vh

‖u− vh‖.

36

Page 38: Advanced Finite Element Methods · 2017. 1. 30. · In the Finite Element method, which is mathematically more involved, the ... An example of an unstructured Finite Element mesh

Proof. We have

a(u, v) = l(v) ∀v ∈ V,a(uh, vh) = l(vh) ∀vh ∈ Vh,

as Vh ⊂ V , we can take v = vh in the first equality and take the difference whichyields

a(u− uh, vh) = 0 ∀vh ∈ Vh.

It results that a(u− uh, u− uh) = a(u− uh, u− vh + vh − uh) = a(u− uh, u− vh),as vh− uh ∈ Vh and so a(u− uh, vh− uh) = 0. Then there exists α > 0 and β suchthat

α‖u− uh‖2 ≤ a(u− uh, u− uh) as a is coercive,

≤ a(u− uh, u− vh) ∀vh ∈ Vh,≤ β‖u− uh‖‖u− vh‖ as a is continuous.

Whence ‖u − uh‖ ≤ βα‖u − vh‖ for all vh ∈ Vh. We get the desired results taking

the infimum in Vh.

For the global error estimates, we make the following hypotheses on the trian-gulation Th, where we denote by hK the diameter of the circumscribed circle andρK the diameter of the inscribed circle of triangle K:

(H1) We assume that the family of triangulations is regular in the following sense:

(i) There existes a constant σ such that

∀K ∈ ∪hThhKρK≤ σ.

(ii) The quantity h = maxK∈h

hK tend to 0.

(H2) All finite elements (K,P,Σ), K ∈ ∪hTh are affine equivalent to a uniquereference element (K, P , Σ).

(H3) All finite elements (K,P,Σ), K ∈ ∪hTh are of class C0.

Theorem 3 We assume the hypotheses (H1), (H2) and (H3) are verified. More-over we assume that there exists an integer k ≥ 1 such that

Pk ⊂ P ⊂ H1(K),

Hk+1(K) ⊂ C0(K) (true if k + 1 >d

2, K ⊂ Rd).

Then there exists a constant C independent of h such that for any function v ∈Hk+1(Ω) we have

‖v − πhv‖0 ≤ Chk+1|v|k+1,Ω, |v − πhv|1 ≤ Chk|v|k+1,Ω,

37

Page 39: Advanced Finite Element Methods · 2017. 1. 30. · In the Finite Element method, which is mathematically more involved, the ... An example of an unstructured Finite Element mesh

where πh is the finite element interpolation operator of the finite element (K,P,Σ)defined by

πhv =N∑i=1

σi(v) pi,

where σi ∈ Σ and pi the corresponding basis function of P .

We consider a variational problem posed in V ⊂ H1(Ω).

Theorem 4 We assume that (H1), (H2) and (H3) are verified. Moreover weassume that there exists an integer k ≥ 1 such that k + 1 > d

2with Pk(K) ⊂ P ⊂

H1(K) and that the exact solution of the variational problem is in Hk+1(Ω), then

‖u− uh‖1,Ω ≤ Chk|u|k+1,Ω,

where uh ∈ Vh is the discrete solution.

Proof. We have because of the polynomial approximation theorem

‖u− πhu‖1,Ω ≤ Chk|u|k+1,Ω.

On the other hand Cea’s lemma gives us

‖u− uh‖1,Ω ≤ C infvh∈Vh

‖u− vh‖1,Ω ≤ C‖u− πhu‖1,Ω.

The result follows.

1.9 The discontinuous Galerkin (DG) method

In some cases it can be convenient to relax the constraints of the approximationspace being a subspace of V or to slightly modify the bilinear and linear form, usingfor example quadrature rules to compute the integrals or adding penalty terms.Let us then consider a mesh dependent family of Hilbert spaces Hh equipped witha mesh dependent norm ‖ · ‖h such that V ⊂ Hh and also Vh ⊂ Hh for all h.One could choose Hh = V + Vh, but often some additional regularity of the exactsolution is needed. Then one can choose Hh = V ∩ Hm(Ω) + Vh, where Hm is aSobolev space of the needed regularity. We then define the bilinear form ah onHh as an approximation of the bilinear form a on V , and lh a linear form on Hh

approximating l the linear form on V . We assume that ah and lh are continuousand that ah is uniformly coercive on Hh, meaning that the coercivity constant doesnot depend on h, even though the norm itself can depend on h.

For discontinuous Finite Elements approximation a variational formulation inH1, given a subdivision of the domain Ω into elements Ω = ∪Ke we can define

Hh = v ∈ L2(Ω) | v|Ke ∈ H1(Ke), with ‖v‖2h =

∑e

∫Ke

|∇v(x)|2 dx+

∫Ω

v2 dx.

38

Page 40: Advanced Finite Element Methods · 2017. 1. 30. · In the Finite Element method, which is mathematically more involved, the ... An example of an unstructured Finite Element mesh

This is a broken H1 space. Its elements are locally H1 but not globally. Obvi-ously V = H1(Ω) ⊂ Hh. Depending on our problem we can then define a meshdependent bilinear form ah and a mesh dependent linear form lh. In this setting,approximating the variational formulation Find u ∈ V such that

a(u, v) = l(v) ∀v ∈ V, (1.55)

we consider a discrete variational formulation of the following form:Find uh ∈ Vh such that

ah(uh, vh) = lh(vh) ∀vh ∈ Vh. (1.56)

The error estimation of such an approximate variational formulation dependson the following lemma, known as Strang’s second lemma [14], which replacesCea’s lemma:

Lemma 10 (Strang) Assume u ∈ V is the solution of (1.55) and uh ∈ Vh itsapproximation, solution of (1.56), then

‖u− uh‖h ≤ C

(infvh∈Vh

‖u− vh‖h + supvh∈Vh

|ah(u, vh)− lh(vh)|‖vh‖h

). (1.57)

Note that as uh verifies ah(uh, vh) = lh(vh), we also could write ah(u, vh)− lh(vh) =ah(u− uh, vh).

Remark 8 The difference between Cea’s Lemma that is used for the conformingapproximation and the above Strang Lemma used for non conforming approxima-tion is the presence of the second term on the right-hand-side, which is a consis-tency term, measuring how accurately the continuous solution verifies the discreteequation. This term vanishes when Vh ⊂ V and ah = a because of the Galerkinorthogonality.

Proof. By bilinearity of ah, we have

ah(vh−uh, vh−uh) = ah(vh−u+u−uh, vh−uh) = ah(vh−u, vh−uh)+ah(u−uh, vh−uh)

and also

ah(u− uh, vh − uh) = ah(u, vh − uh)− ah(uh, vh − uh),= ah(u, vh − uh)− lh(vh − uh),

as uh verifies (1.56).Using the uniform coercivity and continuity of ah in Hh, there exists α > 0 and

β such that for any vh ∈ Vh

α‖vh − uh‖2h ≤ ah(vh − uh, vh − uh) ≤ ah(vh − u, vh − uh) + ah(u− uh, vh − uh)≤ ah(vh − u, vh − uh) + ah(u, vh − uh)− lh(vh − uh),

≤ β‖vh − u‖h‖vh − uh‖h +|ah(u, vh − uh)− lh(vh − uh)|

‖vh − uh‖h‖vh − uh‖h

39

Page 41: Advanced Finite Element Methods · 2017. 1. 30. · In the Finite Element method, which is mathematically more involved, the ... An example of an unstructured Finite Element mesh

as ah is continuous. Whence

‖vh − uh‖h ≤β

α‖u− vh‖h +

1

αsupvh∈Vh

|ah(u, vh)− lh(vh)|‖vh‖h

for all vh ∈ Vh. This combined with the triangle inequality yields

‖u−uh‖h ≤ ‖u−vh‖h+‖vh−uh‖h ≤(

1 +β

α

)‖u−vh‖h+

1

αsupvh∈Vh

|ah(u, vh)− lh(vh)|‖vh‖h

.

We then get the desired results taking the infimum in Vh.

Now using our broken space Hh, we want to define a mesh dependent bilinearform ah on Hh which is uniformly coercive (i.e. with a coercivity constant thatdoes not depend on the mesh) and such that the consistency error, which is thesecond term on the right-hand-side of (1.57), vanishes. To achieve consistency itis convenient to derive the bilinear form starting from the exact solution. Thenwe can symmetrize and penalize the obtained formulation to get a symmetric andcoercive mesh dependent form. This leads to the so-called SIP (symmetric inte-rior penalty) Discontinuous Galerkin (DG) method that was introduced, adaptingprevious works, and analyzed by Arnold [2]. See also [3] for a historical and moregeneral discussion on Discontinuous Galerkin methods. A mathematical textbookpresentation of the discontinuous Galerkin method can be found for example in[9].

Let us explain the method on the Poisson equation with homogeneous Dirichletboundary conditions.

−∆u = f in Ω, u = 0 on ∂Ω.

Instead of multiplying by a smooth function over the whole domain as in theclassical finite element method, we here introduce the mesh first Th = ∪eKe. Letvh ∈ L2(Ω) such that vh ∈ H1(Ke). In practice vh will be polynomial or in a localFinite Element space. Let us denote by ne the outward unit normal for element Ke

and denoting by (Γs)s the edges of the grid, Γs = Ke1 ∩Ke2 , by ns a unit normalto the edge Γs (the sign being arbitrarily chosen so that ns = ne1). As usual inDiscontinuous Galerkin formulations we denote by v = (v|Ke1

+ v|Ke2)/2 the

average of v on the edge Γs and [[v]] = v|Ke1− v|Ke2

the jump of v on the edgeΓs. For edges on the boundary of the domain, we assume that the outside valueis zero so that v = [[v]] = v. Then, we multiply by a smooth function vh|Ke onone element, integrate over this element and sum over all the elements∑

e

∫Ke

(−∆u)vh dx =∑e

[∫Ke

∇u · ∇vh dx−∫∂Ke

∂u

∂nevh dσ

]=∑e

∫Ke

∇u · ∇vh dx−∑s

∫Γs

∂u

∂ns[[vh]] dσ

=∑e

∫Ke

∇u · ∇vh dx−∑s

∫Γs

∂u

∂ns

[[vh]] dσ (1.58)

40

Page 42: Advanced Finite Element Methods · 2017. 1. 30. · In the Finite Element method, which is mathematically more involved, the ... An example of an unstructured Finite Element mesh

as the exact solution, which is in H2, has a continuous normal derivative acrossthe edges, this is equal to its average.

This formula can be used to get a consistent approximation. In order to getcoercivity, we symmetrize and penalize the interface jumps. This doesn’t breakconsistency, as the jumps vanish for the exact solution. We then get the meshdependent bilinear form

ah(uh, vh) =∑e

∫Ke

(∇u·∇vh) dx−∑s

∫Γs

∂uh∂ns

[[vh]] dσ−

∑s

∫Γs

[[uh]]

∂vh∂ns

+ µh

∫Γs

[[uh]] [[vh]] dσ. (1.59)

This is obviously symmetric, and can be proven to be uniformly coercive providedthe mesh dependent penalty term µh is appropriately chosen.

Then, defining the linear form

lh(vh) =

∫Ω

fvh dx =∑e

∫Ke

fvh dx

and the discontinuous polynomial space

Vh = vh ∈ L2(Ω) | vh|Ke ∈ Pk(Ke),

the discrete variational formulation for our problem reads: Find uh ∈ Vh such that

ah(uh, vh) = lh(vh) ∀vh ∈ Vh. (1.60)

As the exact solution u is continuous, the jump of u at the element interfacesvanishes, i.e. [[u]] = 0, hence the two last terms in (1.59), which are respectivelythe symmetry term and the penalty term vanish for uh = u. Hence using thecalculation (1.58) we can verify that the consistency error in the DG-SIP method(1.60) is exactly vanishing:

ah(u, vh)− lh(vh) =∑e

∫Ke

(−∆u)vh dx−∫

Ω

fvh dx = −∫

Ω

(∆u+ f)vh dx = 0

as −∆u = f .Even though they are not conforming as Vh 6⊂ V , DG methods are build to be

exactly consistent, so that the consistency error in the second Strang lemma 10exactly vanishes. The error analysis described in the book by Di Pietro and Ern [9]relies on this property. See in particular Section 4.2, which provides a convergenceanalysis of the SIP-DG method in an ad hoc mesh dependent norm, following thesame pattern as for the Nitsche method.

41

Page 43: Advanced Finite Element Methods · 2017. 1. 30. · In the Finite Element method, which is mathematically more involved, the ... An example of an unstructured Finite Element mesh

Chapter 2

Finite Element Exterior Calculus(FEEC)

The aim of this chapter is to provide a different point of view to the Finite Elementspaces, in particular to the vector based Finite Element spaces H(curl,Ω) andH(div,Ω). We will also see that the differential forms interpretation naturally leadsto a sequence of spaces called differential complex and related with a differentialoperator.

We will consider here mostly the Isogeometric Analysis point of view, wherewe have a physical mesh mapped from a cartesian logical mesh (see Figure 2.1).An important insight for Finite Elements is to understand what properties dependonly on the connectivity of the mesh (topological properties invariant by continuousdeformation of the mesh) and what properties depend on the mapping (geometricalproperties).

Figure 2.1: An example of a mapping from the logical to the physical mesh

2.1 Some tools from differential geometry

In this section we introduced the basic notions of differential geometry that will beneeded for the Finite Element Exterior Calculus. We follow mostly the definitionsfrom the book of Frankel [11] and the paper by Palha et al. [13] introducingso-called physics compatible discretization techniques.

The basic object of differential geometry is a manifold M:

42

Page 44: Advanced Finite Element Methods · 2017. 1. 30. · In the Finite Element method, which is mathematically more involved, the ... An example of an unstructured Finite Element mesh

Definition 4 A (differentiable) manifold of dimension n is defined as a collectionof p mappings

Fν : Uν ⊂ Rn →M,

q 7→ Fν(q) = (xν1(q), . . . , xνn(q))

which are at least C1 diffeomorphisms, that cover M. The sets Uν are open andthe coordinate systems are compatible in the intersection of two such sets.

Each of the mapping Fν defines a local coordinate system (which is global if thereis only one mapping). With the mapping come the Jacobians

DFν(q) = ((∂xνi∂qj

))1≤i,j≤n, D(F−1ν )(x) = ((

∂qi∂xνj

))1≤i,j≤n.

Using the chain rule on F−1ν (Fν(q)) = q one finds that D(F−1

ν )(x) = (DFν(q))−1.In our application the manifold will just be Rn with a unique mapping F

defining the coordinate system. Another useful example to understand the notionis the surface of a sphere, which is a two-dimensional manifold, that needs at leasttwo mappings (also called charts in the differential geometry literature, wherethey are sometimes defined by the inverse of the mapping we are using here) to becompletely covered without singular point. See Figure 2.2 for an illustration.

Figure 2.2: Illustration of two charts on a sphere.

An important goal in differential geometry is to define quantities independentlyof the local coordinates. Such quantities are called intrinsic.

Tangent plane and vectors. The first important object that can be associatedto a point x in a manifold is a vector. A vector is intrinsically defined as the tangentat x to a curve passing through x. In local coordinates a curve γ is parametrizedby

γ :[a, b]→Ms 7→ (x1(q(s)), . . . xn(q(s)))

43

Page 45: Advanced Finite Element Methods · 2017. 1. 30. · In the Finite Element method, which is mathematically more involved, the ... An example of an unstructured Finite Element mesh

and its tangent at x = γ(c), c ∈ [a, b] is

v(c) =dγ

ds(c) =

dx

ds(c) =

(dx1

ds(c), . . . ,

dxnds

(c)

)>.

The collection of all possible curves passing through x on M define a vector foreach curve and altogether the tangent plane TxM at x. If the M = Rn as in ourmain application the tangent plane is also TxM = Rn, however this is not alwaysthe case as one can figure out by considering the surface of a sphere as a manifold.

Considering not only the vector at a specific point x = γ(c) but all vectorsdefined by a curve v(s) = dγ

ds(s), s ∈ [a, b] defines a vector field. The collection of

all points associated to their tangent plane

TM = (x,v), x ∈M,v ∈ TxM

is called the tangent bundle.The local coordinates defined by the mapping F also defines a basis of TxM.

Indeed, using the mapping x(s) = F(q(s)), we find

dx

ds=

n∑j=1

dqj

ds

∂F

∂qj=

n∑j=1

vj∂F

∂qj.

The corresponding basis vectors are tj = ∂F∂qj

:= ∂j. Geometrically the basis is

associated to the curves obtained by letting all qj but one constant. These basisvectors are denoted in the modern differential geometry literature by ∂j, that wewill use in these notes, or by ∂

∂qj. So that a vector v ∈ TxM can be expressed in

the local coordinate basis by

v =n∑i=1

vi∂i = (DF)v.

We denote here in serif font v, the geometrical object. One can think of it as thevector expressed in a reference frame, typically cartesian coordinates of Rn or Rn+1

for an object embedded in a higher dimension manifold (as the surface of a sphere).And we denote in bold font the components of a column vector in a local basisv = (v1, . . . , vn)>. The last form above is a matrix vector multiplication directlyfollowing from the definition of ∂i as the ith column of the Jacobian matrix DF.As the geometric object is independent of the choice of local coordinates we have

v = (DF)v = (DF′)v′,

if F′ defines another local coordinate system (mapping) in which v′ = (v′1, . . . , v′n)are the components of v. We follow here the convention of denoting the componentsof a tangent vector with upper indices. Vectors or tangent vectors are also calledcontravariant vectors in the physics literature.

44

Page 46: Advanced Finite Element Methods · 2017. 1. 30. · In the Finite Element method, which is mathematically more involved, the ... An example of an unstructured Finite Element mesh

Example: Consider the mapping yielding polar coordinates

F(r, θ) =

(x1 = r cos θx2 = r sin θ

)A basis of the tangent plane at any point x = (x1, x2) is given by

∂r =

(cos θsin θ

), ∂θ =

(−r sin θr cos θ

).

Here ∂r is tangent to the line θ = C (only r varies) passing through x and ∂θis tangent to the line r = C (only θ varies) passing through x. Note that thisbasis is not normalized, as opposed to the classical basis used in polar coordinateser = (cos θ, sin θ)>, eθ = (− sin θ, cos θ)>. Moreover unlike in cartesian coordinateswhere the basis vectors of the tangent plane are constants, in polar coordinates, asin any general system of curvilinear coordinates, or local coordinates, they dependon the point of which the tangent plane is considered.

Cotangent plane and covectors. Even though vectors (tangent vectors) andvector fields are the most intuitive objects for defining dynamics on a manifold,an another object proved to be mathematically more interesting the covector p,which is defined as a linear form on the tangent space at x, i.e. a covector appliedto a vector yields a real number p(v) ∈ R, and is linear: p(λ1v1 +λ2v2) = λ1p(v1)+λ2p(v2). The collection of all covectors at x is called the cotangent plane anddenoted by T ∗xM. To a vector field we can then associate a covector at eachcorresponding point, this defines a covector field, which is more classically calleda differential form or a 1-form. In the same way as the tangent bundle, one candefine the cotangent bundle by

T ∗M = (x,p), x ∈M,p ∈ T ∗xM .

The natural basis of T ∗xM is the dual basis of ∂1, . . . ,∂n denoted by dq1, . . . , dqn

or d1, . . . , dn and defined by di(∂j) = δij = 1 if i = j and 0 else. From thisdefinition, as the ∂j are the columns of DF and (DF)−1DF = In, the di are thelines of (DF)−1. So the components p> = (p1, . . . , pn) of a covector p, which is ageometric object independent of the basis are defined by

p =n∑i=1

pi di = p>(DF)−1.

The components of a covector define a line vector, which multiplies the inverseJacobian matrix on the left. We therefore denote them using a transpose: p>, andtheir components are denoted classically with a lower index. We can now expressin local coordinates how a covector is applied to a vector:

p(v) =n∑i=1

pi di(

n∑j=1

vj∂j) =n∑i=1

pivi = p>(DF)−1(DF)v = p>v.

45

Page 47: Advanced Finite Element Methods · 2017. 1. 30. · In the Finite Element method, which is mathematically more involved, the ... An example of an unstructured Finite Element mesh

We notice that the definition of the covectors is such that their application to avector can be expressed directly using any local coordinate system without usingthe mapping F. Indeed p(v) = p>v = p′>v′ independently of the local coordinatesystem. Because such sums involving a vector and a covector arrive frequently, wewill use the Einstein sommation convention denoting by

pivi =

n∑i=1

pivi.

A sum is implied where the same index appears as a lower index and an upperindex in a product, hence implying a duality pairing between a covector and avector.

p-forms. We have introduced 1-forms which associate a real number to anyvector of the tangent plane TxM at some given point. We shall use an index x todenote the dependence on a point on the manifold. We can now define the tensorproduct of two 1-forms as

αx ⊗ βx(v,w) = αx(v)βx(w)

and the exterior product of two one forms as

αx ∧ βx(v,w) = αx ⊗ βx(v,w)− βx ⊗ αx(v,w) = αx(v)βx(w)− αx(w)βx(v).

From this definition, it follows that the exterior product of two 1-forms is anti-symmetric

αx ∧ βx(v,w) = −βx ∧ αx(v,w).

The exterior product of two 1-forms should be a 2-form. So this leads to thedefinition of a 2-form as an antisymmetric element of T ∗xM × T ∗xM and moregenerally the p-forms are defined as follows:

Definition 5 A p-form αp is a p-linear form on TxM× · · · × TxM (p times),which is alternating, i.e.

αpx : TxM× · · · × TxM→ R(v1, . . . ,vp) 7→ αpx(v1, . . . ,vp)

such thatαpx(. . . ,vi, . . . ,vj, . . . ) = −αpx(. . . ,vj, . . . ,vi, . . . ).

When two vectors are exchanged, all the others staying the same, the sign of thep-form changes. This is a generalization of anti-symmetry to p variables. Thisimplies in particular, that when a vector appears twice in the arguments the p-form vanishes. We denote a p-form by αp with an upper right index when we wishto explicit the degree p of the form. When it is useful to recall its dependency onx we write αpx.

46

Page 48: Advanced Finite Element Methods · 2017. 1. 30. · In the Finite Element method, which is mathematically more involved, the ... An example of an unstructured Finite Element mesh

Due to the alternating property, in a manifold of dimension n all p-forms forp > n vanish. This can be seen by decomposing all the vectors on a basis, whichcontains exactly n-elements.

We will denote the space of p-forms on the manifold M by Λp(M) for p =0, . . . , n. The 0-forms are the scalar functions on M. The n-forms in a manifoldof dimension n are also well known from linear algebra. Indeed at a point x of themanifold a n-form is a n-covector defined as an alternating n-linear form, which isthe definition of the determinant of n vectors.

Definition 6 The exterior product of a k-form and a l-form is a mapping

∧ : Λk(M)× Λl(M)→ Λk+l(M) k + l ≤ n

satisfying the following properties

antisymmetry: αk ∧ βl = (−1)klβl ∧ αk (2.1)

associativity: (αk ∧ βl) ∧ γm = αk ∧ (βl ∧ γm) (2.2)

distributivity: (αk + βk) ∧ γm = αk ∧ γm + βk ∧ γm (2.3)

where αk ∈ Λk(M), βl ∈ Λl(M), γm ∈ Λm(M).

Note that the wedge product with a 0-form is just a multiplication with a scalarfunction.

Given a basis ( dq1, . . . , dqn) of the space of 1-forms Λ1(M), a basis of Λp(M)is given by all possible combinations of p distinct dqi by wedge product. The orderis fixed arbitrarily, for example by imposing that the indices are in increasing order:

αp(x) =∑

i1<···<ip

αi1,...,ip(x) dqi1 ∧ · · · ∧ dqip .

The dimension of Λp(M) is thus

(np

)= n!/(p!(n− p)!)

Example: In R3, the zero forms are the scalar functions. The 1-forms, 2-forms,3-forms can be expressed in the local basis by

α0(x) = α(x), (2.4)

α1(x) = α1(x) dq1 + α2(x) dq2 + α3(x) dq3, (2.5)

α2(x) = α23(x) dq2 ∧ dq3 + α31(x) dq3 ∧ dq1 + α12(x) dq1 ∧ dq2, (2.6)

α3(x) = α123(x) dq1 ∧ dq2 ∧ dq3. (2.7)

We note that the 1-forms and 2-forms have 3 scalar components and the 0-formsand 3-forms have 1 scalar component. In order to evaluate the p-form on vectors,one can use the formulas for determinants

dqi(v) = vi

47

Page 49: Advanced Finite Element Methods · 2017. 1. 30. · In the Finite Element method, which is mathematically more involved, the ... An example of an unstructured Finite Element mesh

dqi ∧ dqj(v,w) =

∣∣∣∣ dqi(v) dqi(w)dqj(v) dqj(w)

∣∣∣∣ = viwj − vjwi,

dq1 ∧ dq2 ∧ dq3(u,v,w) =

∣∣∣∣∣∣dq1(u) dq1(v) dq1(w)dq2(u) dq2(v) dq2(w)dq3(u) dq3(v) dq3(w)

∣∣∣∣∣∣ =

∣∣∣∣∣∣u1 v1 w1

u2 v2 w2

u3 v3 w3

∣∣∣∣∣∣ .Remark 9 Following the intuitive definition of the Riemann integral, paving thespace into small segments, we observe that 1-forms, which are applied to one singlevector, will be naturally integrated along curves, 2-forms, which take 2 vectors, willbe naturally integrated on surfaces and 3-forms taking 3 vectors will be naturallyintegrated on volumes. 0-forms for their part cannot be integrated, one only takestheir point values.

This idea comes back when discretising on a mesh. 0-form degrees of freedomare associated to points of the mesh (e.g. vertices), 1-forms to edges, 2-forms tofaces and 3-forms to cells or volumes.

Riemanian metric The structures that we have build on our manifold up tonow do not allow us to define length of vectors. For this we need a new structurecall Riemannian metric defined as follows:

Definition 7 A Riemannian metric g on a smooth manifoldM is a scalar product(a bilinear symmetric positive definite form) on the tangent spaces TxM that variessmoothly with x, i.e.

gx : TxM× TxM→ Rsuch that gx is bilinear and

(i) gx(v,w) = gx(w,v), ∀v,w ∈ TxM,

(ii) gx(v,v) ≥ 0 ∀v ∈ TxM,

(iii) gx(v,v) = 0⇔ v = 0,

(iv) For any smooth vector fields vx,wx, the mapping x 7→ gx(vx,wx) is smooth.

In our applications, the tangent planes are Rn, which is equipped with the eu-clidian scalar product ·. We can express it in the natural basis of TxM, ∂1, . . . ,∂n:

gx(v,w) = v · w =n∑

i,j=1

viwj∂i · ∂j.

Denoting by gij = ∂i · ∂j, the scalar product is expressed in the tangent basis∂1, . . . ,∂n by

gx(v,w) =n∑

i,j=1

viwjgij = viwjgij

using the Einstein summation convention. Obviously this reduces to the classicalformula

∑(vi)2 when the canonical basis of Rn is used (corresponding to an identity

mapping) as gij = δij in this case.

48

Page 50: Advanced Finite Element Methods · 2017. 1. 30. · In the Finite Element method, which is mathematically more involved, the ... An example of an unstructured Finite Element mesh

The metric enables us to associate a covector to a vector in a unique way.Indeed, given a vector v ∈ TxM, w 7→ gx(v,w) defines a linear form on TxM,i.e. an element p ∈ T ∗xM such that p(w) = gx(v,w). This can be written in localcoordinates

p>w = v>Gw or equivalently pjwj = vigijw

j

using Einstein’s summation convention, that we will use systematically in thesequel, where G is the n × n matrix with entries gij. As this is verified for anyw ∈ TxM, it follows that pi = gijv

j (⇔ p> = v>G). In particular in cartesiancoordinates, where G is the identity matrix, a covector has the same components asthe vector it is associated to. Note that due to the definition of gij with the tangentvectors, G can be expressed using the Jacobian of the mapping G = (DF)>DF andthe inverse of G whose coefficients are denoted by gij verifies G−1 = (DF)−1DF−>,so that gij = di · dj.

Exterior derivative

Definition 8 The exterior derivative, denoted by d is the unique operator fromΛp(M)→ Λp+1(M) satisfying:

(i) d is additive: d(α + β) = dα + dβ,

(ii) dα0 is the usual differential of functions,

(iii) d(αp ∧ βq) = dαp ∧ βq + (−1)pαp ∧ dβq, (Leibnitz rule),

(iv) d2α = d( dα) = 0.

See Frankel [11] p. 53 for a proof of the uniqueness.Let us compute exterior derivatives in R3. For this we shall in particular need

d dqi = 0 and (iii) for a scalar function, which is a 0-form (p = 0):

d(α0 ∧ βq) = dα0 ∧ βq + α0 dβq.

For a 0-form α0x = α(q) for some smooth scalar function α, we get

dα0x =

∂α

∂q1(q) dq1 +

∂α

∂q2(q) dq2 +

∂α

∂q3(q) dq3.

For a 1-form α1x = α1(q) dq1 + α2(q) dq2 + α3(x) dq3, we have

dα(1)x = dα1(q) ∧ dq1 + dα2(q) ∧ dq2 + dα3(x) ∧ dq3

=3∑i=1

(∂αi∂q1

(q) dq1 +∂αi∂q2

(q) dq2 +∂αi∂q3

(q) dq3

)∧ dqi

=

(∂α2

∂q1− ∂α1

∂q2

)dq1 ∧ dq2 +

(∂α1

∂q3− ∂α3

∂q1

)dq3 ∧ dq1

+

(∂α3

∂q2− ∂α2

∂q3

)dq2 ∧ dq3

49

Page 51: Advanced Finite Element Methods · 2017. 1. 30. · In the Finite Element method, which is mathematically more involved, the ... An example of an unstructured Finite Element mesh

Note that the components of the exterior derivative of the 1-form are the compo-nents of the curl in cartesian coordinates.

For a 2-form α(2)(x) = α23(q) dq2 ∧ dq3 + α31(q) dq3 ∧ dq1 + α12(q) dq1 ∧ dq2,we have

dα(2)(x) = dα23 ∧ dq2 ∧ dq3 + dα31 ∧ dq3 ∧ dq1 + dα12 ∧ dq1 ∧ dq2

=

(∂α23

∂q1+∂α31

∂q2+∂α12

∂q3

)dq1 ∧ dq2 ∧ dq3.

Here we recognize the formula for the divergence in cartesian coordinates. Andfinally for a 3-form α(3)(x) = α123(q) dq1 ∧ dq2 ∧ dq3, we get dα(3) = 0.

Interior product

Definition 9 The interior product of a p-form αp and a vector v is the (p− 1)-form denoted by ivα

p such that

ivαp(v1, . . . ,vp−1) = αp(v,v1, . . . ,vp−1). (2.8)

For a 0-form ivα0 = 0.

Proposition 6 The interior product iv : Λp(M)→ Λp−1(M) is an anti-derivation,i.e. it verifies the Leibnitz rule

iv(αp ∧ βq) = (ivαp) ∧ βq + (−1)pαp ∧ βq. (2.9)

Note that this is the same property as property (iii) of the exterior derivativewhich is also an anti-derivation. The difference between an anti-derivation anda standard derivation (property of derivatives) is the (−1)p factor in front of thesecond term.

Orientation and twisted forms In an n-dimensional vector space two basesare related by a transformation matrix P such that, detP 6= 0. From that onecan define two classes of bases, those that have the same orientation are relatedby a transformation matrix with a positive sign and those that have a differentorientation by a transformation matrix with a negative sign. The orientation of avector space is chosen by arbitrarily choosing a basis, which defines the positiveorientation. This is classically done in R3 with the right-hand rule.

Definition 10 We say that a n-dimensional manifold Mn is orientable, if it canbe covered with coordinate patches having all the same orientation.

A classical example of non orientable manifold is the moebius band.We shall denote by o(∂1, . . . ,∂n) the orientation of a basis defined by a local

coordinate system, o(∂1, . . . ,∂n) can take the values +1 or −1.The orientation is used to define twisted forms sometimes also called pseudo-

forms, which are defined not to depend on the orientation of the local coordinate

50

Page 52: Advanced Finite Element Methods · 2017. 1. 30. · In the Finite Element method, which is mathematically more involved, the ... An example of an unstructured Finite Element mesh

system. To achieve this, the orientation is part of the definition of the twisted-form: In a positively oriented local coordinate system αp = αp and in a negativelyoriented local coordinate system αp = −αp.

An important twisted form is the volume form, which is a twisted n-formrepresented in a local coordinate system (q1, . . . , qn) on a riemannian manifold ofdimension n by

voln = o(∂1, . . .∂n)√g dq1 ∧ · · · ∧ dqn,

where√g = det(DF) is the Jacobian of the mapping defining the local coordinate

system. Indeed as G = (DF)>DF, g := detG = (det(DF))2.

Remark 10 As the metric can be used to associate a 1-form to a vector, thevolume form along with the interior product defines a (n-1)-form associated to avector: Given a vector v ivvoln defines a (n-1)-form.

In particular in a three dimensional manifold for a vector u

iuvol3(v,w) = vol3(u,v,w) =√g

∣∣∣∣∣∣u1 v1 w1

u2 v2 w2

u3 v3 w3

∣∣∣∣∣∣Hodge ? operator and inner product of p-forms Given a metric g on ann-dimensional manifold M and a p-form

αp =∑

k1<···<kp

αk1...kp dqk1 ∧ · · · ∧ dqkp

we define the Hodge ? of αp at x and denote by ?αpx the pseudo (n− p)-form

?αpx = αn−px =∑

j1<···<jn−p

α∗j1...jn−pdqj1 ∧ · · · ∧ dqjn−p ,

with α∗j1...jn−p=√|g|αk1...kpεk1...kpj1...jn−p and where εi1...in assumes each index ap-

pear only once and εi1...in = 1 for an even permutation of (1, . . . , n) and εi1...in = −1for an odd permutation. Moreover αk1...kp =

∑i1,...,ip

gk1i1 . . . gkpipαi1...ip . As an ex-ample, let us compute the Hodge ? of general 1-forms and 2-forms in cartesiancoordinates:

?(α1 dq1 + α2 dq2 + α3 dq3) = α1 dq2 ∧ dq3 + α2 dq3 ∧ dq1 + α3 dq1 ∧ dq2.

An important example is the Hodge of the constant 0-form 1, which is the twistedvolume form voln:

?1 =√|g|ε12...n dq1 ∧ · · · ∧ dqn = voln.

Note also that the Hodge ? of a twisted p-form defines a (n-p)-form.Let us also recall that applying twice the Hogde operator to a p-form in a

manifold of dimension n yields

? ? αp = (−1)p(n−p)αp. (2.10)

51

Page 53: Advanced Finite Element Methods · 2017. 1. 30. · In the Finite Element method, which is mathematically more involved, the ... An example of an unstructured Finite Element mesh

We observe that for n odd, in particular for n = 3, we always have ? ? αp = αp.From this definition of the Hodge ? it follows that for two p-forms αp and βp

αp ∧ ?βp =∑

k1<···<kp

αk1...kpβk1...kpvoln = 〈αp, βp〉voln

where we define the scalar product of two p-forms at x on TxM by

〈αpx, βpx〉 =∑

k1<···<kp

αk1...kpβk1...kp .

Integrating over the manifold we can then define the following scalar product onΛp(M)

(αp, βp) =

∫〈αpx, βpx〉voln =

∫αp ∧ ?βp. (2.11)

Given this scalar product and its associated norm we define the Hilbert spaces

L2Λp(M) = αp ∈ Λp(M) | (αp, αp) < +∞,

HΛp(M) = ωp ∈ L2Λp(M), dωp ∈ L2Λp+1(Ω).These Hilbert spaces of differential forms form the so-called de Rham complex,

which is at the heart of the FEEC theory

0→ HΛ0(M)d→ HΛ1(M)

d→ · · · d→ HΛn(M)→ 0. (2.12)

In a three dimensional manifold the de Rham complex can also be express inthe classical vector analysis language:

0→ H1(Ω)grad→ H(curl,Ω)

curl→ H(div,Ω)div→ L2(Ω)→ 0.

Pullback of differential forms Consider a smooth math ϕ :M→M′, whereM and M′ are two manifolds, not necessarily of the same dimension.

Through this map a vector in the tangent plane v ∈ TxM induces a vectorϕ∗v = (Dϕ)v ∈ Tϕ(x)M′ in the tangent plane at ϕ(x) of M′ called the push-forward of v. From this one can for a p-form ωx′ at a point x′ ∈ M′ a p-form atthe pre-image of x′ on M denote by ϕ∗ω and called pull-back of the p-form ω. Itis defined by

(ϕ∗ω)x(v1, . . . ,vp) = ωϕ(x)((Dϕ)xv1, . . . , (Dϕ)xvp). (2.13)

Very important and convenient properties of the pullback are that they respectexterior products and differentiation

ϕ∗(α ∧ β) = (ϕ∗α) ∧ (ϕ∗β), d(ϕ∗α) = ϕ∗( dα). (2.14)

An important special case is when M′ is a submanifold of M and ϕ theinclusion, then the pullback is the trace map. With this definition we ca writethe Stokes theorem ∫

Mdω =

∫∂M

trω.

52

Page 54: Advanced Finite Element Methods · 2017. 1. 30. · In the Finite Element method, which is mathematically more involved, the ... An example of an unstructured Finite Element mesh

Green formula and codifferential operator Using the Leibnitz rule, (iii) ofdefinition 8, and the Stokes theorem, we can derive a Green type integration byparts formula for differential forms∫

Mdαp−1 ∧ βn−p = (−1)p

∫Mαp−1 ∧ dβn−p +

∫∂M

trαp−1 ∧ tr βn−p,

∀αp−1 ∈ Λp−1(M), βn−p ∈ Λn−p(M). (2.15)

Let us now introduce the coderivative operator d∗ : Λp(M) → Λp−1(M) de-fined by

?d∗αp = (−1)p d?αp. (2.16)

We can then express the Green formula (2.15) using the scalar product on differ-ential forms (2.11). Indeed setting βn−p =?γp, (2.15) becomes∫

Mdαp−1 ∧?γp = (−1)p

∫Mαp−1 ∧ d?γp +

∫∂M

trαp−1 ∧ tr ?γp,

and so using the definition of the codifferential and of the scalar product (2.11)this can be written equivalently

( dαp−1, γp) = (αp−1, d∗γp) +

∫∂M

trαp−1 ∧ tr ?γp. (2.17)

Hence, the codifferential is the formal adjoint of the exterior derivative. It is theadjoint if the boundary terms vanish. This explains the notation.

2.2 Maxwell’s equations with differential forms

There is a natural interpretation of physics objects with differential forms. Inmany cases it is more natural than with vectors. For example a force is naturallydefined through the work it performs along a curve, which leads to its being a1-form. The magnetic intensity is measured as a flux through a loop and thus isnaturally a 2-form.

In classical vector analysis, Maxwell’s equations read

−∂D

∂t+∇× H = J, (2.18)

∂B

∂t+∇× E = 0, (2.19)

∇ · D = ρ, (2.20)

∇ · B = 0. (2.21)

These relations are supplemented by the material constitutive relations D = εE,B = µH, where ε is the permittivity tensor (in vacuum it is the constant ε0), and µis the permeability tensor of the material (in vacuum it is the constant µ0). H andE are respectively the magnetic field and the electric field, whereas B is the called

53

Page 55: Advanced Finite Element Methods · 2017. 1. 30. · In the Finite Element method, which is mathematically more involved, the ... An example of an unstructured Finite Element mesh

magnetic flux intensity or magnetic induction and D is the electric displacementfield.

Given that the curl corresponds to the exterior derivative applied to a 1-formand the divergence to the exterior derivative applied to a 2-form, we find a naturalway of writing Maxwell’s equations in terms of differential forms

−∂d2

∂t+ dh1 = j2 (2.22)

∂b2

∂t+ de1 = 0, (2.23)

dd2 = ρ3, (2.24)

db2 = 0. (2.25)

The constitutive relations associate 2-forms to 1-forms and thus need to be de-scribed by a Hodge ? operator in the differential forms description:

d2 = ?e1, h1 = ?b2. (2.26)

As the Hodge operator associates twisted forms to straight forms and conversely,it follows from this that either the forms in Ampere’s equations (2.22) are twistedforms and the forms in Faraday’s equation (2.23) are straight forms other theother way. Mathematically both options are possible, but physically the sourcesρ3 and j2 are charge and current densities which should be twisted see e.g. [6, 10].Therefore, we will consider that h1, d2, j2 and ρ3 are twisted forms and e1 and b2

are straight forms. The electrostatic scalar potential φ and the vector potential Aalso play an important role in electromagnetism, they can be describe respectivelyby the 0-form φ0 and the 1-form a1 and are then related to the electric field andmagnetic induction by

e1 = − dφ0 − ∂a1

∂t, b2 = da1. (2.27)

Note that taking the exterior derivative of the first equation yields Faraday’s law(2.23):

de1 = − ddφ0 − ∂ da1

∂t= −∂b2

∂t,

and taking the exterior derivative of the first equation yields (2.25)

db2 = dda1 = 0.

Another important physical object related to Maxwell’s equations is the Lorentzforce involving E + v × B. The velocity vector being a vector, this quantity isnaturally expressed in the language of differential forms as e1 + ivb2.

Remark 11 It is important to note here that the exterior derivative and the timederivative here are independent of the metric and thus Maxwell’s equations (2.22)-(2.25) as well as the equation defining the potentials (2.27) have the same formin any coordinate system. The metric only appears in the Hodge operator (2.26),which relates the 1-form and 2-form expressions of the electric and magnetic fields.

54

Page 56: Advanced Finite Element Methods · 2017. 1. 30. · In the Finite Element method, which is mathematically more involved, the ... An example of an unstructured Finite Element mesh

A geometric discretisation should aim at preserving these properties. Thereare at least two classical strategies to discretise the geometric form of Maxwell’sequations. The first one is based on Finite Difference in the framework of theso-called Discrete Exterior Calculus (DEC) [8]. In this framework dual grids areconstructed, the straight forms being discretised on the primal grid and the twistedforms on the dual grid. The discrete Hodge operators defines a projection fromone grid to the other. The second one is called Finite Element Exterior Calculus(FEEC) [4, 1]. It is constructed on compatible Finite Elements spaces for eachdegree of forms and a unique grid. The straight forms are approximated in astrong sense, yielding relations between the coefficients in the basis expressions ofthe discrete differential forms. The twisted forms are approximated in the sameFinite Element spaces but in weak form. This can be naturally expressed usingthe codiferential. Indeed using (2.26), Ampere’s equations can also be written

−∂?e1

∂t+ d?b2 = j2

and using that ?? = Id in three dimensions

−∂e1

∂t+ d∗b2 = ?j2.

In the same way we can express (2.24) using e1: d?e1 = ρ3 and using the expressionof the codifferential for a 1-form

− d∗e1 = ?ρ3.

The expression of Maxwell’s equations with differential forms suitable for FiniteElement discretisation thus reads

−∂e1

∂t+ d∗b2 = ?j2 (2.28)

∂b2

∂t+ de1 = 0, (2.29)

− d∗e1 = ?ρ3, (2.30)

db2 = 0. (2.31)

The two equations involving the codifferential can be expressed in weak formto replace the codifferential by the exterior derivative. Indeed taking the scalarproduct of (2.28) with a test 1-form f1 and using that d∗ is the adjoint of dprovided the boundary terms vanish (else they need to be added as required by(2.17))

− d

dt(e1, f1) + (b2, df1) = (?j2, f1) ∀f1 ∈ HΛ1(M). (2.32)

We recognize here the weak form of Ampere’s equation and in the same way takingthe inner product of (2.30) with a test 0-form yields the weak form of Gauss’s law:

−(e1, dψ0) = (?ρ3, ψ0) ∀ψ0 ∈ HΛ0(M). (2.33)

55

Page 57: Advanced Finite Element Methods · 2017. 1. 30. · In the Finite Element method, which is mathematically more involved, the ... An example of an unstructured Finite Element mesh

2.3 Discrete differential forms based on B-splines

Some of the standard Finite Element spaces seen in the first part of the lecturecan be put to together to define a complex of discrete differential forms. This isan essential piece needed in the FEEC theory to ensure stability and convergenceof the Finite Element approximation. These complexes are described in [4, 1]. Aclassical complex based on polynomials of degree k for a mesh of tetrahedra is

0→ Pk(Ω)grad→ Nk(Ω)

curl→ RTk(Ω)div→ DGk−1(Ω)→ 0.

Let us now construct a different kind of Finite Element discretization usingbasis functions for the different spaces based on B-Splines.

In order to define a family of n B-splines of degree k, we need (xi)06i6n+k a non-decreasing sequence of points on the real line called knots in the spline terminology.There can be several knots at the same position. In the case when there are mknots at the same point, we say that the knot has multiplicity m.

Definition 11 (B-Spline) Let (xi)06i6n+k be a non-decreasing sequence of knots.Then the j-th B-Spline (0 ≤ j ≤ n− 1) denoted by Nk

j of degree k is defined by therecurrence relation:

Nkj (x) = wkj (x)Nk−1

j (x) + (1− wkj+1(x))Nk−1j+1 (x)

where,

wkj (x) =x− xj

xj+k − xj, N0

j (x) = χ[xj ,xj+1[(x).

We note some important properties of a B-splines basis:

• B-splines are piecewise polynomial of degree k,

• B-splines are non negative,

• Compact support; the support of Nkj is contained in [tj, .., tj+k+1],

• Partition of unity:∑n−1

i=0 Nki (x) = 1,∀x ∈ R,

• Local linear independence,

• If a knot xi has a multiplicity m then the B-spline is C(k−m) at xi.

A key point for constructing a complex of Finite Element spaces for p-formscomes from the recursion formula for the derivatives:

Nki

′(x) = k

(Nk−1i (x)

xi+k − xi−

Nk−1i+1 (x)

xi+k+1 − xi+1

). (2.34)

It will be convenient to introduce the notation Dki (x) = k

Nk−1i (x)

xi+k−xi. Then the

recursion formula for derivatives simply becomes

Nki

′(x) = Dk

i (x)−Dki+1(x). (2.35)

56

Page 58: Advanced Finite Element Methods · 2017. 1. 30. · In the Finite Element method, which is mathematically more involved, the ... An example of an unstructured Finite Element mesh

Figure 2.3: All B-splines functions associated to a knot sequence defined by n = 9,k = 2, T = 000, 1

414, 1

212, 3

434, 111

Remark 12 In the case where all knots, except the boundary knots are of multi-plicity 1, the set (Nk

i )0≤i≤n−1 of B-splines of degree k forms a basis of the splinespace (dimSk = n) defined by

Sk = v ∈ Ck−1([x0, xn]) |v|[xi,xi+1] ∈ Pk([xi, xi+1]).

The boundary knots are chosen to have multiplicity k + 1 so that the spline be-comes interpolatory on the boundary in order to simplify the application of Dirich-let boundary conditions. This setting is called open boundary conditions for thespline.

Then due to the definitions if follows immediately that (Dki )1≤i≤n−1 is a basis

of Sk−1. Note that if the first knot has multiplicity k + 1, Dk0 will have a support

restricted to one point and be identically 0.

Remark 13 Splines can be easily defined in the case of periodic boundary condi-tions by taking a periodic knot sequence. The dimension of the spline space is thenthe number of distinct knots.

Let us construct spaces of differential forms whose coefficients are splines. Inorder to obtain a complex, we shall start with the space of 0-forms and thenconstruct the space of p-forms by applying the exterior derivative to the (p − 1)-forms. This property is needed to form a complex. Let us start with a finitedimensional space of 0-forms denoted by V0.

We define the 3D point x = (x1, x2, x3) and the multi-index i = (i1, i2, i3). Thethe basis functions for 0-forms will be

ϕ0i (x) = Nk

i1(x1)Nk

i2(x2)Nk

i3(x3), 1 ≤ i1 ≤ n1, 1 ≤ i2 ≤ n2, 1 ≤ i3 ≤ n3. (2.36)

And our finite dimensional space of 0-forms base on B-splines of degree k in eachdirection is then V0 = Spanϕ0

i i. And any discrete 0-form can be written as

ψ0h(x) =

∑i

c0iϕ

0i (x).

57

Page 59: Advanced Finite Element Methods · 2017. 1. 30. · In the Finite Element method, which is mathematically more involved, the ... An example of an unstructured Finite Element mesh

Now taking the exterior derivative of φ0h we find

dψ0h(x) =

∑i

c0i dϕ0

i (x) =∑i

c0i ((N

ki1

)′(x1)Nki2

(x2)Nki3

(x3) dx1

+Ni1(x1)(Nki2

)′(x2)Nki3

(x3) dx2 +Nki1

(x1)Nki2

(x2)(Nki3

)′(x3) dx3),

=∑i

c0i ((D

ki1−Dk

i1+1)(x1)Nki2

(x2)Nki3

(x3) dx1

+Ni1(x1)(Dki2−Dk

i2+1)(x2)Nki3

(x3) dx2 +Nki1

(x1)Nki2

(x2)(Dki3−Dk

i3+1)(x3) dx3),

=∑i

(c0i1,i2,i3

− c0i1−1,i2,i3

)Dki1

(x1)Nki2

(x2)Nki3

(x3) dx1

+ (c0i1,i2,i3

− c0i1,i2−1,i3

)Nki1

(x1)Dki2

(x2)Nki3

(x3) dx2

+ (c0i1,i2,i3

− c0i1,i2,i3−1)Nk

i1(x1)Nk

i2(x2)Dk

i3(x3) dx3,

where we used expression (2.35) for the derivative of a B-spline.In order to form a complex the finite dimensional space of 1-forms V1 should

contain all exterior derivatives of 0-forms. This will be the case if we choose asbasis functions for the 1-forms

ϕ1i,1(x) = Dk

i1(x1)Nk

i2(x2)Nk

i3(x3) dx1 = ϕ1

i,1(x) dx1,

ϕ1i,2(x) = Nk

i1(x1)Dk

i2(x2)Nk

i3(x3) dx2 = ϕ1

i,2(x) dx2,

ϕ1i,3(x) = Nk

i1(x1)Nk

i2(x2)Dk

i3(x3) dx3 = ϕ1

i,3(x) dx3.

A general finite dimensional 1-form is then represented by

f1(x) =n∑

i=1

3∑a=1

c1i,aϕ

1i,a(x) =

n∑i=1

3∑a=1

c1i,aϕ

1i,a(x) dxa.

In particular, if f1 = dφ0, there coefficients in their respective bases are related by

c1i,1 = c0

i1,i2,i3− c0

i1−1,i2,i3, c1

i,2 = c0i1,i2,i3

− c0i1,i2−1,i3

, c1i,3 = c0

i1,i2,i3− c0

i1,i2,i3−1,

independently of the metric. It depends only on the neighboring splines.In the same way, to construct a basis for V2 we take the exterior derivative of

an element of V1. This yields

df1(x) =n∑

i=1

3∑a=1

c1i,a dϕ1

i,a(x) (2.37)

=n∑

i=1

((c1i1,i2,i3,3

− c1i1,i2−1,i3,3

)− (c1i1,i2,i3,2

− c1i1,i2,i3−1,2)

)Nki1

(x1)Dki2

(x2)Dki3

(x3) dx2 ∧ dx3 (2.38)

+((c1i1,i2,i3,1

− c1i1,i2,i3−1,1)− (c1

i1,i2,i3,3− c1

i1−1,i2,i3,3))

Dki1

(x1)Nki2

(x2)Dki3

(x3) dx3 ∧ dx1 (2.39)

+((c1i1,i2,i3,2

− c1i1−1,i2,i3,2

)− (c1i1,i2,i3,1

− c1i1,i2−1,i3,1

))

Dki1

(x1)Dki2

(x2)Nki3

(x3) dx1 ∧ dx2 (2.40)

58

Page 60: Advanced Finite Element Methods · 2017. 1. 30. · In the Finite Element method, which is mathematically more involved, the ... An example of an unstructured Finite Element mesh

In order to form a complex the space of finite dimensional 2-forms shouldcontain all exterior derivatives of 1-forms. This will be the case if we choose asbasis functions for the 2-forms

ϕ2i,1(x) = Nk

i1(x1)Dk

i2(x2)Dk

i3(x3) dx2 ∧ dx3 = ϕ2

i,1(x) dx2 ∧ dx3,

ϕ2i,2(x) = Dk

i1(x1)Nk

i2(x2)Dk

i3(x3) dx3 ∧ dx1 = ϕ2

i,2(x) dx3 ∧ dx1,

ϕ1i,3(x) = Dk

i1(x1)Dk

i2(x2)Nk

i3(x3) dx1 ∧ dx2 = ϕ2

i,3(x) dx1 ∧ dx2.

A general discrete 2-form is then represented by

b2(x) =n∑

i=1

3∑a=1

c2i,aϕ

2i,a(x).

In particular, if b2 = df1, their coefficients in their respective bases are related by

c2i,1 = (c1

i1,i2,i3,3− c1

i1,i2−1,i3,3)− (c1

i1,i2,i3,2− c1

i1,i2,i3−1,2),

c2i,2 = (c1

i1,i2,i3,1− c1

i1,i2,i3−1,1)− (c1i1,i2,i3,3

− c1i1−1,i2,i3,3

),

c2i,3 = (c1

i1,i2,i3,2− c1

i1−1,i2,i3,2)− (c1

i1,i2,i3,1− c1

i1,i2−1,i3,1),

independently of the metric. It depends only on the neighboring splines.We finally come to the last space V3 of discrete 3-forms. These are constructed

such that the exterior derivative of an element of V2 is in V3. Taking the exteriorderivative of a generic element b2 ∈ V2 yields

b2(x) =n∑

i=1

3∑a=1

c2i,a dϕ2

i,a(x)

=((c2i1,i2,i3,1

− c2i1−1,i2,i3,1

) + (c2i1,i2,i3,2

− c2i1,i2−1,i3,2

) + (c2i1,i2,i3,3

− c2i1,i2,i3−1,3)

)Dki1

(x1)Dki2

(x2)Dki3

(x3) dx1 ∧ dx2 ∧ dx3.

So the basis functions for the three forms are of the form

ϕ3i (x) = Dk

i1(x1)Dk

i2(x2)Dk

i3(x3) dx1 ∧ dx2 ∧ dx3,

and a general 3-form writes

ρ3(x) =n∑

i=1

c3iϕ

3i (x). (2.41)

And the coefficients in V3 of the exterior derivative of an element of V2 are givenby

c3i = (c2

i1,i2,i3,1− c2

i1−1,i2,i3,1) + (c2

i1,i2,i3,2− c2

i1,i2−1,i3,2) + (c2

i1,i2,i3,3− c2

i1,i2,i3−1,3).

Here again this is independent of the metric an only involves neighboring splinecoefficients.

59

Page 61: Advanced Finite Element Methods · 2017. 1. 30. · In the Finite Element method, which is mathematically more involved, the ... An example of an unstructured Finite Element mesh

Bibliography

[1] Douglas Arnold, Richard Falk, and Ragnar Winther. Finite element exteriorcalculus: from hodge theory to numerical stability. Bulletin of the Americanmathematical society, 47(2):281–354, 2010.

[2] Douglas N. Arnold. An interior penalty finite element method with discon-tinuous elements. SIAM journal on numerical analysis, 19(4):742–760, 1982.

[3] Douglas N. Arnold, Franco Brezzi, Bernardo Cockburn, and L. DonatellaMarini. Unified analysis of discontinuous galerkin methods for elliptic prob-lems. SIAM journal on numerical analysis, 39(5):1749–1779, 2002.

[4] Douglas N Arnold, Richard S Falk, and Ragnar Winther. Finite elementexterior calculus, homological techniques, and applications. Acta numerica,15:1–155, 2006.

[5] Daniele Boffi, Franco Brezzi, and Michel Fortin. Mixed finite element methodsand applications. Springer, 2013.

[6] Alain Bossavit. Computational electromagnetism: variational formulations,complementarity, edge elements. Academic Press, 1998.

[7] Richard Courant et al. Variational methods for the solution of problems ofequilibrium and vibrations. Bull. Amer. Math. Soc, 49(1):1–23, 1943.

[8] Mathieu Desbrun, Anil N Hirani, Melvin Leok, and Jerrold E Marsden. Dis-crete exterior calculus. arXiv preprint math/0508341, 2005.

[9] Daniele Antonio Di Pietro and Alexandre Ern. Mathematical aspects of dis-continuous Galerkin methods, volume 69 of Mathematiques et Applications.Springer-Verlag, Berlin Heidelberg, 2012.

[10] Harley Flanders. Differential Forms with Applications to the Physical Sciencesby Harley Flanders, volume 11. Elsevier, 1963.

[11] Theodore Frankel. The geometry of physics: an introduction. CambridgeUniversity Press, 2011.

[12] Martin J. Gander and Gerhard Wanner. From Euler, Ritz, and Galerkin tomodern computing. SIAM Review, 54(4):627–666, 2012.

60

Page 62: Advanced Finite Element Methods · 2017. 1. 30. · In the Finite Element method, which is mathematically more involved, the ... An example of an unstructured Finite Element mesh

[13] Artur Palha, Pedro Pinto Rebelo, Rene Hiemstra, Jasper Kreeft, and MarcGerritsma. Physics-compatible discretization techniques on single and dualgrids, with application to the poisson equation of volume forms. Journal ofComputational Physics, 257:1394–1422, 2014.

[14] Gilbert Strang and George J. Fix. An Analysis of the Finite Element Method.Prentice Hall, New York, 1973. Now published by Wellesley-Cambridge Press.

[15] Vidar Thomee. From finite differences to finite elements: A short history ofnumerical analysis of partial differential equations. Journal of Computationaland Applied Mathematics, 128(1):1–54, 2001.

61