About the course
Goal: reliable hands-on computing with PDEs
When you encounter a partial differential equation, you will after this course have a clear idea of
- how to view the problem as an assemply of smaller/simplified pieces
- how to formulate a finite difference or finite element method for the problem
- how to implement the numerical method in a program
- how to verify that the numerical computations are correct
- how to estimate the reliability of numerical simulations, and in particular discover non-physical numerical artifacts
- how different sources of errors play together
Teaching method: simplify, understand, generalize
To take advantage of the true power of mathematics in physics, biology, and other applied sciences, one needs to simplify, understand, and generalize. These three concepts also form the teaching basis in this course.
A series of physical model problems are addressed and used in examples:
- exponential decay
- vibrating systems
- diffusion
- wave motion
- viscous flow
- coupled flow, deformation, transport, and/or heat transfer
For each model problem, we start out with the simplest version of the model and go through key building blocks for turning the computer into a virtual laboratory where we can play around with the model. The building blocks covered in the course are
- discretization of the model (finite difference, element, volume; staggered grids, mixed spaces; discontinuous Galerkin methods)
- methods for nonlinear differential equations
- implementation of the discrete model (from scratch in 1D, using tools like FEniCS for 2D/3D)
- programming tools: Python, Cython, Python-F77/C++ (via f2py, Cython, or Instant), FEniCS, nose/pytest, SymPy
- verification of the implementation
- analysis of the discrete model: exact (Fourier) solutions, trunction error
- understanding what can go wrong (numerical artifacts)
- extensions, generalizations, real applications
- scaling, real data with units
- parallel computing
- report writing (LaTeX, HTML/MathJax, Sphinx), reproducibility, Git version control, GitHub project hosting service
Much focus is on all the nuts and bolts of building reliable simulation models. This means a particular focus on implementation and testing, and less focus on mathematical subjects that do not have a direct application of great practical value.
When teaching new methods, we always start out with simple ODEs to explain the very basics of the technicalities. Then we extend the methodology progressively using more advanecd models that build on what we have learned through the simpler ones. In this way, new mathematical or programming techniques are introduced in problems of the simplest possible type (but no simpler!), yet of a relevance that carries directly over to advanced PDE problems.
Through the simplify, understand, and generalize paradigm, one will view a complex scientific application as an assembly of pieces that can be understood separately and then brought together (perhaps with considerable efforts!) to solve the problem in a reliable way. Our focus throughout the course is two-fold: 1) how to do it, and 2) how to assess the quality.
Compulsory exercises and projects
Compulsory exercises and projects
- Smaller exercises. Announced on the overview of lectures page and under messages on the main page. Note: Students must meet in the announced lecture, groups of three are automatically formed, each group discusses and provides feedback on three exercises from three other students.
- A 2D wave equation solver with finite differences, programmed from scratch. The project will be published around Sep 20, with deadline and assessment in groups on Oct 13.
- A nonlinear finite element application of choice, programmed in the FEniCS system. A default project is available soon. Deadline and assessment in groups on Dec 2.
These exercises and projects are delivered in a github.com repo and assessed in groups of three in the lectures (under guidance). Each student must perform the two projects in item 2 and 3, and participate in 3 (out of 5-6) assessment events with smaller exercises (item 1).
Files for the course
All example codes are available from https://github.com/hplgit/num-methods-for-PDEs/tree/master/src. All written course material (textbook chapters and lectures) are available at http://hplgit.github.io/num-methods-for-PDEs/doc/pub/index.html.
You may access these resources directly on the web, or you may have a local copy on your computer:
Terminal> git clone https://github.com/hplgit/num-methods-for-PDEs.git INF5620-resources
This gives you a directory INF5620-resources with all the published course material. The written material is in doc/pub and the computer codes in src. As the material undergoes updates throughout the course, you must frequently get these updates by going to the INF5620-resources project and doing:
Terminal> git pull origin master
Advarsel
The GitHub project num-methods-for-PDEs is automatically generated from source files in another project. Therefore, if you see some typo or error, do not fork the project, correct the file and send me a pull request, which would be the normal procedure to contribute to file development with Git. Report the error instead in email to hpl@ifi.uio.no since the error must be corrected in the source files that generate the published files in the num-methods-for-PDEs project.
Exam
There will be an oral exam. Two weeks prior to the exam six topics (exercises) are announced. For each topic you must prepare a 20 min talk (without any aids). In the exam room, you throw a die and the number of eyes determines which topic you are to present. You will get some questions after the presentation, about the selected topic or from the five other topics. You will not get questions beyond the given six topics.
See previous exams for examples on topics for the final exam.