Unit testing: a practical example โ Last week I explained how to use CTest and how to configure CMake to automatically compile and run unit tests. I also mentioned how great and useful unit tests are, especially when you use them...
Memory mapping files โ Input and output, however tricky, are usually considered of secondary importance during a computationally intensive numerical simulation, since the time spent reading and writing files is usually a lot shorter than the time spent doing...
Exposing C++ to Python: an introduction โ Python is a very popular tool among many scientists, mainly because it is very easy to use and because there exists a large number of powerful libraries that can be used from Python. Writing efficient...
Configuring projects using CMake โ I have mentioned the use of CMake in the past, but have never really explained how to use it. However, I have recently noticed that such an introduction would really helpful, since the lack of...
A C++ wrapper for QuickSched โ I have introduced and mentioned the concept of task-based parallelisation a couple of times in the past, as the in my eyes most promising way to parallelise software for the exa-scale era. What I havenโt...
Some general programming experiences โ After 51 weeks of writing posts, Iโm pretty much out of good topics to write about, so I thought I would finish my year of posts with some general remarks about things I havenโt really...
Unit testing with CTest โ Letโs talk about code testing. Testing is a very important aspect of developing a code: you wrote a function or class with a specific aim and now you need to make sure that this component...
An expression for the average active cross section of spheroidal particles โ NOTE: the expression computed in this post is subtly wrong and has been corrected in a more recent post. And now for something completely different. I recently encountered an interesting geometry problem during my work...
Input and output with strings, part 3: input with C(++) โ A while ago I described how to read values from strings using Python, and I introduced the concept of regular expression parsing for this purpose. In this post I will describe how to achieve the...
Input and output with strings, part 2: input with Python โ A short while ago, I wrote a first post in a series about string input and output in various (programming) languages, and I started with the easy part: string output. Since then, I realised that...
Input and output with strings, part 1: output โ If you ever wrote a piece of code - proper Fortran or C(++) code, or a script in some other language - you almost certainly at some point got confronted with input and output, either...
Load More