Compiling OpenFOAM.com v1806
WORK IN PROGRESS
READ♯
- https://www.openfoam.com/documentation/system-requirements.php
 - https://www.openfoam.com/download/install-source.php
 - https://www.openfoam.com/code/build-guide.php
 
Download♯
- Official source tarballs
 
wgethttps://sourceforge.net/projects/openfoamplus/files/v1806/OpenFOAM-v1806.tgz
wgethttps://sourceforge.net/projects/openfoamplus/files/v1806/ThirdParty-v1806.tgz
Third Party♯
- Qt
 
wgethttps://download.qt.io/archive/qt/5.9/5.9.6/single/qt-everywhere-opensource-src-5.9.6.tar.xz
- Paraview
 - gmp & mpfr
 
wgethttps://ftp.gnu.org/gnu/gmp/gmp-6.1.2.tar.xz
wgethttps://www.mpfr.org/mpfr-current/mpfr-4.0.1.tar.xz
- metis
 
wgethttp://glaros.dtc.umn.edu/gkhome/fetch/sw/metis/metis-5.1.0.tar.gz
Hack♯
Third Party - makeCGAL script♯
### MODIFY makeCGAL script
...
    echo "Starting build: $boostPACKAGE"
    echo
    # Absolute path for --libdir
    (
        cd $BOOST_SOURCE_DIR || exit 1
        export GIT_DIR=$PWD/.git # Mask seeing our own git-repo
        export TOOLSET=intel-linux
        rm -rf $BOOST_ARCH_PATH
        ./bootstrap.sh \
            --with-toolset=$TOOLSET \
            --prefix=$BOOST_ARCH_PATH \
            --libdir=$boostLib \
            --with-libraries=thread \
            --with-libraries=system \
        && ./bjam toolset=$TOOLSET -j $WM_NCOMPPROCS install \
        && echo "Built: boost"
    ) || {
        echo "Error building: boost"
        exit 1
    }
...
OpenFOAM source - src/OpenFOAM/db/dictionary/dictionarySearch.C♯
Hack the source for src/OpenFOAM/db/dictionary/dictionarySearch.C
--- dictionarySearch.C  2018-06-28 10:39:32.000000000 -0400
+++ /mnt/HA/opt/OpenFOAM-v1806/OpenFOAM-v1806/src/OpenFOAM/db/dictionary/dictionarySearch.C     2018-09-13 04:02:29.375945533 -0400
@@ -320,7 +320,7 @@
 {
     const_searcher finder = csearch(keyword, recursive, patternMatch);
-    return static_cast<const searcher&>(finder);
+    return static_cast<searcher>(finder);
 }
@@ -377,7 +377,7 @@
 {
     const_searcher finder = csearchScoped(keyword, recursive, patternMatch);
-    return static_cast<const searcher&>(finder);
+    return static_cast<searcher>(finder);
 }
Build♯
Third Party♯
- boost
- this is usually built by the "makeCGAL" script
 - but in case you want to build and install it directly
 
 
./bootstrap.sh  --with-toolset=intel-linux --prefix=/mnt/HA/opt/OpenFOAM-v1806/ThirdParty-v1806/platforms/linux64Icc/boost_1_64_0 --libdir=/mnt/HA/opt/OpenFOAM-v1806/ThirdParty-v1806/platforms/linux64Icc/boost_1_64_0/lib64  --with-libraries=thread --with-libraries=system
./bjam toolset=intel-linux -j 20 install
- gmp
 
./configure --prefix=/mnt/HA/opt/OpenFOAM-v1806/ThirdParty-v1806/platforms/linux64/gmp-6.1.2
make -j 20
make check
make install
- mpfr
 
./configure --prefix=/mnt/HA/opt/OpenFOAM-v1806/ThirdParty-v1806/platforms/linux64/mpfr-4.0.1 --with-gmp=/mnt/HA/opt/OpenFOAM-v1806/ThirdParty-v1806/platforms/linux64/gmp-6.1.2
make -j 20
make check
make install
- CGAL
 
./makeCGAL  gmp-6.1.2 mpfr-4.0.1
- all
 
./Allwmake
OpenFOAM♯
- make
 
./Allwmake