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. The students are expected to learn the required knowledge mostly by themselves. The lectures are meant for high-level guidance.

A series of physical model problems are addressed and used in examples:

  • exponential decay
  • vibrating systems
  • wave motion
  • 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; staggered grids)
  • 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
  • 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.

Files for the course

All example codes are available from https://github.com/hplgit/num-methods-for-PDEs/tree/master/src.

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 IN5270-resources

This gives you a directory IN5270-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 IN5270-resources project and doing:

Terminal> git pull origin master

Warning

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 xingca at 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.

Previous oral exam questions

See previous exams for examples on topics for the final exam.

By Hans Petter Langtangen
Published Aug. 18, 2019 9:18 PM - Last modified Aug. 18, 2019 9:21 PM