Copyright © 1998-2001
J.-F. Remacle
C. Geuzaine
Gmsh

a three-dimensional finite element mesh generator with pre- and post-processing facilities

Version 1.00

General Description Gmsh is an automatic three-dimensional finite element mesh generator, primarily Delaunay, with built-in pre- and post-processing facilities. Its primal goal is to provide a simple meshing tool for academic test cases with parametric input and up to date visualization capabilities. One of the strengths of Gmsh is its ability to respect a characteristic length field for the generation of adapted meshes on lines, surfaces and volumes. These adapted meshes can be mixed with simple structured (transfinite, elliptic, etc.) meshes in order to augment the flexibility.
Geometrical Entity Definition Parameterized geometries are created by successively defining points, oriented curves (segments, circles, ellipsis, splines, etc.), oriented surfaces (plane surfaces, ruled surfaces, etc.) and volumes. Compound groups of geometrical entities can be defined, based on these elementary parameterized geometric entities. Data can be defined either interactively thanks to the menu system, or directly in the ASCII input files.
Mesh Generation A finite element mesh is a tessellation of a given subset of R^3 by elementary geometrical elements of various shapes (in this case lines, triangles, quadrangles, tetrahedra, prisms and hexahedra), arranged in such a way that two of them intersect, if they do, along a common face, edge or node, and never otherwise. All the finite element meshes produced by Gmsh as unstructured, even if they were generated in a structured way. This implies that the elementary geometrical elements are defined only by an ordered list of their vertices (which allows the orientation of all their lower order geometrical entities) but no predefined relation is assumed between any two elementary elements.

The procedure follows the same order as for the geometry creation: curves are discretized first; the mesh of the curves is then used to mesh the surfaces; then the mesh of the surfaces is used to mesh the volumes. This automatically assures the continuity of the mesh when, for example, two surfaces share a common curve. Every meshing step is constrained by the characteristic length field, which can be uniform, specified by characteristic length associated to elementary geometrical entities, or associated to another mesh (the background mesh).

For each meshing step (i.e. the discretization of lines, surfaces and volumes), all structured mesh directives are executed first, and serve as additional constraints for the unstructured parts. The implemented Delaunay algorithm is subdivided in the following five steps for surface/volume discretization:

  1. trivial meshing of a box including the convex polygon/polyhedron defined by the boundary nodes resulting from the discretization of the curves/surfaces;
  2. creation of the initial mesh by insertion of all the nodes on the curves/surfaces thanks to the Bowyer algorithm;
  3. boundary restoration to force all the edges/faces of the curves/surfaces to be present in the initial mesh;
  4. suppression of all the unwanted triangles/tetrahedra (in particular those containing the nodes of the initial box);
  5. insertion of new nodes by the Bowyer algorithm until the characteristic size of each simplex is lower or equal to the characteristic length field evaluated at the center of its circumscribed circle/sphere.

Scalar and Vector Field Visualization

Multiple post-processing scalar or vector maps can be loaded and manipulated (globally or individually) along with the geometry and the mesh. Scalar fields are represented by iso-value curves or color maps and vector fields by three-dimensional arrows or displacement maps. Post-processor functions include offsets, elevation, interactive color map modification, range clamping, interactive and scriptable animation, vector postscript output, etc. All post-processing options can be accessed either interactively or through the the input ascii files.
Documentation Online tutorial and file formats description.
Download
Stable Release: Version 1.00 (January 1, 2001)

The stable release of GMSH is available for most classical UNIX platforms. All executables (no source distribution is available for the moment) are dynamically linked with OpenGL and Motif. You should have these libraries installed on your system, and in the path of the library loader. Free replacements for OpenGL and Motif can be found at http://mesa3d.sourceforge.net and http://www.lesstif.org. (Linux RPMs are directly available here: Mesa-3.2-2.i386.rpm, lesstif-0.91.4-1.i386.rpm.)

Remember that you may have to reconfigure the loader (ldconfig under Linux) or modify the LD_LIBRARY_PATH (or SHLIB_PATH on HP) in order for Gmsh to find these libraries.

Development Release: --

Short term: exact arithmetic in critical sections of the code to improve stability; replacement of Motif by FLTK to unify Unix/Windows development;

Middle term: further uncoupling of geometry and mesh code;

Long term: encapsulation of proprietary algorithms into dynamically loadable modules and release of source code for all other parts; standardize API with these modules; STEP parser?

