Gmsh: a three-dimensional finite element mesh generator with built-in pre- and post-processing facilities
Keywords: free, finite elements, mesh generator, fem, unstructured grids, delaunay, discontinuous galerkin, triangulation, automatic, maillages, mailleur 3D, mesh adaptation, postprocessing, post processing, post-processor, postprocessor, post-processeur, CAD, CAO, OpenGL, GL2PS, Gmesh

# Gmsh

# A three-dimensional finite element mesh generator with built-in pre- and post-processing facilities

#### Christophe Geuzaine and Jean-François Remacle

Gmsh is an open source 3D finite element mesh generator with a built-in CAD engine and post-processor. Its design goal is to provide a fast, light and user-friendly meshing tool with parametric input and flexible visualization capabilities. Gmsh is built around four modules (geometry, mesh, solver and post-processing), which can be controlled with the graphical user interface, from the command line, using text files written in Gmsh's own scripting language (`.geo` files), or through the C++, C, Python, Julia and Fortran application programming interface.

See this general presentation for a high-level overview of Gmsh and the reference manual for the complete documentation, which includes the Gmsh tutorial. The source code repository contains the tutorial source files as well as many other examples.

## Download

Gmsh is distributed under the terms of the GNU General Public License (GPL):

- Current stable release (version 4.13.1, 24 May 2024):
  - Download Gmsh for Windows, Linux, macOS (x86) or macOS (ARM) *
  - Download the source code
  - Download the Software Development Kit (SDK) for Windows, Linux, macOS (x86) or macOS (ARM) *
  - Download both Gmsh and the SDK with pip: '`pip install --upgrade gmsh`'

  Make sure to read the tutorial and the FAQ before sending questions or bug reports.

- Development version:
  - Download the latest automatic Gmsh snapshot for Windows, Linux, macOS (x86) or macOS (ARM) *
  - Download the latest automatic source code snapshot
  - Download the latest automatic SDK snapshot for Windows, Linux, macOS (x86) or macOS (ARM) *
  - Access the Git repository: '`git clone https://gitlab.onelab.info/gmsh/gmsh.git`'
  - Download the latest automatic snapshot of both Gmsh and the SDK with pip: '`pip install -i https://gmsh.info/python-packages-dev --force-reinstall --no-cache-dir gmsh`' (on Linux systems without X windows, use `python-packages-dev-nox` instead of `python-packages-dev`)

- All versions: binaries and sources

If you use Gmsh please cite the following reference in your work (books, articles, reports, etc.): C. Geuzaine and J.-F. Remacle. Gmsh: a three-dimensional finite element mesh generator with built-in pre- and post-processing facilities. International Journal for Numerical Methods in Engineering 79(11), pp. 1309-1331, 2009. You can also cite additional references for specific features and algorithms.

To help fund Gmsh development, you can make a donation.

* Binary releases require Windows ≥ 10, Linux with glibc ≥ 2.24, macOS (x86 - Intel processors) ≥ 10.15 or macOS (ARM - Apple M-series processors) ≥ 12

## Documentation

- General presentation with high-level overview of Gmsh and recent developments
- Gmsh reference manual (stable release) (also available in PDF and in plain text)
- Gmsh reference manual (development version) (also available in PDF and in plain text)
- Screencasts showing how to use the graphical user interface
- Gitlab development site with a wiki, time line of changes and the bug tracking database
- Changelog

Please report all issues on `https://gitlab.onelab.info/gmsh/gmsh/issues`.

## Licensing

Gmsh is copyright (C) 1997-2024 by C. Geuzaine and J.-F. Remacle (see the CREDITS file for more information) and is distributed under the terms of the GNU General Public License (GPL) (version 2 or later, with an exception to allow for easier linking with external libraries).

In short, this means that everyone is free to use Gmsh and to redistribute it on a free basis. Gmsh is not in the public domain; it is copyrighted and there are restrictions on its distribution (see the license and the related frequently asked questions). For example, you cannot integrate this version of Gmsh (in full or in parts) in any closed-source software you plan to distribute (commercially or not). If you want to integrate parts of Gmsh into a closed-source software, or want to sell a modified closed-source version of Gmsh, you will need to obtain a commercial license: please contact us for details.

## Screenshots

These are two screenshots of the Gmsh user interface, with either the light or dark user interface theme. See the ONELAB web site for more.

## Links

- Gmsh uses OpenCASCADE for constructive geometry features, and interfaces the optional external mesh and mesh adaptation librairies Netgen and Mmg3d.
- Gmsh's cross-platform graphical user interface is based on FLTK and OpenGL.
- Gmsh's high quality vector PostScript, PDF and SVG output is produced by GL2PS.
- Gmsh implements a ONELAB server to drive external solvers such as the open source finite element solver GetDP. Gmsh and GetDP are bundled in the ONELAB app for iPhone, iPad and Android devices.

## References

Gmsh

- C. Geuzaine and J.-F. Remacle. Gmsh: a three-dimensional finite element mesh generator with built-in pre- and post-processing facilities. International Journal for Numerical Methods in Engineering 79(11), pp. 1309-1331, 2009.

Cross-patch and STL meshing (Compounds)

- J.-F. Remacle, C. Geuzaine, G. Compère and E. Marchandise. High-quality surface remeshing using harmonic maps. International Journal for Numerical Methods in Engineering 83(4), pp. 403-425, 2010.
- E. Marchandise, C. Carton de Wiart, W. G. Vos, C. Geuzaine and J.-F. Remacle. High quality surface remeshing using harmonic maps. Part II: surfaces with high genus and of large aspect ratio. International Journal for Numerical Methods in Engineering 86(11), pp. 1303-1321, 2011.
- E. Marchandise, J.-F. Remacle and C. Geuzaine. Optimal parametrizations for surface remeshing. Engineering with Computers, December 2012, pp. 1-20.

Quad meshing

- J.-F. Remacle, J. Lambrechts, B. Seny, E. Marchandise, A. Johnen and C. Geuzaine. Blossom-Quad: a non-uniform quadrilateral mesh generator using a minimum cost perfect matching algorithm. International Journal for Numerical Methods in Engineering 89, pp. 1102-1119, 2012.
- J.-F. Remacle, F. Henrotte, T. Carrier-Baudouin, E. Béchet, E. Marchandise, C. Geuzaine and T. Mouton. A frontal Delaunay quad mesh generator using the L∞ norm. International Journal for Numerical Methods in Engineering, 94(5), pp. 494-512, 2013.

High-order meshing

- A. Johnen, J.-F. Remacle and C. Geuzaine. Geometric validity of curvilinear finite elements. Journal of Computational Physics 233, pp. 359-372, 2013.
- A. Johnen, J.-F. Remacle and C. Geuzaine. Geometric validity of high-Order triangular finite elements. Engineering with Computers 30 (3), pp. 375-382, 2014.
- T. Toulorge, C. Geuzaine, J.-F. Remacle, J. Lambrechts. Robust untangling of curvilinear meshes. Journal of Computational Physics 254, pp. 8-26, 2013.

High-order visualization

- J.-F. Remacle, N. Chevaugeon, E. Marchandise and C. Geuzaine. Efficient visualization of high-order finite elements. International Journal for Numerical Methods in Engineering 69(4), pp. 750-771, 2007.

Homology solver

- M. Pellikka, S. Suuriniemi, L. Kettunen and C. Geuzaine. Homology and cohomology computation in finite element modeling. SIAM Journal on Scientific Computing 35(5), pp. 1195-1214, 2013.