1.5 What Gmsh is pretty good at …
Gmsh is a (relatively) small program, and was principally developed “in
academia, to solve academic problems”… Nevertheless, over the
years, many people outside universities have found Gmsh useful in their
day-to-day jobs. Here is a tentative list of what Gmsh does best:
-
quickly describe simple and/or “repetitive” geometries, thanks to
user-defined functions, loops, conditionals and includes (see
User-defined functions, Loops and conditionals, and General commands);
-
parametrize these geometries. Gmsh's scripting language enables all
commands and command arguments to depend on previous calculations (see
Expressions, and Geometry commands);
-
import complex models in industry-standard formats like STEP or IGES
(when Gmsh is built with OpenCascade support);
-
generate 1D, 2D and 3D simplicial (i.e., using line segments, triangles
and tetrahedra) finite element meshes (see Mesh module, and
Tutorial);
-
specify target element sizes accurately. Gmsh provides several
mechanisms to control the size of the elements in the final mesh:
through interpolation from sizes specified at geometry points or using
flexible mesh size fields (see section Mesh commands);
-
create simple extruded geometries and meshes (see Geometry commands,
and Mesh commands);
-
interact with external solvers. Gmsh provides C, C++, Perl and Python
interfaces, and others can be easily added (see section Solver module);
-
visualize computational results in a great variety of ways. Gmsh can display
scalar, vector and tensor data sets, and can perform various operations on
the resulting post-processing views (see section Post-processing module);
-
export plots in many different formats: vector PostScript or encapsulated
PostScript, LaTeX, PNG, JPEG, … (see section General options);
-
generate complex animations (see General tools, and ‘t8.geo’);
-
run on low end machines and/or machines with no graphical
interface. Gmsh can be compiled with or without the GUI, and all
versions can be used either interactively or directly from the command
line (see section Running Gmsh);
-
configure your preferred options. Gmsh has a large number of configuration
options that can be set interactively using the GUI, scattered inside
command files, changed on the fly in scripts, set in per-user configuration
files, or specified on the command-line (see General options,
Geometry options, Mesh options, Post-processing options,
and Running Gmsh);
-
and do all the above on various platforms (Windows, Mac and Unix), for free
(see section Copying conditions), using clear-text ASCII files and/or a small
but powerful graphical user interface.