Introduktion to Scientific Computing

Study points
5 ECTS
Syllabus
This course aims to give an understanding of the methods and techniques when applying mathematical calculations to typically large amounts of data. We will use Matlab and Octave to implement such mehtods and study the properties of these methods when using finite accuracy floating point number representations.
Lecturer
Jan Westerholm

Literature
Alfio Quarteroni and Fausto Saleri: "Scientific Computing with Matlab and Octave".
    Both the second and third edition of this book, also the Italian version, can be used.
Extra material will be found here:

Lectures
Time:
  • The lectures were held on
    • Tuesdays 10-12 in ICT-building/3040/Cobol
    • Fridays 13-15 in ICT-building/3040/Cobol
  • The lectures ended on Friday, May 8th. Now is the time to choose and work on your individual project!
Lecture slides:
  • The lecture slides will be handed out as the the course proceeds.
    • 1. Introduction
    • 2. Finite number representation arithmetic
    • 3. Linear equation systems
    • 4. Eigenvalues
    • 5. Differential equations with initial values
    • 6. Differential equations with boundary values

Problem sets and problem session time


  • To be decided!


Exams
Time and place for the exams:
  • The course exam is to work on an individual project and present your results in front of the class. Choose one of the following projects and send an email to the lecturer. If you are the first to make that choice you get the project!
  • PETSc:
      PETSc is a universally accepted package to solve large sparse linear (and non-linear) systems. We show how to initialize the matrix A and the right hand side b, Ax = b, and how to solve for x using PETSc using different preconditioners.
  • MUMPS:
      Direct methods like the LU decomposition are still under active research. A collection of routines called MUMPS is available. We explain how MUMPS works and run some simple examples.
  • All problems have presently been taken. If you need an individual project subject please contact the lecturer.
  • GMRES:
      GMRES is an iterative method to solve a system of linear equations Ax=b. Your task is to explain how GMRES works by explaining in detail those things that have not been explained during the lectures (eg. Arnoldi iteration). Then run samples cases, for instance Hilbert matrices up to 20x20 and present the results.
  • Multigrid:
      The multigrid method introduced by Hackbusch offers a way of speeding up the convergence of iterative solutions to differential equations discretized on a regular d-dimensional grid. Using the material from W. Hackbusch: "Multi-Grid Methods and Applications", chapter 2, show how the multigrid method works on the one-dimensional Poisson equation -u''(x) = f(x). A sample case with sample code is provided in the book.
  • PETSc:
      PETSc is a universally accepted package to solve large sparse linear (and non-linear) systems. Your task is to show how to initialize the matrix A and the right hand side b, Ax = b, and how to solve for x using PETSc. You don't have to explain the source code of PETSc, instead tell us how to use it explaining what is going on according to the documentation. Assume you are running PETSc on one core. Use different preconditioners.
  • QR decomposition:
      The QR decomposition of an arbitrary nonsingular matrix A into A = QR where Q is orthogonal, Q^{-1} = Q^T, and R is upper triangular, was used in the lecture notes but never explained how the decomposition is done. For this task, explain how the QR decomposition is calculated (choose one of several different methods) and show some numerical intermediate and final results for some matrices A.
  • MUMPS:
      Direct methods like the LU decomposition are still under active research. A collection of routines called MUMPS is available. Explain how MUMPS works and run some simple examples.
  • How well conditioned is the numerical Poisson equation?
      The two-dimensional Poisson equation \Delta u(x,y) = -f(x,y), where \Delta = \frac{\partial^2}{\partial x^2} + \frac{\partial^2}{\partial y^2}, is solved on the unit square [0,1]x[0,1] discretized into an NxN grid with discretization h = 1/N. The discretized Poisson equation gives rise to a linear system Ax = b. Let's cheat: Choose u, calculate f(x,y), and then analyze the coefficient matrix A in the corresponding linear system Ax = b. Suggestion: u(x,y) = sin(2\pi x)*cos(2\pi y), which yields an analytic expression for f(x,y) = 8\pi^2*sin(2\pi x)*cos(2\pi y). Your task: for various h analyze what happens to the condition number cond(A) and the determinant det(A) of A. Use separate methods to find these two values, just to convince ourselves that we may trust the results. How close are the numerical results for the Poisson equation to the exact result u(x,y)?

Course evaluation

All courses at the IT department are evaluated using a standard questionnaire. This is typically done in connection with the exam. Thank you for filling out the questionnaire!

Last updated 18.03.2015