Lecture “Numerical Methods for PDEs – Galerkin Methods”
In this course I will give an introduction to the finite element Method (FEM). The FEM is – in contrast to, e.g., finite difference methods – based on the variational form a PDE and approximates the solution (which lives in an infinite dimensional space) in finite dimensional subspaces of the infinite-dimensional solution space (this makes it a Galerkin method). The approximation space is spanned by a suitable basis constructed on a decomposition of the domain into simple building blocks (finite elements) such as triangles. This makes the method accessible by methods from functional analysis and approximation theory.
FEM theory is rich of both theory and (real world) applications and I will have to make a compromise between the two here. I thought about the following topics (but may change it during the course):
- Introduction to ideas of FEM using a classical mathematical toy example (Laplace equation)
- Recapturing basic notions for elliptic PDEs (integration by parts, Sobolev spaces, variational form, Lax-Milgram, etc)
- General insights for Galerkin Methods
- Common finite elements
- Some Approximation theorems and error estimates for elliptic problems
- Practical aspects:
- Implementation aspects (How could you do it and how shouldn’t you? Ingredients and tools.)
- Practical implementation of a model problem (either in C++ or Python, we will see)
- Applications (probably focusing on linear elasticity)
If time permits we will either talk about Petrov-Galerkin methods, saddle-point problems or more exotic finite elements (Nedelec, Raviart-Thomas, Brezzi-Douglas-Marini, PEERS, …) for systems of PDEs such as Maxwell, flow or mechanical applications
- Integration and calculus in n dimensions (necessary)
- Basic programming skills and Linux (I recommend Ubuntu since it is easy for beginners, Mac is also possible, or Linux subsystem for windows)
- Basic understanding of PDEs (advantageous)
- Basics in functional analysis (advantageous)
I will give material as reading assignments supported by video lectures that you will find here. These will be uploaded twice a week, mostly Tuesdays and Fridays.
Brenner, S., & Scott, R., 2007. The mathematical theory of finite element methods (Vol. 15). Springer Science & Business Media.
- Braess, D., 2007. Finite elements: Theory, fast solvers, and applications in solid mechanics. Cambridge University Press.
- Ern, A. and Guermond, J.L., 2013. Theory and practice of finite elements (Vol. 159). Springer Science & Business Media.
- Girault, V. and Raviart, P.A., 2012. Finite element methods for Navier-Stokes equations: theory and algorithms (Vol. 5). Springer Science & Business Media.
- Exercises are not part of the overall grade
- You are required to submit at least three sheets with reasonable tries
- You can (but do not need to) submit in groups of maximum 3 people
- One or two examples of PDEs (but for sure the standard models of PDEs that we talked about… so Poisson and general elliptic problems)
- How do we derive the variational form of a PDE? (Maybe with a simple example such as Poisson or so…)
- Why do we work in Sobolev spaces and not in spaces of (classically) differentiable functions? There was an example in Chapter 2…
- Functional analysis: What are Hilbert spaces? Projections, Riesz representation, symmetric and nonsymmetric variational forms, Well-posedness in both cases (application of Riesz vs. Lax-Milgram), Abstract error estimates (Galerkin orthogonality, Cea Lemma)
- weak derivatives; definition of gradient, divergence, curl and Laplace operator; Sobolev spaces
- Gauss theorem; integration by parts formulae (see also exercises); transformation formulae
- What is a finite element?
- Examples of finite elements
- Interpolation in Sobolev spaces
- Error estimates for the model problem in H1 and L^2 for Lagrange FEMs
Software (Linux only)
- either you already have a Linux system and everything is fine or
- you install it – I recommend Ubuntu 20.04 – parallel to windows or as a virtual machine (slow) or
- you have a Windows 10 system and then you can use Ubuntu 20.04 through the Windows Subsystem for Linux (instructions below)
Installation of Windows Subsystem for Linux (Mandatory if you have Windows 10)
The Windows Subsystem for Linux (WSL) is a so-called compatibility layer that allows to run native Linux applications under Windows 10. It can easiliy be installed and used to run even graphical applications as follows
- Open a Windows PowerShell as Admin from the Start-menu: For this, locate the Windows PowerShell in your Start menu (
Windows PowerShell), right click on
Run as administrator
- Install the subsystem by using the command
Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux
- You may need to restart your computer.
- Open the Microsoft Store to install the app: Ubuntu 20.04 LTS
- Start the app Ubuntu 20.04 LTS
- Refresh the software repositories and upgrade with the commands (sudo means “run as administrator”)
sudo apt update
sudo apt upgrade
[...] Do you want to continue? [Y/n] <Enter> [...]
- The WSL is now installed.
- Let us install a number of useful tools:
sudo apt install gcc g++ gfortran xterm gnuplot curl ssh libgtk-3-0 zip unzip rsync git-core doxygen graphviz build-essential gdb cmake ninja-build gdb clang clang-format [...] Do you want to continue? [Y/n] <Enter> [...]
Installing an X-Server on WSL (recommended)
In order to run graphical applications from within the Linux Subsystem a so-called X-server has to be installed. This step is in particular necessary, if you plan to install IDEs such as Eclipse, or if you want any graphical output from Python.
Download and install xming.
Start XMing. A stylish X should appear in the task bar.
Open a Linux terminal and try to run xterm:
- Run these three commands
echo "export DISPLAY=:0" >> .bashrc
The last command added a line to the file .bashrc which resides in your home directory. It is being read everytime you start a bash terminal
- Try if the X-server works with the command
xterm &Another terminal window should open. If so: good. Simply close it again.
- Remember to start XMing from Windows every time you want to use the WSL
Installing Deal.ii under Ubuntu 20.04 (incl. WSL)
To install deal.ii from the repositories (v9.1.1 is only available in Ubuntu 20.04) run
apt install libdeal.ii-dev libdeal.ii-doc [... long list ...] 0 upgraded, 443 newly installed, 0 to remove and 0 not upgraded. Need to get 441 MB of archives. After this operation, 2,016 MB of additional disk space will be used. Do you want to continue? [Y/n] <Enter> [...]
To test the installation with examples from the lecture follow these instructions.
If you want to use an IDE (maybe even from within WSL) such as Eclipse you may need to install a JRE (Java runtime environment):
sudo apt install default-jdk
To install Eclipse check the homepage, download and install in some folder.
Installing Firedrake on Linux (incl. WSL)
- We first need to install Python 3 and some packages:
sudo apt install python3 python3-matplotlib python3-scipy python3-numpy
- These commands will install Firedrake in a virtual environment. This does not mess with your system. Note that the installation might take quite some time (2 hours on my old machine). (Compare also to the installation instructions of Firedrake.):
curl -O https://raw.githubusercontent.com/firedrakeproject/firedrake/master/scripts/firedrake-install
python3 firedrake-install --minimal-petsc
- Before running any code that uses Firedrake you need to activate the virtual environment with
- To test the installation with the demo of the lecture follow these instructions.
Seminar “Finite Element Exterior Calculus”
This seminar is organized jointly with Jörn Behrens.
The seminar will be postponed and is planned to be given in a block format by the end of the semester.