Building OpenFOAM-2.2.x

The 2.2 version of OpenFOAM was released on 6. March 2013 and after reading the changelog, I was keen to try it out. Especially due to the promised changes to snappyHexMesh. I tried to build the new version that is distributed via github using the well known way of just changing into the $WM_PROJECT_DIR, executing ./Allwmake and hoping for the best. Unfortunatly this didn’t work out well, because the libOpenFOAM didn’t compile properly:

primitives/triad/triad.C:36: error: expected initializer before '<' token
    primitives/triad/triad.C:39: error: expected initializer before '<' token

After discussing this with my good friend Tomislav, he came up with a simple fix for this: Just remove the lines in $FOAM_SRC/OpenFOAM/Make/files that contain something with triad in it. You can either download the bugfix from github or generate it from scratch by commenting all lines that contain something with triad.

Executing Allwmake in $WM_PROJECT_DIR should now compile the current version without any errors.