LCSC

Laboratory Class Scientific Computing #

Utrecht University, E-mail: a.b.m.graas@uu.nl.

Course Catalogue WISM454 timetable.uu.nl

Updates #

  • 19 Nov: In Exercise 3.2, you only have to implement Hit-or-miss and Simple-sampling with the similarly named domain sampling strategies. You will still have to make sure that pseudo-random sampling and lattice-sampling works with each Monte Carlo method.
  • 7 Oct: Exercise 1.8.4 contained a mistake, the bitshift operation is only to happen in the scale function. The exercise has been corrected.
  • 29 Sep: Deadline first report postponed with one week.
  • 19 Sep: Exercise 1.4.3 has been modified a bit, and requires some understanding of the compilation process, which will be treated next lecture. If the exercise is too difficult, you can leave it for now. If you’ve already done the exercise that is fine too.
  • Welcome to Labclass ‘22/‘23. The first lecture takes place on Thursday 15 September, 13:15 in DALTON 500 - 6.25. Please bring your laptop!

Calendar #

Schedule #

Mini-report 1: Linear Congruential Random Number Generators

In the first project, CLion is installed, and we get familiar with the Linux/Unix shell. Before moving to C++, we learn essential C programming concepts using Linear Congruential Random Number Generators. We will quickly pass through a lot of technical topics: pointers, structs, memory overflow, but also get hands-on experience with compilation and using external libraries.

 ReadingTutorials / Exercises
15 Sep. (slides)RNGs, C overviewSet up CLion and get started. Exercises 1.1, 1.2, 1.3, 1.4
22 Sep. (slides)Compilation 2.1, 2.2, 2.3Exercises 1.5, 1.6
29 Sep. (slides)Compilation 2.4 on librariesExercises 1.7, 1.8
6 Oct. (slides)

Deadline for the first mini-report is October 12th, 11:59 PM.

Mini-report 2: Distributions

In the second project, we will move to C++ and focus on Object-Oriented Programming (OOP). This starts with a more involved project structure, and CMake for building. During the project a library will be designed to generate numbers from nonuniform distributions, using the inversion method and rejection method. Next to C++ features, such as references, this includes important OOP concepts: classes, inheritance, and operator overloading. We will also touch on OOP paradigms such as encapsulation, composition and polymorphism.

WeekreadingTutorials / Exercises
13 Oct (slides)Compilation 2.5, 2.6, Nonuniform distributionsExercises 2.1, 2.2
20 OctExercises 2.3, 2.4
27 Oct (slides)Exercises 2.5, 2.6.
3 Nov (slides)Exercises 2.7. Code review opportunity until Friday 4th.

Deadline for the second mini-report is November 9th, 11:59 PM.

Mini-report 3: Monte Carlo

For the third project, we will implement Monte Carlo integrators, and learn about more advanced C++ techniques: copying and moving, rvalue references, and lambda’s. We will then use features from the C++ standard library to extend the Monte Carlo integrators to higher dimension. We finalize with the topic of template metaprogramming, which is an indispensable technique for writing performant scientific code.

WeekreadingTutorials / Exercises
10 Nov (slides)Rvalue references and value categoriesExercise 3.1
17 Nov (slides)Exercise 3.2
24 Nov (slides)Exercise 3.3
1 DecNo new exercises.
Code review opportunity until Friday 2nd.
8 DecNo class this week.

Deadline for the third mini-report is December 14th, 11:59 PM. Remove any executables and CMake build directories from the attachments. I will always confirm your hand-in.

Final report: Nonlinear optimization
WeekreadingTutorials / Exercises
15 Dec (slides)Exercise 4.1
22 Dec
29 DecNo class.
5 JanNo class.
12 Jan
19 Jan
26 Jan
2 FebPresentations

Deadline for the report is February 3th, 11:59 PM. Remove any executables and CMake build directories from the attachments. I will always confirm your hand-in.