Gmsh

ScreenshotGmsh is a 3D finite element grid generator with a build-in CAD engine and post-processor. Its design goal is to provide a fast, light and user-friendly meshing tool with parametric input and advanced visualization capabilities. Gmsh is built around four modules: geometry, mesh, solver and post-processing. The specification of any input to these modules is done either interactively using the graphical user interface or in ASCII text files using Gmsh's own scripting language [1].

Compiling gmsh

  1. Install cmake. Optionally install also ccmake.
  2. Install the following programs, libraries and development versions thereof:
    • libann
    • libfltk
    • libgmm++
    • libpetsc
    • libscotch
    • libslepc
    • gcc
    • gfortran
    • swig
    Keep in mind to install dependencies of these packages, too.
  3. Download and extract sources of mmg3d [2].
  4. Run "(c)cmake.".
    1. Make sure that the INCLUDE_SCOTCH variable points to the scotch headers (e.g. /usr/include/scotch).
    2. Make sure that a library is generated (COMPIL_SHARED_LIBRARY or COMPIL_STATIC_LIBRARY).
  5. Run make.
  6. Copy the library to the folder where libraries are stored (e.g. /usr/local/lib).
  7. Run ldconfig.
  8. Download and extract sources of gmsh.
  9. Create a folder build in the folder gmsh-x.x.x-source.
  10. Go to this folder.
  11. Run "(c)cmake..".
    1. Set ENABLE_MPI to ON.
    2. Add to the PETSC_INC variable the path to the MPI includes (e.g. /usr/include/petsc;/usr/include/mpi).
    3. Set the variable MMG3D_INC to the source path of mmg3d (e.g. /usr/local/src/mmg3d4/build/sources).
    4. Set the variable MMG3D_LIB to the path of the compiled library (e.g. /usr/local/src/mmg3d4/build/libmmg3dlib4.0.so).
  12. Run make and make install.

References

  1. http://geuz.org/gmsh/
  2. http://www.math.u-bordeaux1.fr/~cdobrzyn/logiciels/mmg3d.php
  3. https://geuz.org/trac/gmsh/wiki/InstallingGmshDg