print logo
$$ \newcommand{\uex}{u_{\mbox{\footnotesize e}}} \newcommand{\uexd}[1]{u_{\mbox{\footnotesize e}, #1}} \newcommand{\vex}{v_{\mbox{\footnotesize e}}} \newcommand{\vexd}[1]{v_{\mbox{\footnotesize e}, #1}} \newcommand{\Aex}{A_{\mbox{\footnotesize e}}} \newcommand{\half}{\frac{1}{2}} \newcommand{\halfi}{{1/2}} \newcommand{\tp}{\thinspace .} \newcommand{\Ddt}[1]{\frac{D #1}{dt}} \newcommand{\E}[1]{\hbox{E}\lbrack #1 \rbrack} \newcommand{\Var}[1]{\hbox{Var}\lbrack #1 \rbrack} \newcommand{\Std}[1]{\hbox{Std}\lbrack #1 \rbrack} \newcommand{\xpoint}{\boldsymbol{x}} \newcommand{\normalvec}{\boldsymbol{n}} \newcommand{\Oof}[1]{\mathcal{O}(#1)} \newcommand{\x}{\boldsymbol{x}} \newcommand{\X}{\boldsymbol{X}} \renewcommand{\u}{\boldsymbol{u}} \renewcommand{\v}{\boldsymbol{v}} \newcommand{\w}{\boldsymbol{w}} \newcommand{\V}{\boldsymbol{V}} \newcommand{\e}{\boldsymbol{e}} \newcommand{\f}{\boldsymbol{f}} \newcommand{\F}{\boldsymbol{F}} \newcommand{\stress}{\boldsymbol{\sigma}} \newcommand{\strain}{\boldsymbol{\varepsilon}} \newcommand{\stressc}{{\sigma}} \newcommand{\strainc}{{\varepsilon}} \newcommand{\I}{\boldsymbol{I}} \newcommand{\T}{\boldsymbol{T}} \newcommand{\dfc}{\alpha} % diffusion coefficient \newcommand{\ii}{\boldsymbol{i}} \newcommand{\jj}{\boldsymbol{j}} \newcommand{\kk}{\boldsymbol{k}} \newcommand{\ir}{\boldsymbol{i}_r} \newcommand{\ith}{\boldsymbol{i}_{\theta}} \newcommand{\iz}{\boldsymbol{i}_z} \newcommand{\Ix}{\mathcal{I}_x} \newcommand{\Iy}{\mathcal{I}_y} \newcommand{\Iz}{\mathcal{I}_z} \newcommand{\It}{\mathcal{I}_t} \newcommand{\If}{\mathcal{I}_s} % for FEM \newcommand{\Ifd}{{I_d}} % for FEM \newcommand{\Ifb}{{I_b}} % for FEM \newcommand{\setb}[1]{#1^0} % set begin \newcommand{\sete}[1]{#1^{-1}} % set end \newcommand{\setl}[1]{#1^-} \newcommand{\setr}[1]{#1^+} \newcommand{\seti}[1]{#1^i} \newcommand{\sequencei}[1]{\left\{ {#1}_i \right\}_{i\in\If}} \newcommand{\basphi}{\varphi} \newcommand{\baspsi}{\psi} \newcommand{\refphi}{\tilde\basphi} \newcommand{\psib}{\boldsymbol{\psi}} \newcommand{\sinL}[1]{\sin\left((#1+1)\pi\frac{x}{L}\right)} \newcommand{\xno}[1]{x_{#1}} \newcommand{\Xno}[1]{X_{(#1)}} \newcommand{\yno}[1]{y_{#1}} \newcommand{\Yno}[1]{Y_{(#1)}} \newcommand{\xdno}[1]{\boldsymbol{x}_{#1}} \newcommand{\dX}{\, \mathrm{d}X} \newcommand{\dx}{\, \mathrm{d}x} \newcommand{\ds}{\, \mathrm{d}s} \newcommand{\Real}{\mathbb{R}} \newcommand{\Integerp}{\mathbb{N}} \newcommand{\Integer}{\mathbb{Z}} $$

INF5620 Numerical Solution of Partial Differential Equations


The exam 2013 will be on Dec 16, 17, and 18 in room Java in Ole-Johan Dahl's building. All candidates listed on a given day must meet at 0845 in the morning that day, see the beginning of the exam document for descriptions.

Warning. The exam was modified on Dec 13 (14:00) after discussions in the lecture on Dec 12:

  • 1b: Suggested finite differences for the space discretization.
  • 2b: Specified that the student chooses appropriate initial conditions.
  • 2d: A hint about suggested accuracy measures is inserted.
  • 4b: Remove "element vector" from the text (has not relevance for the \( u_{xx} \) term).
  • 5c: Specified that the right-hand side is \( -F \) and the coefficient matrix is the Jacobian.
  • 5d: Removed because this problem quite comprehensive.
  • 6e: Removed because this problem quite comprehensive and 6e is considered difficult.
The only dramatic change is that 5d and 6e are removed.

Important links


  • Dec 14: A serious mistake with a plus instead of a minus in the "stability analysis of the finite element method for the diffusion equation": "" impacts the results of the analysis. This is now corrected. Many other smaller corrections reported by students the last days are also incorporated and update documents are published.
  • Dec 13: The exam has been slightly changed and simplified, see the box above for documentation of the changes.
  • Dec 12: Some experience with the course and plans for the 2014 version have been drafted. Comments and views are welcome.
  • Dec 12: Remember today's meeting at 14:30 in the lecture room.
  • Dec 11: A hint is included in the very last question on the exam.
  • Dec 11: All final projects with an associated email to me should have received feedback. All other repos are being processed from Dec 11. The projects were (with very few exceptions) impressive! The minimal requires in the default project is to 1) derive the necessary numerical expressions, 2) demonstrate an attempt to solve the PDE problem by FEniCS, and 3) show some code for setting up convergence rate experiments. It is not required to have bug-free code.
  • Nov 27: We meet a last time for discussing the exam topics on Thursday, December 12, at 14:30 in the Postscript room (where we had all teaching this semester).
  • Nov 27: The material on Solving nonlinear problems is substantially revised.
  • Nov 25: What is required in the final project? In the default project one must have made a FEniCS program for the nonlinear problem that executes, preferably with correct solution in the linear version of the problem, and the program must have some implementation of convergence rates. It is not required to the nonlinear problem is solved correctly. Much of the last theoretical part of the default project coincides with the exam and these questions can be skipped. A small project report describing what is done can be written in LaTeX or by hand and scanned. The final project should be delivered by Dec 3, but it is possible to get extensions (not recommended - use the last two weeks for preparations).
  • Nov 25: The exam is published.
  • Nov 18: New preliminary notes about solving nonlinear ODE/PDE problems are published on the web. Some more exercises will be added soon and the document will be better proof read.
  • Nov 14: About FEniCS installation on Ubuntu: go to and run the commands under Ubuntu PPA. This will give you access to version 1.2 that is compatible with the new tutorial.
  • Nov 13: The FEniCS tutorial is updated for FEniCS v1.1: PDF for printing and electronic view, Sphinx (one big file), Sphinx (multiple files) + all programs referred to in the tutorial. Use this new version and not the official FEniCS tutorial since some syntax differs between v1.0 and v1.1. Report any problems to
  • Nov 11: Everybody needs to do some final project where a PDE is solved and the quality of the numerial method is investigated. We recommend to choose a PDE problem that is useful for a master/phd thesis, but we also have a default project with important elements from the course (and for the exam). Deadline for the project: Dec 17 (but do it before the preparations for the exams start, around Dec 1).
  • Nov 8: We have had some technical problems with the feedback on "oblig2". Some have merged the fork and some have received a pull request, but some have not received a pull reqest or been notified about an updated fork. Send email to if you have not received feedback on "oblig2".
  • Nov 3: Feedback (with an unfortunate and regrettable delay) on "oblig2" has been pushed back to the repositories. Very much good work! Send mail to if you cannot see the feedback file in the repository (most of our interaction with git is automated, but the overall procedure is not yet fool proof).
  • Oct 27: The third "compulsory" exercise is published (PDF). It is not a requirement to do it, but highly recommended. Nov 3: Some smaller adjustments of the text.
  • Oct 16: Tentative exam dates are set to Dec 16-18 (all three days).
  • Oct 13: There will be assistance with the compulsory exercise 10.15-12.00 on Monday, October 14.
  • Oct 8: There was a typo in the ansatz for damped waves in the compulsory exercise: the term \( e^{-bt} \) should be \( e^{-ct} \), where \( c \) is a constant to be determined (it turns out that \( c=b/2 \), so \( e^{-bt} \) would never fit as a solution).
  • Oct 3: A feasible way of obtaining an exact discrete solution in the compulsory exercise has been inserted as a hint.
  • Oct 2: The computation of an analytical solution for damped, standing waves turned out to cause difficulties. Some hints on how to proceed are now inserted in the compulsory exercise.
  • Sep 29: The lecture on Monday, Sep 30, will be about parallel computing and given by Professor Xing Cai. See the overview of lectures for links to slides and a short introduction to parallel computing.
  • Sep 23: The 2nd compulsory exercise is published.
  • Sep 23: More updates of the wave equation notes and slides are published.
  • Sep 23: Exercises for Sep 25 and week 40:
  • Sep 19: Material on solving wave equations is released.
  • Sep 18: Joakim's feedback on the first compulsory exercise is sent out as pull requests on Bitbucket and GitHub (just accept it). If you have not received a pull request, send an email to, and/or follow link to forked repo and read the feedback file there.
  • Sep 16: Joakim Bø has gone through the files handed in for the first compulsory exercise. The feedback will be sent as pull requests (just accept the request - only a new file will be added to your repo).
  • Sep 4 and 5: Performed some minor edits of the text and data in Exercise 29 and Project 30.
  • Sep 4: Text and slides for Finite difference methods for vibration problems are published.
  • Sep 2/4: The problem lab is on Monday, and Wednesday has 2 h ordinary lectures (only this week). Joakim leads the Monday session.
  • Aug 29: How can you install all needed software in INF5620 on your machine?
  • Aug 26: The "background.pdf" file contained some embarrassing typos that are now corrected.
  • Aug 26: Bitbucket or GitHub for INF5620 work?
    • Main disadvantage of GitHub: You have to apply for a student plan with free private repos
    • Main advantage of Bitbucket: You can have an unlimited number of private repos with up to 5 collaborators (probably sufficient for INF5620).
    • Main advantage of GitHub: You can have repo-specific web pages (probably not important in INF5620).
    • Main disadvantage of Bitbucket: You cannot have repo-specific web pages.
  • Aug 26: The compulsory exercises are reformulated to be more precise, and they also contain an extra question (check the links below) on how to construct an exact linear solution of the discrete equations.
  • First compulsory exercise: either Exercise 29 or Project 1. Deadline: Sep 9.
  • Here are the rules for compulsory exercises/projects in INF5620, H13:
    • Deliver files as part of a private repository at GitHub or Bitbucket.
    • Work in groups of two or individually.
    • Use one private repo for all exercises/projects in INF5620 this semester. If you work in a group, collaborate with one common repo.
    • Add read access for hplbit in the private repo on Bitbucket or hplgit on GitHub. (This will automatically notify the lecturer about the repo.)
    • Write your (the owner's) full name in a README* file in top directory.
    • Include collaborators in the README file in or write their names as a comment in the various files if the names differ between the projects.
    • Hans Petter will fork your repo. He or Joakim Bø will go through the relevant files and create a new file with comments. The student will get a pull request with the changes in the repo. Normally, just accepting the pull request brings the comment file into your repo. Make sure you use the file names given in the exercises.
  • Teaching 2013 in room Postscript in Ole-Johan Dahls hus:
    • Mondays 10.15-12.00: Lectures.
    • Wednedays 08.15-09.00: Problem lab.
    • Wednedays 09.15-10.00: Exercises and/or lectures.


    I haven't managed to synchronize the list here with the lectures page where I actually update the info on exercises. Go to lectures to see which exercises we have solved and plan to solve.

    Principal resources

    Other resources