What's new New in 1.00: Added PPM and YUV output; Corrected nested If/Endif; Corrected several bugs for pixel output and enhanced GIF output (dithering, transparency); Slightly changed the post-processing file format to allow both single and double precision numbers.

New in 0.999: Added JPEG output and easy MPEG generation (see t8.geo in the tutorial); Clean up of export functions; small fixes; Linux versions are now compiled with gcc 2.95.2, which should fix the problems encountered with Mandrake 7.2;

New in 0.998: Corrected bug introduced in 0.997 in the generation of the initial 3D mesh;

New in 0.997: Corrected bug in interactive surface/volume selection; Added interactive symmetry; Corrected geometrical extrusion with rotation in degenerated or partially degenerated cases; Corrected bug in 2D mesh when meshing in the mean plane;

New in 0.996: Arrays of variables; Enhanced Printf and Sprintf; Simplified options (suppression of option arrays).

New in 0.995:

  • Totally rewritten geometrical database (performance has been drastically improved for all geometrical transformations, and most notably for extrusion). As a consequence, the internal numbering of geometrical entities has changed: this will cause incompatibilities with old .geo files, and will require a partial rewrite of your old .geo files if these files made use of geometrical transformations. The syntax of the .geo file has also been clarified. Many additions for scripting purposes.
  • New extrusion mesh generator. Preliminary version of the coupling between extruded and Delaunay meshes.
  • New option and procedural database. All interactive operations can be scripted in the input files. See the last example in the tutorial for an example.
  • Many stability enhancements in the 2D and 3D mesh algorithms. Performance boost of the 3D algorithm. Gmsh is still slow, but the performance becomes acceptable. An average 1000 tetrahedra/second is obtained on a 600Mhz computer for a mesh of one million tetrahedra.
  • New anisotropic 2D mesh algorithm.
  • New (ascii and binary) post-processing file format and clarified mesh file format.
  • New handling for interactive rotations (trackball mode).
  • New didactic interactive mesh construction (watch the Delaunay algorithm in real time on complex geometries: that's exciting ;-)
  • And many, many bug fixes and cleanings...

New in 0.992: corrected recombined extrusion; corrected ellipses; added simple automatic animation of post-processing maps; fixed various bugs.

New in 0.991: fixed a serious allocation bug in 2D algorithm, which caused random crashes. All users should upgrade to 0.991.

New in 0.990: bug fix in non-recombined 3D transfinite meshes.

New in 0.989: added ability to reload previously saved meshes; some new command line options; reorganization of the scale menu; GIF output.

New in 0.987: fixed bug with smoothing (leading to the possible generation of erroneous 3d meshes); corrected bug for mixed 3D meshes; moved the 'toggle view link' option to Opt->Postprocessing_Options.

New in 0.986: fixed overlay problems; SGI version should now also run on 32 bits machines; fixed small 3d mesh bug.

New in 0.985: corrected colormap bug on HP, SUN, SGI and IBM versions; corrected small initialization bug in postscript output.

New in 0.984: corrected bug in display lists; added some options in Opt->General.

New in 0.983: corrected some seg faults in interactive mode; corrected bug in rotations; changed default window sizes for better match with 1024x768 screens (default X resources can be changed: see ex03.geo).

New in 0.982: lighting for mesh and post-processing; corrected 2nd order mesh on non plane surfaces; added example 13.

Problems / Performance
  • If something goes wrong, it is likely because some libraries are not properly installed on your system. Try 'ldd gmsh-name' to check all shared libraries dependencies. Warning: HP version is reported not to work with native OpenGL -> install Mesa instead.
  • If, when moving the mouse over the graphic window, everything that is drawn on it disappears, and each item is visible only when the cursor is directly over it, you should start Gmsh with the '-noov' command line option. (This will be fixed.)
  • Turn double buffering off (with the -nodb command line option) when working on a remote host with Mesa.
  • Try display lists (-dl option) when working with big post-processing data sets.
  • Disable opaque move in your window manager to prevent multiple expose events when an option window partially hides the graphical window.
Authors Gmsh is developed by Jean-François Remacle and Christophe Geuzaine. Feel free to contact us to send bugs, remarks or nice pictures you achieved with Gmsh (we'll put them on the web site).
Gallery Some pictures made with Gmsh:
Links Check out GetDP, a scientific computation software for the numerical solution of integro-differential equations, using finite element and integral type methods.