gmsh  4.11.1
About: Gmsh is an automatic 3D finite element grid generator with a built-in CAD engine and post-processing facilities.
  Fossies Dox: gmsh-4.11.1-source.tgz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

No Matches
gmsh Documentation

Some Fossies usage hints in advance:

  1. To see the Doxygen generated documentation please click on one of the items in the steelblue colored "quick index" bar above or use the side panel at the left which displays a hierarchical tree-like index structure and is adjustable in width.
  2. If you want to search for something by keyword rather than browse for it you can use the client side search facility (using Javascript and DHTML) that provides live searching, i.e. the search results are presented and adapted as you type in the Search input field at the top right.
  3. Doxygen doesn't incorporate all member files but just a definable subset (basically the main project source code files that are written in a supported language). So to search and browse all member files you may visit the Fossies gmsh-4.11.1-source.tgz contents page and use the Fossies standard member browsing features (also with source code highlighting and additionally with optional code folding).

This is Gmsh, an automatic three-dimensional finite element mesh generator with built-in pre- and post-processing facilities.

Gmsh is copyright (C) 1997-2022 C. Geuzaine and J.-F. Remacle, and is distributed under the terms of the GNU General Public License, Version 2 or later, with an exception to allow for easier linking with external libraries. See LICENSE.txt and CREDITS.txt for more information.

See the doc/ and tutorials/ directories for documentation and tutorials. The reference manual is located in doc/texinfo/. See the examples/ directory and the web site for additional examples.

Building Gmsh from source code requires a C++ compiler and CMake ( Building the graphical user interface requires FLTK 1.3.3 or higher (FLTK-dev 1.4 is required on macOS;, configured with OpenGL support. Support for boolean operations, constructive solid geometry features and STEP file import requires OpenCASCADE 6.9 or higher (version 7.2 or higher is highly recommended; Step-by-step compilation instructions are available on the Gmsh wiki:

Build Gmsh from the command line

  • Create a build directory, for example as a subdirectory of Gmsh's source directory:

    mkdir build

  • To build the monolithic Gmsh app with the default build options, run cmake from within the build directory, pointing to Gmsh's source directory, then run "make"

    cd build cmake .. make

    Optionally running

    make install

    will install the Gmsh app in the standard system location (controlled by CMAKE_INSTALL_PREFIX - see below).

  • To build the Gmsh app dynamically linked to the shared Gmsh library, which can then also be used by external codes through the C++, C, Python, Julia and Fortran Gmsh API, run

    cd build cmake -DENABLE_BUILD_DYNAMIC=1 .. make make install

    This will install the Gmsh app and the shared Gmsh library, as well as the C++ and C include files, and the Python, Julia and Fortran modules.

  • To change build options you can use "ccmake" instead of "cmake", e.g.:

    ccmake ..

    or you can specify options directly on the command line. For example, you can use

    cmake -DCMAKE_PREFIX_PATH=/opt/local ..

    to specify the location of external packages installed in non-standard directories. You can use


    to change the installation directory. Or you could use

    cmake -DENABLE_FLTK=0 ..

    to build a version of Gmsh without the FLTK graphical interface. The list of all available configuration options is given in the reference manual.

  • To see a detailed compilation log use

    make VERBOSE=1

Build Gmsh using CMake's graphical user interface

  • Launch CMake and fill-in the two top input fields (telling where the Gmsh source directory is located and where you want the Gmsh binary to be created).

  • Click on "Add entry" and define the variable CMAKE_PREFIX_PATH, of type "PATH", pointing to the location(s) of any external package(s) (FLTK, BLAS/LAPACK, etc.) installed in non-standard directories.

  • Click on "Configure" and choose your compiler.

  • Optionally change some configuration options (re-run "Configure" every time you change some options).

  • Once you are happy with all the configuration options, click on "Generate".

  • Go to the build directory and build Gmsh using your chosen compiler.