Rich Hewitt


Getting it

You need a machine with a recent C++ compiler and 'git' to clone the latest version. The build system uses meson. The source is hosted on Github and can be obtained using 'git' via

  git clone git:// 

Once you have the code, you can try "meson build; cd build; ninja; ninja test". Examples of how to build with PETSc and SLEPc support can be found in "./" and "" in the CppNoddy.

Environment variables used in the build process include LD_LIBRARY_PATH, PKG_CONFIG_PATH, PETSC_DIR, PETSC_ARCH, SLEPC_DIR. For example, for the bash shell:

 export PETSC_DIR=/home/user/path_to_installation/petsc 
 export PETSC_ARCH=x86_64-linux-gnu-complex 
 export SLEPC_DIR=/home/user/path_to_installation/slepc 
 export LD_LIBRARY_PATH=/home/user/path_to_installation/CppNoddy/build/lib/x86_64-linux-gnu/:$PETSC_DIR/$PETSC_ARCH/lib:$SLEPC_DIR/$PETSC_ARCH/lib:/home/user/path_to_installation/lapack/lib/ 
 export PKG_CONFIG_PATH=$PETSC_DIR/$PETSC_ARCH/lib/pkgconfig:$SLEPC_DIR/$PETSC_ARCH/lib/pkgconfig:/home/user/path_to_installation/CppNoddy/build/lib/x86_64-linux-gnu/pkgconfig:/home/user/path_to_installation/lapack/lib 

What is it?

A simple (aka Noddy) collection of object orientated numerical routines written in C++, aimed at undergraduate projects and starting graduate students. In the current version, the test/example cases solve (amongst others):

What is it for?

It's an introduction/framework for final-year undergraduate project students or new graduate students .... and just for fun.

Is it fast/accurate?

The matrix classes have native solvers that are naive unoptimised Gaussian elimination algorithms. These routines will only be practical (if at all!) for rather `small' matrix/band sizes and do not scale well. If the problem is of even moderate size, then you should link to your local LAPACK/PETSc routines.

The code is not especially optimised, in fact in many places the code is deliberately un-optimised for greater transparency; it is not intended for 'heavy duty' problems. The only sanity checks applied are those listed in the test/example codes.

It made my machine burst into flames

I never said it wouldn't ;-)

I think it needs a CppNoddy::foo<bar> class

Feel free to add something. If you're an undergraduate looking for a final-year project or an MSc. student and have an idea of something to include (or wish to redesign something that I did in a stupid way), then let me know.

This software is licenced under the CC-GNU GPL.
© Content created by R.E. Hewitt, 2007.


Unsteady (parabolic) boundary-layer.
Karman rotating-disk.
Blasius boundary-layer.
Falkner-Skan equation.
1D and 2D Orr-Sommerfeld equation.
Bi-harmonic equation.
Sod's shocktube.
Linear acoustics.
Shallow water equations.
Compressible Euler.
Lorenz equations.
Poisson problem.


Dense/sparse vectors.
Dense/Banded/Sparse matrices.
Linear solvers
Arc-length continuation.
Newton iteration.
Initial value problems.
1D boundary-value problems.
1D eigenvalue problems.
1D/2D hyperbolic problems.
2D parabolic problems.