^ Up to course homepage.

Recent information on 2D1263, Scientific Computing

Press this button to access course evaluation:

Latest news

[13/9 15.30]
Some comments on the operating system upgrade and the workshop module which can be helpful for laboration 3.
[13/9 14.00]
The August 31 exam has been graded, and can be collected at the student expedition.
[25/5 11.30]
An additional exam will be given on Saturday June 2nd, 09.00-14.00 in seminar room 4523 (where most of the lectures were held). Please see below for additional details.
[22/5 09.00]
The first exam will be given on Tuesday May 29th, 14.00-19.00 in Q31 and Q32. Possibilities to have an exam also on June 2nd are currently being investigated, and details will hopefully be known by the end of the day.
[4/5 11.40]
Extra lecture on May 17th, at 10.15 in room 4523. An additional makefile uploaded for linking (parallel) C++ and Fortran 77 code on Sun and Kallsup.
[21/3 08.40]
The lecture on March 28th has been moved to room D33. Due date for computer exercise 2 postponed to April 6th.
[15/3 13.00]
Some supplementary notes on MPI added. The text on optimisation will be added at a later date.
[14/3 13.40]
Students who have registered for the course should now have accounts on Kallsup.
[22/2 09:15]
To use the parallel C++ compiler mpiCC on Nada's workstations you need to add the modules workshop/5.0 and mpich/1.2. Some simple MPI exercises.
[7/2 08:55]
The lecture on Februray 14th has been moved to room D35.
[24/1 01:55]
The schedule for the computer exercises has now been confirmed.
[18/1 12:40]
The schedule for the lectures has now been set. Preliminary schedule for computer exercises available.


The lecturer is Christer Andersson,


The course literature will be handed out during the lectures (see handouts below). Additional material which may be useful can be found in the online references.

For students wishing to buy a good book on C++ I would recommend "The C++ Programming Language" by Bjarne Stroustrup, available from e.g.

Please note that this book is not included in the course literature. All prices were checked on December 6th 2000 and do not include postage & packing for the online bookstores.

Schedule & Course plan

Wednesday17/110.15-12.004523 Overview of techniques for grid generation with emphasis on structured boundary-fitted grids. Introduction to C++ and object-oriented programming. Efficiency and optimization for single processor architectures. Implementation of algebraic grid generator.
Thursday 25/110.15-12.004523
Wednesday 7/210.15-12.004523
Wednesday14/210.15-12.00D35 Partial differential equations. Difference approximations on curvilinear grids and analysis of numerical schemes. Parallel programming for distributed memory architectures using MPI. Metrics for parallel performance. Implementation of distributed array class using MPI.
Wednesday28/310.15-12.00D33 The incompressible Navier-Stokes equations. The structure of a computational fluid dynamics solver (CFD). Handling of boundary conditions. Brief overview of existing CFD codes, other parallel architectures and Fortran 90. Implementation of a parallel CFD solver.
Wednesday 4/410.15-12.004523
Thursday 3/510.15-12.004523
Tuesday 8/510.15-12.004523
Thursday 17/510.15-12.004523
Computer exercises
DateTimeLab There may be computers available in the labs outside of scheduled classes. Please refer to Nada's computer usage page for more information.
Friday 26/110.00-12.00orange
Thursday 8/210.00-12.00brun
Thursday 22/28.00-10.00gul
Thursday 15/313.00-15.00brun
Thursday 29/313.00-15.00orange
Thursday 5/413.00-15.00orange

If there is sufficient interest two or three additional (voluntary) lectures on object-oriented design can be given. These will not be directly related to the course but may be useful for students who have little or no previous experience of object-oriented programming.


There are three compulsory laborations (2 credits) to be done individually or in groups of two students.

NB! There have been some problems with the header file iostream.h in Workshop 5.0 on Sun workstations since the operating system upgrade. Add the module workshop/6.0 instead (for laboration 3).


In addition to the laborations there will be an exam (2 credits). Exams are currently planned for


During the first meeting the lecture notes written by Björn Sjögreen for the 1999 rendition of the course and a few simple C++ exercises were handed out.

Supplementary notes on MPI.

SlidesBrief content
Lecture 1 (17/1) About the course. Types of computational grids.
Lecture 2 (17/1) Basic C++: loops, selection, functions, objects and classes.
Lecture 3 (25/1) Techniques for structured boundary-fitted grid generation.
Lecture 4 (25/1) C++: arrays, pointers, derived classes and inheritance.
Lecture 5 (31/1) Grid generation: parameterization and node distribution. C++ representation.
Lecture 6 (31/1) File I/O, operator overloading. The KeLP and Overture libraries.
Lecture 7 (7/2) Partial differential equations and numerical schemes for solving them
Lecture 8 (7/2) Finite difference methods: discretization & stability on uniform grids
Lecture 9 (14/2) Parallel architectures and MPI.
Lecture 10 (14/2) MPI: Point-to-point communication, blocking and non-blocking.
Lecture 11 (21/2) MPI: Global communication. Parallel performance metrics
Lecture 12 (21/2) Measuring parallel performance. Distribution of computational grids
Lecture 13 (14/3) Difference operators on structured non-uniform 1D grids
Lecture 14 (14/3) Implementation of computational codes. Profiling and optimisation.
Lecture 15 (21/3) Difference operators on structured grids in several space dimensions.
Lecture 16 (21/3) Discretisation of PDEs on structured grids. Implications on parallel efficiency.
Lecture 17 (28/3) The Navier-Stokes equations.
Lecture 18 (28/3) The Navier-Stokes equations.
Lecture 19 (3/5) CFD Solvers: CFX & Diffpack. Fortran 90.
Lecture 20 (3/5) Boundary conditions. Representation of boundary conditions and PDEs in C++.
Lecture 21 (8/5) Efficient C++: multidimensional arrays, cache and loop order.
Lecture 22 (8/5) Efficient C++: Templates, function calls & friends. C++ vs. Fortran.
Lectures 23-24 (17/5) Operator overloading & efficency. Brief course summary

Source code

Online references

C++ & Object-oriented programming

Parallel programming

Numerical Analysis

The above mentioned numerical analysis sites contain a wealth of links, some of which are too advanced for this course.

^ Up to course homepage.

Responsible for this page: Christer Andersson <>
Latest change:
Technical support: <>