linear algebra

Complete walkthrough: Adding CMake to an existing library

In this article, we will explore how we can take two libraries we have developed before on this website (namely the linear algebra solver library and the mesh reader library) and add CMake scripts to them to fully automate the compilation and deployment stages from configuring the project to compilation, testing, documentation generation, installation, and …

Complete walkthrough: Adding CMake to an existing library Read More »

How to annotate C++ code for automatic code documentation

In this article, we look at how we can annotate our code so it can be picked up by a documentation tool to provide automatic code documentation for us. There are good and bad ways to do this, and unfortunately, more often than not, code documentation is a dreaded task by programmers and is done …

How to annotate C++ code for automatic code documentation Read More »

How To Test A Linear Algebra Solver Library Using gtest

In this article, we look at how we can test the linear algebra solver library we developed previously. In particular, we will look at how we can write unit, integration, and system tests that ensure our code is working using both white-box and black-box testing. This will provide our code with additional resistance against regressions …

How To Test A Linear Algebra Solver Library Using gtest Read More »

How to write a CFD library: The sparse matrix class

In this article, we will first look at why sparse matrices, as found in CFD applications, really need to be stored with an adequate sparse matrix storage format, by looking at some back of the envelop calculations that show that we can save a significant amount of data by using an appropriate storage format. We …

How to write a CFD library: The sparse matrix class Read More »

How to write a CFD library: The vector class

The vector class provides a fundamental building block in our linear system of equations solver library. We have already seen in the previous article how it will be used by our conjugate gradient algorithm, in this week’s article, we look at how to implement the vector class itself. Next week, we’ll close the loop by …

How to write a CFD library: The vector class Read More »

How to write a CFD library: Basic library structure

In last week’s article, we developed the discretised equation for the 1D heat diffusion equation using the finite volume method. We looked at why we need an implicit time integration technique and why this requires a linear system of equations solver. In this week’s article, we’ll explore how to set up a basic project structure …

How to write a CFD library: Basic library structure Read More »