View on GitHub

Scientific C++

Repository for participants of the "Scientific C++" training

C++ is widely used in many contexts. This training focusses on using C++ for scientific programming and on the way Bjarne Stroustrup advocates modern C++ in his book “A tour of C++”. Some C++17 features and third-party libraries will also be discussed.

Learning outcomes

When you complete this training you will be able to

Schedule

Total duration: 16 hours, split over four sessions.

Session one

Total duration: 4 hours

Subject Duration
introduction and motivation 5 min.
basics: control flow statements, data types 85 min.
hands-on session 20 min.
coffee break 10 min.
functions 15 min.
simple I/O 10 min.
user defined types and classes 85 min.
hands-on session 20 min.

Session two

Total duration: 4 hours

Subject Duration
modular code and the build process 80 min.
hands-on session 20 min.
error handling 10 min.
coffee break 10 min.
inheritance 60 min.
templates 20 min.
functional programming 20 min.
hands-on session 20 min.

Session three

Total duration: 4 hours

Subject Duration
string and regular expressions 70 min.
I/O streams 20 min.
hands-on session 20 min.
coffee break 10 min.
STL containers 70 min.
STL algorithms 30 min.
hands-on session 20 min.

Session four

Total duration: 4 hours

Subject Duration
numerical computing 70 min.
hands-on session 40 min.
coffee break 10 min.
linear algebra 30 min.
Boost for numerics 10 min.
Gnu Scientific Library (GSL) 30 min.
hands-on session 40 min.
wrap up 10 min.

Training materials

Slides are available in the GitHub repository, as well as example code and hands-on material.

Target audience

This training is for you if you already know how to program in another language and want to learn modern C++ for scientific applications.

Prerequisites

You will need experience programming in another programming language. This is not a training that starts from scratch.

If you plan to do C++ programming in a Linux or HPC environment you should be familiar with these as well.

More concretely, participants should already be comfortable with the following:

You do not need prior experience with C++ itself, templates, inheritance, the STL, CMake, Eigen, Armadillo, Boost, or GSL. Those are part of the training itself.

Quick self-assessment

If you can do most of the tasks below in some programming language, you are likely ready for this training.

If several of these items still feel difficult, the training will probably move too fast. In that case, it is better to first take a short introductory programming course.

To follow hands-on, you need a computer with a C++ development environment installed. You can of course use an HPC system you have access to as well.

Level of the Material

For participants who already have programming experience in another language, the material in this training is approximately

These percentages describe the level of the C++ and scientific-computing topics covered in the training, not the participants’ general programming background.

Trainer(s)