enGrid is a mesh generation software with CFD applications in mind. It supports automatic prismatic boundary layer grids for Navier-Stokes simulations and has a Qt based GUI.
A Doxygen created source code documentation can be found here:
http://todtnau.engits.de/engrid-doc/master/html
The documentation is updated automatically and should contain the correct documentation latest one day after a commit to the master branch.
Due significant changes to the enGrid codebase, only the master branch version of enGrid is actively supported. The code now makes use of the CMake build system, which should simplify compilation.
The main dependencies for enGrid are:
- Qt 4
- VTK 6.*
- CMake
- CGAL
VTK needs to be compiled with Qt support, as enGrid depends on QVtkWidget. The plan is to move to qt5 in the near future, which would also allow to upgrade to the latest version of VTK.
enGrid was successfully compiled on Ubuntu 16.04 (Xenial Xerus) with the following dependency versions:
- Qt 4.8.7
- CMake 3.5.1
- VTK 6.2
- CGAL 4.7-4
As Ubuntu 16.04 only has Qt 5 support for VTK, VTK had to be compiled locally. The VTK build was configured using the following command:
cmake -DCMAKE_BUILD_TYPE=Release -DVTK_Group_Qt=ON -DCMAKE_INSTALL_PREFIX=/the/path/of/your/choice
enGrid can then be configured and compiled in a separate build directory using:
ccmake ..\src
pressing [c]
to configure, pressing [c]
a second time to accept the changes, and pressing [g]
to generate the Makefiles and exit. The code can then be compiled and installed using make:
make -j8 install
The steps to complete the compilation are:
- Installation of previous compiler version and cmake with interface
- Setup to work with previous compiler version
- Compile VTK 6.3 with flags and dependencies
- Compile libboost 1.58.0
- Compile CGAL 4.7 with flags and dependencies
- Compile enGrid with the necessary flags
sudo apt-get install cmake-curses-gui gcc-5 g++-5
In Ubuntu the command 'update-alternatives' allows to setup a different version of the gcc compiler:
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-7 10
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-5 20
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-5 20
sudo update-alternatives --install /usr/bin/cc cc /usr/bin/gcc 30
sudo update-alternatives --set cc /usr/bin/gcc
sudo update-alternatives --install /usr/bin/c++ c++ /usr/bin/g++ 30
sudo update-alternatives --set c++ /usr/bin/g++
Install dependencies of VTK 6.3 :
sudo apt-get install libxt-dev qt4-default libqtwebkit-dev
Download and extract the source code of VTK 6.3 on a folder to store enGrid dependencies. Then proceed with the build:
cd your/path/to/VTK-6.3.0
mkdir build
cd build
ccmake ../
On the cmake interface press [c]
to configure and [e]
to exit if any message is shown. Then look for the tag VTK_Group_Qt
and press enter to change it from OFF
to ON
, then press [c]
and [c]
again to complete the setup and [g]
to generate the files for compiling. Finally build VTK with the command make
with the -j
option followed by the number of cores of the computer:
make -j4
Download and extract the source code of Boost C++ Libraries 1.58.0. Then proceed with the build:
cd your/path/to/boost_1_58_0
./bootstrap.sh --with-python=python2
./b2
Install dependencies of CGAL 4.7 :
sudo apt-get install libgmp-dev libmpfr-dev
Download and extract the source code of CGAL 4.7. Then proceed with the build:
cd your/path/to/CGAL-4.7
mkdir build
cd build
ccmake ../
On the cmake interface press [c]
to configure and [e]
to exit if any message is shown. Then press [t]
to toggle advanced mode and look and set the following tags:
Boost_INCLUDE_DIR
set to/absolute/path/to/boost_1_58_0/
Boost_LIBRARY_DIR_RELEASE
set to/absolute/path/to/boost_1_58_0/stage/lib
WITH_CGAL_Qt5
set toOFF
Then press [c]
and [e]
to complete the setup and [g]
to generate the files for compiling. Finally build CGAL:
make -j4
Download or clone and extract the enGrid source code repository. Then proceed with the build:
cd your/path/to/engrid-master/
mkdir build
cd build
ccmake ../src/
On the cmake interface:
- press
[c]
,[e]
- set
VTK_DIR
to/absolute/path/to/VTK-6.3/build/
- press
[c]
,[e]
- set
CGAL_DIR
to/absolute/path/to/CGAL-4.7/build/
- press
[c]
- set
CGAL_INCLUDE_PATH
to/absolute/path/to/CGAL-4.7/build/include/
- press
[c]
- set
BOOST_INCLUDE_PATH
to/absolute/path/to/boost_1_58_0/
- press
[c]
,[g]
Build enGrid
make -j4