GMSH
GMSH
GMSH
13 May 2017
Christophe Geuzaine
Jean-Francois Remacle
Copyright
c 1997-2017 Christophe Geuzaine, Jean-Francois Remacle
Permission is granted to make and distribute verbatim copies of this manual provided the
copyright notice and this permission notice are preserved on all copies.
i
Short Contents
Obtaining Gmsh . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
Copying conditions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
2 How to read this reference manual? . . . . . . . . . . . . . . . . . . . . . . . 9
3 Running Gmsh on your system . . . . . . . . . . . . . . . . . . . . . . . . . 11
4 General tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
5 Geometry module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
6 Mesh module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
7 Solver module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
8 Post-processing module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
9 File formats . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103
A Tutorial . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121
B Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 151
C Compiling the source code . . . . . . . . . . . . . . . . . . . . . . . . . . . . 231
D Information for developers . . . . . . . . . . . . . . . . . . . . . . . . . . . . 235
E Frequently asked questions . . . . . . . . . . . . . . . . . . . . . . . . . . . . 237
F Version history . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 245
G Copyright and credits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 261
H License . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 265
Concept index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 273
Syntax index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 275
iii
Table of Contents
Obtaining Gmsh . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
Copying conditions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
1.1 Geometry: geometrical entity definition . . . . . . . . . . . . . . . . . . . . . . . . . 5
1.2 Mesh: finite element mesh generation . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
1.3 Solver: external solver interface. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
1.4 Post-processing: scalar, vector and tensor field visualization . . . . . 6
1.5 What Gmsh is pretty good at . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
1.6 . . . and what Gmsh is not so good at . . . . . . . . . . . . . . . . . . . . . . . . . . 7
1.7 Bug reports . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
4 General tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
4.1 Comments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
4.2 Expressions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
4.2.1 Floating point expressions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
4.2.2 Character expressions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
4.2.3 Color expressions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
4.3 Operators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
4.4 Built-in functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
4.5 User-defined macros . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
4.6 Loops and conditionals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
4.7 General commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
4.8 General options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
iv Gmsh 3.0
5 Geometry module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
5.1 Geometry commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
5.1.1 Points. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
5.1.2 Lines. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
5.1.3 Surfaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
5.1.4 Volumes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
5.1.5 Extrusions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
5.1.6 Boolean operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
5.1.7 Transformations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
5.1.8 Miscellaneous . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
5.2 Geometry options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
6 Mesh module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
6.1 Choosing the right unstructured algorithm . . . . . . . . . . . . . . . . . . . . 45
6.2 Elementary vs. physical entities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
6.3 Mesh commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
6.3.1 Specifying mesh element sizes . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
6.3.2 Structured grids . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
6.3.3 Miscellaneous . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
6.4 Mesh options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
7 Solver module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
7.1 Solver options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
8 Post-processing module . . . . . . . . . . . . . . . . . . . . . . . 71
8.1 Post-processing commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72
8.2 Post-processing plugins . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76
8.3 Post-processing options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102
Obtaining Gmsh
The source code and various pre-compiled versions of Gmsh (for Windows, Mac and Unix)
can be downloaded from http://gmsh.info. Gmsh is also directly available in pre-packaged
form in various Linux and BSD distributions (Debian, Ubuntu, FreeBSD, ...).
If you use Gmsh, we would appreciate that you mention it in your work by citing the
following paper: 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, Volume 79, Issue 11, pages 1309-1331, 2009. A preprint
of that paper as well as other references and the latest news about Gmsh development are
available on http://gmsh.info.
Copying conditions 3
Copying conditions
Gmsh is free software; this means that everyone is free to use it 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, but these restrictions are designed to permit everything that a good
cooperating citizen would want to do. What is not allowed is to try to prevent others from
further sharing any version of Gmsh that they might get from you.
Specifically, we want to make sure that you have the right to give away copies of Gmsh,
that you receive source code or else can get it if you want it, that you can change Gmsh or
use pieces of Gmsh in new free programs, and that you know you can do these things.
To make sure that everyone has such rights, we have to forbid you to deprive anyone else of
these rights. For example, if you distribute copies of Gmsh, you must give the recipients all
the rights that you have. You must make sure that they, too, receive or can get the source
code. And you must tell them their rights.
Also, for our own protection, we must make certain that everyone finds out that there is
no warranty for Gmsh. If Gmsh is modified by someone else and passed on, we want their
recipients to know that what they have is not what we distributed, so that any problems
introduced by others will not reflect on our reputation.
The precise conditions of the license for Gmsh are found in the General Public
License that accompanies the source code (see Appendix H [License], page 265).
Further information about this license is available from the GNU Project webpage
http://www.gnu.org/copyleft/gpl-faq.html. Detailed copyright information can be
found in Appendix G [Copyright and credits], page 261.
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 different license. Please
contact us directly for more information.
Chapter 1: Overview 5
1 Overview
Gmsh is a three-dimensional 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. All ge-
ometrical, mesh, solver and post-processing instructions are prescribed either interactively
using the graphical user interface (GUI) or in text files using Gmshs own scripting lan-
guage. Interactive actions generate language bits in the input files, and vice versa. This
makes it possible to automate all treatments, using loops, conditionals and external system
calls. A brief description of the four modules is given hereafter.
prescribes the desired size of the elements in the mesh. This size field can be uniform,
specified by values associated with points in the geometry, or defined by general fields
(for example related to the distance to some boundary, to a arbitrary scalar field defined
on another mesh, etc.).
For each meshing step, all structured mesh directives are executed first, and serve as addi-
tional constraints for the unstructured parts1 .
geometry points or using flexible mesh size fields (see Section 6.3 [Mesh commands],
page 47);
create simple extruded geometries and meshes (see Section 5.1 [Geometry commands],
page 35, and Section 6.3 [Mesh commands], page 47);
interact with external solvers through a simple client-server architecture (see Chapter 7
[Solver module], page 69);
visualize and export computational results in a great variety of ways. Gmsh can display
scalar, vector and tensor datasets, perform various operations on the resulting post-
processing views (see Chapter 8 [Post-processing module], page 71), can export plots
in many different formats (see Section B.1 [General options list], page 151), and can
generate complex animations (see Chapter 4 [General tools], page 21, and Section A.8
[t8.geo], page 135);
run on low end machines and/or machines with no graphical interface. Gmsh can
be compiled with or without the GUI (see Appendix C [Compiling the source code],
page 231), and all versions can be used either interactively or directly from the com-
mand line (see Chapter 3 [Running Gmsh on your system], page 11);
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 Chapter 3 [Running Gmsh on your system], page 11 and Appendix B [Options],
page 151);
and do all the above on various platforms (Windows, Mac and Unix), for free (see
[Copying conditions], page 3), using simple script files and/or a small but powerful
GUI.
operation system (see Section 3.3 [Command-line options], page 12 to see how to get this
information).
See Appendix E [Frequently asked questions], page 237, and the bug tracking system to see
which problems we already know about.
Chapter 2: How to read this reference manual? 9
Note that all the options specified interactively can also be directly specified in the script
files. You can save the current options of the current active model with the File->Save
Model Options. This will create a new option file with the same filename as the active
model, but with an extra .opt extension added. The next time you open this model, the
associated options will be automatically loaded, too. To save the current options as your
default preferences for all future Gmsh sessions, use the File->Save Options As Default
menu instead. Finally, you can also save the current options in an arbitrary file by choosing
the Gmsh options format in File->Export.
For more information about available options (and how to reset them to their default values),
see Appendix B [Options], page 151. A full list of options with their current values is also
available in the Help->Current Options menu.
-, -parse_and_exit
Parse input files, then exit
-new Create new model before merge next file
-merge Merge next files
-open Open next files
-a, -g, -m, -s, -p
Start in automatic, geometry, mesh, solver or post-processing mode
-pid Print process id on stdout
-watch pattern
Pattern of files to merge as they become available
-bg file Load background (image or PDF) file
-v int Set verbosity level
-nopopup Dont popup dialog windows in scripts
-string "string"
Parse command string at startup
-setnumber name value
Set constant number name=value
-setstring name value
Set constant string name=value
-option file
Parse option file at startup
-convert files
Convert files into latest binary formats, then exit
-cpu Report CPU times for all operations
-version Show version number
-info Show detailed version information
-help Show command line usage
Ctrl+Left button
Start a lasso zoom or a lasso (un)selection
Middle button
- Zoom
- Unselect an entity
- Accept a lasso zoom or a lasso unselection
Ctrl+Middle button
Orthogonalize display
Right button
- Pan
- Cancel a lasso zoom or a lasso (un)selection
- Pop-up menu on post-processing view button
Ctrl+Right button
Reset to default viewpoint
For a 2 button mouse, Middle button = Shift+Left button.
For a 1 button mouse, Middle button = Shift+Left button, Right button = Alt+Left button.
Shift+Ctrl+j
Save options as default
Shift+Ctrl+m
Show manipulator window
Shift+Ctrl+n
Show option window
Shift+Ctrl+o
Merge file(s)
Shift+Ctrl+u
Show plugin window
Shift+Ctrl+v
Show visibility window
Alt+a Loop through axes modes
Alt+b Hide/show bounding boxes
Alt+c Loop through predefined color schemes
Alt+e Hide/Show element outlines for visible post-pro views
Alt+f Change redraw mode (fast/full)
Alt+h Hide/show all post-processing views
Alt+i Hide/show all post-processing view scales
Alt+l Hide/show geometry lines
Alt+m Toggle visibility of all mesh entities
Alt+n Hide/show all post-processing view annotations
Alt+o Change projection mode (orthographic/perspective)
Alt+p Hide/show geometry points
Alt+r Loop through range modes for visible post-pro views
Alt+s Hide/show geometry surfaces
Alt+t Loop through interval modes for visible post-pro views
Alt+v Hide/show geometry volumes
Alt+w Enable/disable all lighting
Alt+x Set X view
Alt+y Set Y view
Alt+z Set Z view
Alt+Shift+a
Hide/show small axes
Alt+Shift+b
Hide/show mesh volume faces
Chapter 3: Running Gmsh on your system 19
Alt+Shift+c
Loop through predefined colormaps
Alt+Shift+d
Hide/show mesh surface faces
Alt+Shift+l
Hide/show mesh lines
Alt+Shift+p
Hide/show mesh points
Alt+Shift+s
Hide/show mesh surface edges
Alt+Shift+t
Same as Alt+t, but with numeric mode included
Alt+Shift+v
Hide/show mesh volume edges
Alt+Shift+x
Set -X view
Alt+Shift+y
Set -Y view
Alt+Shift+z
Set -Z view
Chapter 4: General tools 21
4 General tools
This chapter describes the general commands and options that can be used in Gmshs script
files. By general, we mean not specifically related to one of the geometry, mesh, solver
or post-processing modules. Commands peculiar to these modules will be introduced in
Chapter 5 [Geometry module], page 35, Chapter 6 [Mesh module], page 45, Chapter 7
[Solver module], page 69, and Chapter 8 [Post-processing module], page 71, respectively.
4.1 Comments
Gmsh script files support both C and C++ style comments:
1. any text comprised between /* and */ pairs is ignored;
2. the rest of a line after a double slash // is ignored.
These commands wont have the described effects inside double quotes or inside keywords.
Also note that white space (spaces, tabs, new line characters) is ignored inside all expres-
sions.
4.2 Expressions
The two constant types used in Gmsh scripts are real and string (there is no integer type).
These types have the same meaning and syntax as in the C or C++ programming languages.
FileExists(char-expression ) |
StringToName(char-expression ) | S2N(char-expression ) |
GetNumber(char-expression <,expression >) |
GetValue("string ", expression ) |
DefineNumber(expression, onelab-options ) |
Such expressions are used in most of Gmshs scripting commands. When ~{expression }
is appended to a string string, the result is a new string formed by the concatenation of
string, _ (an underscore) and the value of the expression. This is most useful in loops (see
Section 4.6 [Loops and conditionals], page 28), where it permits to define unique strings
automatically. For example,
For i In {1:3}
x~{i} = i;
EndFor
is the same as
x_1 = 1;
x_2 = 2;
x_3 = 3;
The brackets [] permit to extract one item from a list (parentheses can also be used instead
of brackets). The # permits to get the size of a list. The operators operator-unary-left,
operator-unary-right, operator-binary, operator-ternary-left and operator-ternary-right are
defined in Section 4.3 [Operators], page 25. For the definition of built-in-functions, see
Section 4.4 [Built-in functions], page 27. The various real-options are listed in Appendix B
[Options], page 151. Find searches for occurrences of the first expression in the second
(both of which can be lists). StrFind searches the first char-expression for any occurrence
of the second char-expression. StrCmp compares the two strings (returns an integer greater
than, equal to, or less than 0, according as the first string is greater than, equal to, or less
than the second string). StrCmp returns the length of the string. TextAttributes creates
attributes for text strings. Exists checks if a variable with the given name exists (i.e.,
has been defined previously), and FileExists checks if the file with the given name exists.
StringToName creates a name from the provided string. GetNumber allows to get the value
of a ONELAB variable (the optional second argument is the default value returned if the
variable does not exist). GetValue allows to ask the user for a value interactively (the
second argument is the value returned in non-interactive mode). For example, inserting
GetValue("Value of parameter alpha?", 5.76) in an input file will query the user for
the value of a certain parameter alpha, assuming the default value is 5.76. If the option
General.NoPopup is set (see Section B.1 [General options list], page 151), no question is
asked and the default value is automatically used.
DefineNumber allows to define a ONELAB variable in-line. The expression given as the
first argument is the default value; this is followed by the various ONELAB options. See
http://onelab.info/wiki/ONELAB_Syntax_for_Gmsh_and_GetDP for more information.
List of expressions are also widely used, and are defined as:
expression-list :
expression-list-item <, expression-list-item > ...
with
Chapter 4: General tools 23
expression-list-item :
expression |
expression : expression |
expression : expression : expression |
string [ ] | string ( ) |
List [ string ] |
List [ expression-list-item ] |
List [ { expression-list } ] |
Unique [ expression-list-item ] |
Abs [ expression-list-item ] |
ListFromFile [ expression-char ] |
LinSpace[ expression, expression, expression ] |
LogSpace[ expression, expression, expression ] |
string [ { expression-list } ] |
Point { expression } |
transform |
extrude |
boolean |
Point { expression } |
<Physical> Point|Line|Surface|Volume "*" |
Point|Line|Surface|Volume In BoundingBox { expression-list } |
Physical Point|Line|Surface|Volume { expression-list }
The second case in this last definition permits to create a list containing the range of numbers
comprised between two expressions, with a unit incrementation step. The third case also
permits to create a list containing the range of numbers comprised between two expressions,
but with a positive or negative incrementation step equal to the third expression. The
fourth, fifth and sixth cases permit to reference an expression list (parentheses can also be
used instead of brackets). Unique sorts the entries in the list and removes all duplicates.
Abs takes the absolute value of all entries in the list. ListFromFile reads a list of numbers
from a file. LinSpace and LogSpace construct lists using linear or logarithmic spacing.
The next two cases permit to reference an expression sublist (whose elements are those
corresponding to the indices provided by the expression-list). The next two cases permit to
retrieve the indices of entities created through geometrical transformations and extrusions
(see Section 5.1.7 [Transformations], page 42, and Section 5.1.5 [Extrusions], page 40). The
last three cases permit to retrieve the coordinates of a given geometry point (see Section 5.1.1
[Points], page 35), to retrieve the id numbers of all points, lines, surfaces or volumes in the
model, or to retrieve the elementary entities making up physical groups.
To see the practical use of such expressions, have a look at the first couple of examples in
Appendix A [Tutorial], page 121. Note that, in order to lighten the syntax, you can omit
the braces {} enclosing an expression-list if this expression-list only contains a single item.
Also note that a braced expression-list can be preceded by a minus sign in order to change
the sign of all the expression-list-items.
"string " |
string | string [ expression ] |
Today | OnelabAction | GmshExecutableName |
CurrentDirectory | CurrentDir
StrPrefix ( char-expression ) |
StrRelative ( char-expression ) |
StrCat ( char-expression <,...> ) |
Str ( char-expression <,...> ) |
StrChoice ( expression, char-expression, char-expression ) |
StrSub( char-expression, expression, expression ) |
StrSub( char-expression, expression ) |
UpperCase ( char-expression ) |
AbsolutePath ( char-expression ) |
DirName ( char-expression ) |
Sprintf ( char-expression , expression-list ) |
Sprintf ( char-expression ) |
Sprintf ( char-option ) |
GetEnv ( char-expression ) |
GetString ( char-expression <,char-expression >) |
GetStringValue ( char-expression , char-expression ) |
StrReplace ( char-expression , char-expression , char-expression )
NameToString ( string ) | N2S ( string ) |
DefineString(char-expression, onelab-options )
Today returns the current date. OnelabAction returns the current ONELAB action (e.g.
check or compute). GmshExecutableName returns the full path of the Gmsh executable.
CurrentDirectory and CurrentDir return the directory of the .geo file. StrPrefix and
StrRelative permit to take the prefix (e.g. to remove the extension) or the relative path
of a file name. StrCat and Str permit to concatenate character expressions (Str adds a
newline character after each string except the last). StrChoice returns the first or second
char-expression depending on the value of expression. StrSub returns the portion of the
string that starts at the character position given by the first expression and spans the
number of characters given by the second expression or until the end of the string (whichever
comes first; or always if the second expression is not provided). UpperCase converts the
char-expression to upper case. AbsolutePath returns the absolute path of a file. DirName
returns the directory of a file. Sprintf is equivalent to the sprintf C function (where
char-expression is a format string that can contain floating point formatting characters: %e,
%g, etc.) The various char-options are listed in Appendix B [Options], page 151. GetEnvThe
gets the value of an environment variable from the operating system. GetString allows to
get a ONELAB string value (the second optional argument is the default value returned if
the variable does not exist). GetStringValue asks the user for a value interactively (the
second argument is the value used in non-interactive mode). StrReplaces arguments are:
input string, old substring, new substring (brackets can be used instead of parentheses in
Str and Sprintf). NameToString converts a variable name into a string.
DefineString allows to define a ONELAB variable in-line. The char-expression given as
the first argument is the default value; this is followed by the various ONELAB options. See
http://onelab.info/wiki/ONELAB_Syntax_for_Gmsh_and_GetDP for more information.
Chapter 4: General tools 25
Character expressions are mostly used to specify non-numeric options and input/output file
names. See Section A.8 [t8.geo], page 135, for an interesting usage of char-expressions in
an animation script.
List of character expressions are defined as:
char-expression-list :
char-expression <,...>
4.3 Operators
Gmshs operators are similar to the corresponding operators in C and C++. Here is the list
of the unary, binary and ternary operators currently implemented.
operator-unary-left:
- Unary minus.
! Logical not.
operator-unary-right:
++ Post-incrementation.
-- Post-decrementation.
operator-binary:
^ Exponentiation.
* Multiplication.
/ Division.
% Modulo.
+ Addition.
- Subtraction.
26 Gmsh 3.0
== Equality.
!= Inequality.
> Greater.
< Less.
|| Logical or. (Warning: the logical or always implies the evaluation of both
arguments. That is, unlike in C or C++, the second operand of || is evaluated
even if the first one is true).
operator-ternary-left:
operator-ternary-right:
The evaluation priorities are summarized below1 (from stronger to weaker, i.e., * has a
highest evaluation priority than +). Parentheses () may be used anywhere to change the
order of evaluation:
1. (), [], ., #
2. ^
3. !, ++, --, - (unary)
4. *, /, %
5. +, -
6. <, >, <=, >=
7. ==, !=
8. &&
9. ||
10. ?:
11. =, +=, -=, *=, /=
1
The affectation operators are introduced in Section 4.7 [General commands], page 29.
Chapter 4: General tools 27
Rand ( expression )
Random number between zero and expression.
Round ( expression )
Rounds expression to the nearest integer.
Sqrt ( expression )
Square root of expression (expression >= 0).
Sin ( expression )
Sine of expression.
Sinh ( expression )
Hyperbolic sine of expression.
Tan ( expression )
Tangent of expression.
Tanh ( expression )
Hyperbolic tangent of expression.
string -= expression ;
Subtracts and affects expression to an existing expression identifier.
string *= expression ;
Multiplies and affects expression to an existing expression identifier.
string /= expression ;
Divides and affects expression to an existing expression identifier.
string += { expression-list };
Appends expression-list to an existing expression list or creates a new expression
list with expression-list.
string -= { expression-list };
Removes the items in expression-list from the existing expression list.
string [ { expression-list } ] += { expression-list };
Adds and affects, item per item, the right hand side expression-list to an existing
expression list identifier. Parentheses can also be used instead of brackets.
string [ { expression-list } ] -= { expression-list };
Subtracts and affects, item per item, the right hand side expression-list to
an existing expression list identifier. Parentheses can also be used instead of
brackets.
string [ { expression-list } ] *= { expression-list };
Multiplies and affects, item per item, the right hand side expression-list to
an existing expression list identifier. Parentheses can also be used instead of
brackets.
string [ { expression-list } ] /= { expression-list };
Divides and affects, item per item, the right hand side expression-list to an ex-
isting expression list identifier. Parentheses can also be used instead of brackets.
string = char-expression ;
Creates a new character expression identifier string with a given
char-expression.
string [] = Str( char-expression-list ) ;
Creates a new character expression list identifier string with a given char-
expression-list. Parentheses can also be used instead of brackets.
string [] += Str( char-expression-list ) ;
Appends a character expression list to an existing list. Parentheses can also be
used instead of brackets.
DefineConstant[ string = expression |char-expression <, ...>];
Creates a new expression identifier string, with value expression, only if has not
been defined before.
DefineConstant[ string = { expression |char-expression, onelab-options } <,
...>];
Same as the previous case, except that the variable is also exchanged
with the ONELAB database if it has not been defined before. See
32 Gmsh 3.0
Merge char-expression ;
Merges a file named char-expression. This command is equivalent to the File-
>Merge menu in the GUI. If the path in char-expression is not absolute, char-
expression is appended to the path of the current file.
ShapeFromFile( char-expression );
Merges a BREP or STEP file and returns the identification numbers of the
highest-dimensional entities. Only available with the OpenCASCADE geome-
try kernel.
Draw; Redraws the scene.
SetChanged;
Force the mesh and post-processing vertex arrays to be regenerated. Useful e.g.
for creating animations with changing clipping planes, etc.
BoundingBox;
Recomputes the bounding box of the scene (which is normally computed only
after new geometrical entities are added or after files are included or merged).
The bounding box is computed as follows:
1. If there is a mesh (i.e., at least one mesh vertex), the bounding box is taken
as the box enclosing all the mesh vertices;
2. If there is no mesh but there is a geometry (i.e., at least one geometrical
point), the bounding box is taken as the box enclosing all the geometrical
points;
3. If there is no mesh and no geometry, but there are some post-processing
views, the bounding box is taken as the box enclosing all the primitives in
the views.
BoundingBox { expression, expression, expression, expression, expression,
expression };
Forces the bounding box of the scene to the given expressions (X min, X max,
Y min, Y max, Z min, Z max).
Delete Model;
Deletes the current model (all geometrical entities and their associated meshes).
Delete Physicals;
Deletes all physical groups.
Delete Variables;
Deletes all the expressions.
Delete Options;
Deletes the current options and revert to the default values.
Delete string ;
Deletes the expression string.
Print char-expression ;
Prints the graphic window in a file named char-expression, using the current
Print.Format (see Section B.1 [General options list], page 151). If the path in
34 Gmsh 3.0
5 Geometry module
Gmshs geometry module provides a simple CAD engine, using a boundary representation
(BRep) approach: you need to first define points (using the Point command: see below),
then lines (using Line, Circle, Spline, . . . , commands or by extruding points), then
surfaces (using for example the Plane Surface or Surface commands, or by extruding
lines), and finally volumes (using the Volume command or by extruding surfaces).
These geometrical entities are called elementary in Gmshs jargon, and are assigned iden-
tification numbers (stricly positive) when they are created:
1. each elementary point must possess a unique identification number;
2. each elementary line must possess a unique identification number;
3. each elementary surface must possess a unique identification number;
4. each elementary volume must possess a unique identification number.
Elementary geometrical entities can then be manipulated in various ways, for example
using the Translate, Rotate, Scale or Symmetry commands. They can be deleted with
the Delete command, provided that no higher-dimension entity references them. Zero or
negative identification numbers are reserved by the system for special uses: do not use them
in your scripts.
Groups of elementary geometrical entities can also be defined and are called physical enti-
ties. These physical entities cannot be modified by geometry commands: their only purpose
is to assemble elementary entities into larger groups, possibly modifying their orientation,
so that they can be referred to by the mesh module as single entities. As is the case with
elementary entities, each physical point, physical line, physical surface or physical volume
must be assigned a unique identification number. See Chapter 6 [Mesh module], page 45,
for more information about how physical entities affect the way meshes are saved.
5.1.1 Points
Point ( expression ) = { expression, expression, expression <, expression > };
Creates an elementary point. The expression inside the parentheses is the
points identification number; the three first expressions inside the braces on
the right hand side give the three X, Y and Z coordinates of the point in
the three-dimensional Euclidean space; the optional last expression sets the
prescribed mesh element size at that point. See Section 6.3.1 [Specifying mesh
element sizes], page 47, for more information about how this value is used in
the meshing process.
36 Gmsh 3.0
5.1.2 Lines
Line ( expression ) = { expression, expression };
Creates a straight line segment. The expression inside the parentheses is the
line segments identification number; the two expressions inside the braces on
the right hand side give identification numbers of the start and end points of
the segment.
Bezier ( expression ) = { expression-list };
Creates a Bezier curve. The expression-list contains the identification numbers
of the control points.
BSpline ( expression ) = { expression-list };
Creates a BSpline. The expression-list contains the identification numbers of
the control points. BSplines are currently only available with the built-in kernel.
Spline ( expression ) = { expression-list };
Creates a spline going through the points in expression-list. With the built-in
geometry kernel this constructs a Catmull-Rom spline. With the OpenCAS-
CADE kernel, this constructs a BSpline passing through the points with a given
tolerance.
Circle ( expression ) = { expression, expression, expression <, ...> };
Creates a circle arc. The three expressions on the right-hand-side define the
start point, the center and the end point of the arc. With the built-in geometry
kernel the arc should be strictly smaller than Pi. With the OpenCASCADE ker-
nel additional expressions can be provided to define a full circle (4th expression
is the radius) or a circle arc between two angles (next 2 expressions).
Ellipse ( expression ) = { expression, expression, expression, expression <,
...> };
Creates an ellipse arc. The four expressions on the right-hand-side define the
start point, the center point, a major axis point and the end point of the
ellipse. The third point can be omitted with the OpenCASCADE kernel. With
the OpenCASCADE kernel additional expressions can be provided to define a
full ellipse (4th and 5th expressions define the radii along X and Y) or en ellipse
arc (next 2 expressions).
Line Loop ( expression ) = { expression-list };
Creates an oriented line loop. The expression inside the parentheses is the line
loops identification number; the expression-list on the right hand side should
Chapter 5: Geometry module 37
contain the identification numbers of all the elementary lines that constitute the
line loop. A line loop must be a closed loop, and the elementary lines should be
ordered and oriented (using negative identification numbers to specify reverse
orientation). If the orientation is correct, but the ordering is wrong, Gmsh will
actually reorder the list internally to create a consistent loop. Although Gmsh
supports it, it is not recommended to specify multiple line loops (or subloops)
in a single Line Loop command. (Line loops are used to create surfaces: see
Section 5.1.3 [Surfaces], page 37.)
5.1.3 Surfaces
Plane Surface ( expression ) = { expression-list };
Creates a plane surface. The expression inside the parentheses is the plane
surfaces identification number; the expression-list on the right hand side should
contain the identification numbers of all the line loops defining the surface. The
first line loop defines the exterior boundary of the surface; all other line loops
define holes in the surface. A line loop defining a hole should not have any lines
in common with the exterior line loop (in which case it is not a hole, and the
two surfaces should be defined separately). Likewise, a line loop defining a hole
should not have any lines in common with another line loop defining a hole in
the same surface (in which case the two line loops should be combined).
38 Gmsh 3.0
5.1.4 Volumes
Volume ( expression ) = { expression-list };
Creates a volume. The expression inside the parentheses is the volumes iden-
tification number; the expression-list on the right hand side should contain the
identification numbers of all the surface loops defining the volume. The first
surface loop defines the exterior boundary of the volume; all other surface loops
define holes in the volume. A surface loop defining a hole should not have any
surfaces in common with the exterior surface loop (in which case it is not a hole,
and the two volumes should be defined separately). Likewise, a surface loop
defining a hole should not have any surfaces in common with another surface
loop defining a hole in the same volume (in which case the two surface loops
should be combined).
Sphere ( expression ) = { expression-list };
Creates a sphere, defined by the 3 coordinates of its center and a radius. Ad-
ditional expressions define 3 angle limits. Sphere is only available with the
OpenCASCADE kernel.
Block ( expression ) = { expression-list };
Creates a block, defined by the 3 coordinates of a point and the 3 extents. Block
is only available with the OpenCASCADE kernel.
Cylinder ( expression ) = { expression-list };
Creates a cylinder, defined by the 3 coordinates of the center of the first cir-
cular face and the 3 components of the vector defining its axis. An additional
expression defines the angular opening. Cylinder is only available with the
OpenCASCADE kernel.
Torus ( expression ) = { expression-list };
Creates a torus, defined by the 3 coordinates of its center and 2 radii. An
additional expression defines the angular opening. Torus is only available with
the OpenCASCADE kernel.
Cone ( expression ) = { expression-list };
Creates a cone, defined by the 3 coordinates of the center of the first circular
face, the 3 components of the vector defining its axis and the two radii of the
faces (these radii can be zero). An additional expression defines the angular
opening. Cone is only available with the OpenCASCADE kernel.
Wedge ( expression ) = { expression-list };
Creates a right angular wedge, defined by the 3 coordinates of the right-angle
point and the 3 extends. An additional parameter defines the top X extent
(zero by default). Wedge is only available with the OpenCASCADE kernel.
ThruSections ( expression ) = { expression-list };
Creates a volume defined through line loops. ThruSections is only available
with the OpenCASCADE kernel.
40 Gmsh 3.0
5.1.5 Extrusions
Lines, surfaces and volumes can also be created through extrusion of points, lines and
surfaces, respectively. Here is the syntax of the geometrical extrusion commands (go to
Section 6.3.2 [Structured grids], page 63, to see how these commands can be extended in
order to also extrude the mesh):
extrude:
Extrude { expression-list } { extrude-list }
Extrudes all elementary entities (points, lines or surfaces) in extrude-list using
a translation. The expression-list should contain three expressions giving the
X, Y and Z components of the translation vector.
Extrude { { expression-list }, { expression-list }, expression } {
extrude-list }
Extrudes all elementary entities (points, lines or surfaces) in extrude-list using
a rotation. The first expression-list should contain three expressions giving the
X, Y and Z direction of the rotation axis; the second expression-list should
contain three expressions giving the X, Y and Z components of any point on
this axis; the last expression should contain the rotation angle (in radians).
Extrude { { expression-list }, { expression-list }, { expression-list },
expression } { extrude-list }
Extrudes all elementary entities (points, lines or surfaces) in extrude-list us-
ing a translation combined with a rotation (to produce a twist). The first
expression-list should contain three expressions giving the X, Y and Z compo-
nents of the translation vector; the second expression-list should contain three
Chapter 5: Geometry module 41
expressions giving the X, Y and Z direction of the rotation axis, which should
match the direction of the translation; the third expression-list should contain
three expressions giving the X, Y and Z components of any point on this axis;
the last expression should contain the rotation angle (in radians).
Extrude { extrude-list }
Extrudes entities in extrude-list using a translation along their normal. Only
available with the built-in geometry kernel.
Extrude { extrude-list } Using Wire { expression-list }
Extrudes entities in extrude-list along the give wire. Only available with the
OpenCASCADE geometry kernel.
ThruSections { expression-list }
Creates surfaces through the given line loops or wires. ThruSection are only
available with the OpenCASCADE kernel.
Ruled ThruSections { expression-list }
Creates ruled surfaces through the given line loops or wires. ThruSections are
only available with the OpenCASCADE kernel.
Fillet { expression-list } { expression-list } { expression }
Fillets volumes (first list) on some edges (second list), using the provided radius.
Fillet is only available with the OpenCASCADE kernel.
with
extrude-list :
Point | Line | Surface { expression-list }; ...
As explained in Section 4.2.1 [Floating point expressions], page 21, extrude can be used in
an expression, in which case it returns a list of identification numbers. By default, the list
contains the top of the extruded entity at index 0 and the extruded entity at index 1,
followed by the sides of the extruded entity at indices 2, 3, etc. For example:
Point(1) = {0,0,0};
Point(2) = {1,0,0};
Line(1) = {1, 2};
out[] = Extrude{0,1,0}{ Line{1}; };
Printf("top line = %g", out[0]);
Printf("surface = %g", out[1]);
Printf("side lines = %g and %g", out[2], out[3]);
This behaviour can be changed with the Geometry.ExtrudeReturnLateralEntities op-
tion (see Section B.2 [Geometry options list], page 179).
with
boolean-list :
Line | Surface | Volume { expression-list }; ... |
Delete ;
If Delete is specified in the boolean-list, the tool and/or the object is deleted.
As explained in Section 4.2.1 [Floating point expressions], page 21, boolean can be used
in an expression, in which case it returns the list of identification numbers of the highest
dimensional entities created by the boolean operation. See demos/boolean for examples.
An alternative syntax exists for boolean operations, which can be used when it is known
beforehand that the operation will result in a single (highest-dimensional) entity:
boolean-explicit:
5.1.7 Transformations
Geometrical transformations can be applied to elementary entities, or to copies of elemen-
tary entities (using the Duplicata command: see below). The syntax of the transformation
commands is:
transform:
5.1.8 Miscellaneous
Here is a list of all other geometry commands currently available:
Coherence;
Removes all duplicate elementary geometrical entities (e.g., points having iden-
tical coordinates). Note that Gmsh executes the Coherence command automat-
44 Gmsh 3.0
6 Mesh module
Gmshs mesh module regroups several 1D, 2D and 3D meshing algorithms, all producing
grids conforming in the sense of finite elements (see Section 1.2 [Mesh], page 5):
The 2D unstructured algorithms generate triangles or both triangles and quadrangles
(when Recombine Surface is used: see Section 6.3.3 [Miscellaneous mesh commands],
page 65). The 3D unstructured algorithms generate tetrahedra.
The 2D structured algorithms (transfinite and extrusion) generate triangles by default,
but quadrangles can be obtained by using the Recombine commands (see Section 6.3.2
[Structured grids], page 63, and Section 6.3.3 [Miscellaneous mesh commands], page 65).
The 3D structured algorithms generate tetrahedra, hexahedra, prisms and pyramids,
depending on the type of the surface meshes they are based on.
All meshes can be subdivided to generate fully quadrangular or fully hexahedral meshes
with the Mesh.SubdivisionAlgorihm option (see Section B.3 [Mesh options list], page 187).
However, beware that the quality of subdivided elements initially generated with an un-
structured algorithm can be quite poor.
The purpose of physical entities is to assemble elementary entities into larger, possibly
overlapping groups, and to control the orientation of the elements in these groups. The
introduction of physical entities in large models usually greatly facilitates the manipulation
of the model (e.g., using Tools->Visibility in the GUI) and the interfacing with external
solvers.
In the MSH file format (see Chapter 9 [File formats], page 103), if physical entities are
defined, the output mesh only contains those elements that belong to physical entities.
Other file formats each treat physical entities in slightly different ways, depending on their
capability to define groups.
In all cases, Gmsh reindexes the mesh vertices and elements so that they are numbered in
a continuous sequence in the output files. Note that the numbers displayed on screen after
mesh generation thus usually differ from the ones saved in the mesh files. To check the
actual numbers saved in the output file just load the file back using File->Open.
used, since the mesh used to define the field will be destroyed during the meshing
process).
(Note that you can also load a background mesh directly from the command line
using the -bgm option (see Section 3.3 [Command-line options], page 12), or in the
GUI by selecting Apply as background mesh in the post-processing view option
menu.)
A Box field specifies the size of the elements inside and outside of a parallelepipedic
region.
A Threshold field specifies the size of the mesh according to the distance to some
geometrical entities. These entities can for example be geometry points and lines
specified by an Attractor field.
A MathEval field specifies the size of the mesh using an explicit mathematical
function.
A Min field specifies the size as the minimum of the sizes computed using other
fields
...
Fields are supported by all the algorithms except those based on Netgen. The list of
available fields with their options is given below.
The three aforementioned methods can be used simultaneously, in which case the smallest
element size is selected at any given point.
All element sizes are further constrained by the Mesh.CharacteristicLengthMin,
Mesh.CharacteristicLengthMax and Mesh.CharacteristicLengthFactor options (see
Section B.3 [Mesh options list], page 187)
Here are the mesh commands that are related to the specification of mesh element sizes:
Characteristic Length { expression-list } = expression ;
Modify the prescribed mesh element size of the points whose identification num-
bers are listed in expression-list. The new value is given by expression.
Field[expression ] = string ;
Create a new field (with id number expression), of type string.
Field[expression ].string = char-expression | expression | expression-list ;
Set the option string of the expression-th field.
Background Field = expression ;
Select the expression-th field as the one used to compute element sizes. Only
one background field can be given; if you want to combine several field, use the
Min or Max field (see below).
Here is the list of all available fields with their associated options:
Attractor
Compute the distance from the nearest node in a list. It can also be used to
compute the distance from curves, in which case each curve is replaced by NN-
odesByEdge equidistant nodes and the distance from those nodes is computed.
Options:
Chapter 6: Mesh module 49
EdgesList
Indices of curves in the geometric model
type: list
default value: {}
FacesList
Indices of surfaces in the geometric model (Warning, this feature is
still experimental. It might (read: will probably) give wrong results
for complex surfaces)
type: list
default value: {}
FieldX Id of the field to use as x coordinate.
type: integer
default value: -1
FieldY Id of the field to use as y coordinate.
type: integer
default value: -1
FieldZ Id of the field to use as z coordinate.
type: integer
default value: -1
NNodesByEdge
Number of nodes used to discretized each curve
type: integer
default value: 20
NodesList
Indices of nodes in the geometric model
type: list
default value: {}
AttractorAnisoCurve
Compute the distance from the nearest curve in a list. Then the mesh size
can be specified independently in the direction normal to the curve and in
the direction parallel to the curve (Each curve is replaced by NNodesByEdge
equidistant nodes and the distance from those nodes is computed.)
Options:
EdgesList
Indices of curves in the geometric model
type: list
default value: {}
NNodesByEdge
Number of nodes used to discretized each curve
type: integer
default value: 20
50 Gmsh 3.0
dMax Maxmium distance, above this distance from the curves, prescribe
the maximum mesh sizes.
type: float
default value: 0.5
dMin Minimum distance, bellow this distance from the curves, prescribe
the minimum mesh sizes.
type: float
default value: 0.1
lMaxNormal
Maximum mesh size in the direction normal to the closest curve.
type: float
default value: 0.5
lMaxTangent
Maximum mesh size in the direction tangeant to the closest curve.
type: float
default value: 0.5
lMinNormal
Minimum mesh size in the direction normal to the closest curve.
type: float
default value: 0.05
lMinTangent
Minimum mesh size in the direction tangeant to the closest curve.
type: float
default value: 0.5
Ball The value of this field is VIn inside a spherical ball, VOut outside. The ball is
defined by
Radius Radius
type: float
default value: 0
VIn Value inside the ball
type: float
default value: 0
VOut Value outside the ball
type: float
default value: 0
XCenter X coordinate of the ball center
type: float
default value: 0
Chapter 6: Mesh module 51
AnisoMax Threshold angle for creating a mesh fan in the boundary layer
type: float
default value: 10000000000
EdgesList
Indices of curves in the geometric model for which a boundary layer
is needed
type: list
default value: {}
FanNodesList
Indices of vertices in the geometric model for which a fan is created
type: list
default value: {}
IntersectMetrics
Intersect metrics of all faces
type: integer
default value: 0
NodesList
Indices of vertices in the geometric model for which a BL ends
type: list
default value: {}
Quads Generate recombined elements in the boundary layer
type: integer
default value: 0
hfar Element size far from the wall
type: float
default value: 1
hwall_n Mesh Size Normal to the The Wall
type: float
default value: 0.1
hwall_n_nodes
Mesh Size Normal to the The Wall at nodes (overwrite hwall n
when defined)
52 Gmsh 3.0
Curvature
Compute the curvature of Field[IField]:
F = div(norm(grad(Field[IField])))
Options:
Radius Radius
type: float
default value: 0
VIn Value inside the cylinder
type: float
default value: 0
VOut Value outside the cylinder
type: float
default value: 0
XAxis X component of the cylinder axis
type: float
default value: 0
XCenter X coordinate of the cylinder center
type: float
default value: 0
YAxis Y component of the cylinder axis
type: float
default value: 0
YCenter Y coordinate of the cylinder center
type: float
default value: 0
54 Gmsh 3.0
{
if (xyz[0] != xyz[0]) break; //nan
double f = 0.001 + 0.009 * xyz[1];
write(STDOUT FILENO, &f, sizeof(double));
}
return 0;
}
Options:
CommandLine
Command line to launch.
type: string
default value: ""
Frustum This field is an extended cylinder with inner (i) and outer (o) radiuseson both
endpoints (1 and 2). Length scale is bilinearly interpolated betweenthese loca-
tions (inner and outer radiuses, endpoints 1 and 2)The field values for a point
P are given by : u = P1P.P1P2/||P1P2|| r = || P1P - u*P1P2 || Ri =
(1-u)*R1i + u*R2i Ro = (1-u)*R1o + u*R2o v = (r-Ri)/(Ro-Ri) lc = (1-v)*(
(1-u)*v1i + u*v2i ) + v*( (1-u)*v1o + u*v2o ) where (u,v) in [0,1]x[0,1]
Options:
FieldsList
Field indices
type: list
default value: {}
Laplacian
Compute finite difference the Laplacian of Field[IField]:
F = G(x+d,y,z) + G(x-d,y,z) +
G(x,y+d,z) + G(x,y-d,z) +
G(x,y,z+d) + G(x,y,z-d) - 6 * G(x,y,z),
F = Field[IField](atan(y/x), asin(z/sqrt(x^2+y^2+z^2))
Options:
FromStereo
if = 1, the mesh is in stereographic coordinates. xi = 2Rx/(R+z),
eta = 2Ry/(R+z)
type: integer
default value: 0
58 Gmsh 3.0
FieldsList
Field indices
type: list
default value: {}
MaxEigenHessian
Compute the maximum eigenvalue of the Hessian matrix of Field[IField], with
the gradients evaluated by finite differences:
F = max(eig(grad(grad(Field[IField]))))
Options:
F = (G(x+delta,y,z) + G(x-delta,y,z) +
G(x,y+delta,z) + G(x,y-delta,z) +
G(x,y,z+delta) + G(x,y,z-delta) +
G(x,y,z)) / 7,
where G=Field[IField]
Options:
FieldsList
Field indices
type: list
default value: {}
MinAniso Take the intersection of a list of possibly anisotropic fields.
Options:
60 Gmsh 3.0
FieldsList
Field indices
type: list
default value: {}
Octree Pre compute another field on an octree to speed-up evalution
Options:
F = Field[IField](FX,FY,FZ)
See the MathEval Field help to get a description of valid FX, FY and FZ
expressions.
Options:
CropNegativeValues
return LC MAX instead of a negative value (this option is needed
for backward compatibility with the BackgroundMesh option
type: boolean
default value: 1
IView Post-processing view index
type: integer
default value: 0
Restrict Restrict the application of a field to a given list of geometrical points, curves,
surfaces or volumes.
Chapter 6: Mesh module 61
Options:
EdgesList
Curve indices
type: list
default value: {}
FacesList
Surface indices
type: list
default value: {}
IField Field index
type: integer
default value: 1
RegionsList
Volume indices
type: list
default value: {}
VerticesList
Point indices
type: list
default value: {}
Structured
Linearly interpolate between data provided on a 3D rectangular structured grid.
Ox Oy Oz
Dx Dy Dz
nx ny nz
v(0,0,0) v(0,0,1) v(0,0,2) ...
v(0,1,0) v(0,1,1) v(0,1,2) ...
v(0,2,0) v(0,2,1) v(0,2,2) ...
... ... ...
v(1,0,0) ... ...
where O are the coordinates of the first node, D are the distances between nodes
in each direction, n are the numbers of nodes in each direction, and v are the
values on each node.
Options:
OutsideValue
Value of the field outside the grid (only used if the "SetOutside-
Value" option is true).
type: float
default value: 0
SetOutsideValue
True to use the "OutsideValue" option. If False, the last values of
the grid are used.
type: boolean
default value: 0
TextFormat
True for ASCII input files, false for binary files (4 bite signed inte-
gers for n, double precision floating points for v, D and O)
type: boolean
default value: 0
Threshold
F = LCMin if Field[IField] <= DistMin,
F = LCMax if Field[IField] >= DistMax,
F = interpolation between LcMin and LcMax if DistMin < Field[IField] < Dist-
Max
Options:
DistMax Distance from entity after which element size will be LcMax
type: float
default value: 10
StopAtDistMax
True to not impose element size outside DistMax (i.e., F = a very
big value if Field[IField] > DistMax)
type: boolean
default value: 0
In some rare cases, due to certain lateral boundary conditions, it may not be
possible make a valid element subdivision with QuadTriNoNewVerts without
adding additional vertices. In this case, an internal vertex is created at the
vertex-based centroid of the element. The element is then divided using that
vertex. When an internal vertex is created with QuadTriNoNewVerts, the user
is alerted by a warning message sent for each instance; however, the mesh will
still be valid and conformal.
Both QuadTriNoNewVerts and QuadTriAddVerts can be used with the optional
RecombLaterals keyword. By default, the QuadTri algorithms will mesh any
free laterals as triangles, if possible. RecombLaterals forces any free laterals
to remain as quadrangles, if possible. Lateral surfaces between two QuadTri
regions will always be meshed as quadrangles.
Note that the QuadTri algorithms will handle all potential meshing conflicts
along the lateral surfaces of the extrusion. In other words, QuadTri will not
subdivide a lateral that must remain as quadrangles, nor will it leave a lateral
as quadrangles if it must be divided. The user should therefore feel free to mix
different types of neighboring regions with a QuadTri meshed region; the mesh
should work. However, be aware that the top surface of the QuadTri extrusion
will always be meshed as triangles, unless it is extruded back onto the original
source in a toroidal loop (a case which also works with QuadTri).
QuadTriNoNewVerts and QuadTriAddVerts may be used interchangeably, but
QuadTriAddVerts often gives better element quality.
If the user wishes to interface a structured extrusion to a tetrahedral volume
without modifying the original structured mesh, the user may create dedicated
interface volumes around the structured geometry and apply a QuadTri algo-
rithm to those volumes only.
Extrude { { expression-list }, { expression-list }, expression } {
extrude-list layers }
Extrudes both the geometry and the mesh using a rotation (see Section 5.1.5
[Extrusions], page 40). The layers option is defined as above.
Extrude { { expression-list }, { expression-list }, { expression-list },
expression } { extrude-list layers }
Extrudes both the geometry and the mesh using a combined translation and
rotation (see Section 5.1.5 [Extrusions], page 40). The layers option is defined
as above.
Extrude { Surface { expression-list }; layers < Using Index[expr ]; > < Using
View[expr ]; > < ScaleLastLayer; > }
Extrudes a boundary layer from the specified surfaces. If no view is speci-
fied, the boundary layer is created using gouraud-shaped (smoothed) normal
field. Specifying a boundary layer index allows to extrude several independent
boundary layers (with independent normal smoothing).
ScaleLastLayer scales the height of the last (top) layer of each normals extru-
sion by the average length of the edges in all the source elements that contain
the source vertex (actually, the average of the averages for each elementedges
actually touching the source vertex are counted twice). This allows the height
Chapter 6: Mesh module 65
of the last layer to vary along with the size of the source elements in order
to achieve better element quality. For example, in a boundary layer extruded
with the Layers definition Layers{ {1,4,2}, {0.5, 0.6, 1.6} }, a source vertex
adjacent to elements with an overall average edge length of 5.0 will extrude to
have a last layer height = (1.6-0.6) * 5.0 = 5.0.
6.3.3 Miscellaneous
Here is a list of all other mesh commands currently available:
Mesh expression ;
Generates expression-D mesh.
66 Gmsh 3.0
RefineMesh;
Refines the current mesh by splitting all elements. If Mesh.SecondOrderLinear
is set, the new vertices are inserted by linear interpolatinon. Otherwise they
are snapped on the actual geometry.
OptimizeMesh char-expression ;
Optimizes the current mesh with the given algorithm (currently "Gmsh" or
"Netgen").
AdaptMesh { expression-list } { expression-list } { { expression-list < , ... >
} };
Performs adaptive mesh generation. Documentation not yet available.
RelocateMesh Point | Line | Surface { expression-list } | "*";
Relocates the mesh vertices on the given entities using the parametric coordi-
nates stored in the vertices. Useful for creating perturbation of meshes e.g. for
sensitivity analyzes.
SetOrder expression ;
Changes the order of the elements in the current mesh.
PartitionMesh expression ;
Partitions the mesh into expression, using current partitioning options.
Point | Line { expression-list } In Surface { expression };
Embed the point(s) or line(s) in the given surface. The surface mesh will
conform to the mesh of the point(s) or lines(s).
Surface { expression-list } In Volume { expression };
Embed the surface in the given volume. The volume mesh will conform to the
mesh of the surface.
Periodic Line { expression-list } = { expression-list } ;
Force mesh of lines on the left-hand side (slaves) to match the mesh of the lines
on the right-hand side (masters).
Periodic Surface expression { expression-list } = expression { expression-list
};
Force mesh of the surface on the left-hand side (slave, with boundary edges
specified between braces) to match the mesh of the surface on the right-hand
side (master, with boundary edges specified between braces).
Periodic Line | Surface { expression-list } = { expression-list } Affine |
Rotate | Translate { expression-list } ;
Force mesh of lines or surfaces on the left-hand side (slaves) to match the mesh
of the lines on the right-hand side (masters), using prescribed geometrical trans-
formations. Affine takes a 4 x 4 affine transform matrix given by row; Rotate
and Translate are specified as in Section 5.1.7 [Transformations], page 42.
Coherence Mesh;
Removes all duplicate mesh vertices.
Chapter 6: Mesh module 67
whole mesh is the domain. The third expression-list is a list of physical groups
that constitute the relative subdomain of relative homology computation; if
empty, absolute homology is computed. Resulting basis representation chains
are stored as physical groups in the mesh.
Cohomology ( { expression-list } ) { { expression-list } , { expression-list }
};
Similar to command Homology, but computes a basis representation for coho-
mology spaces instead.
7 Solver module
External solvers can be driven by Gmsh through the ONELAB http://www.onelab.info
interface. To add a new solver in the solver module, you need to specify its
name (Solver.Name0, Solver.Name1, etc.) and the path to the executable
(Solver.Executable0, Solver.Executable1, etc.); see Section B.4 [Solver options list],
page 205).
The client-server API for the solver interface is defined in the onelab.h header.
See utils/solvers/c++/solver.cpp for a simple example on how to use the ONELAB
programming interface. See the sources of GetDP (http://getdp.info for a more
comprehensive example.
8 Post-processing module
Gmshs post-processing module can handle multiple scalar, vector or tensor datasets along
with the geometry and the mesh. The datasets can be given in several formats: in human-
readable parsed format (these are just part of a standard input script, but are usually
put in separate files with a .pos extension), in native MSH files (ASCII or binary files
with .msh extensions: see Chapter 9 [File formats], page 103), or in standard third-party
formats (like MED: http://www.code-aster.org/outils/med/).
Once loaded into Gmsh, scalar fields can be displayed as iso-value lines and surfaces or
color maps, whereas vector fields can be represented either by three-dimensional arrows
or by displacement maps. (Tensor fields are currently displayed as Von-Mises effective
stresses, min/max eigenvalues, eigenvectors, ellipsis or ellipsoid. To display other (combi-
nations of) components, you can use the Force scalar or Force vector options, or use
Plugin(MathEval): see Section 8.2 [Post-processing plugins], page 76.)
In Gmshs jargon, each dataset is called a view. Each view is given a name, and can
be manipulated either individually (each view has its own button in the GUI and can be
referred to by its index in a script) or globally (see the PostProcessing.Link option in
Section B.5 [Post-processing options list], page 210).
By default, Gmsh treats all post-processing views as three-dimensional plots, i.e., draws
the scalar, vector and tensor primitives (points, lines, triangles, tetrahedra, etc.) in 3D
space. But Gmsh can also represent each post-processing view containing scalar points as
two-dimensional (X-Y) plots, either space- or time-oriented:
in a 2D space plot, the scalar points are taken in the same order as they are defined
in the post-processing view: the abscissa of the 2D graph is the curvilinear abscissa
of the curve defined by the point series, and only one curve is drawn using the values
associated with the points. If several time steps are available, each time step generates
a new curve;
in a 2D time plot, one curve is drawn for each scalar point in the view and the abscissa
is the time step.
Although visualization is usually mostly an interactive task, Gmsh exposes all the post-
processing commands and options to the user in its scripting language to permit a complete
automation of the post-processing process (see e.g., Section A.8 [t8.geo], page 135, and
Section A.9 [t9.geo], page 138).
The two following sections summarize all available post-processing commands and options.
Most options apply to both 2D and 3D plots (colormaps, point/line sizes, interval types,
time step selection, etc.), but some are peculiar to 3D (lightning, element selection, etc.) or
2D plots (abscissa labels, etc.). Note that 2D plots can be positioned explicitly inside the
graphical window, or be automatically positioned in order to avoid overlaps.
Sample post-processing files in human-readable parsed format and in the native MSH
file format are available in the tutorial directory of Gmshs distribution (.pos and .msh
files). The parsed format is defined in the next section (cf. the View command); the MSH
format is defined in Chapter 9 [File formats], page 103.
72 Gmsh 3.0
Delete View[expression ];
Deletes (removes) the expression-th post-processing view. Note that post-
processing view numbers start at 0.
Delete Empty Views;
Deletes (removes) all the empty post-processing views.
Background Mesh View[expression ];
Applies the expression-th post-processing view as the current background mesh.
Note that post-processing view numbers start at 0.
Plugin (string ) . Run;
Executes the plugin string. The list of default plugins is given in Section 8.2
[Post-processing plugins], page 76.
Plugin (string ) . string = expression | char-expression ;
Sets an option for a given plugin. See Section 8.2 [Post-processing plugins],
page 76, for a list of default plugins and Section A.9 [t9.geo], page 138, for
some examples.
Save View[expression ] char-expression ;
Saves the the expression-th post-processing view in a file named char-expression.
If the path in char-expression is not absolute, char-expression is appended to
the path of the current file.
View "string " { string < ( expression-list ) > { expression-list }; ... };
Creates a new post-processing view, named "string ". This is an easy and quite
powerful way to import post-processing data: all the values are expressions,
you can embed datasets directly into your geometrical descriptions (see, e.g.,
Section A.4 [t4.geo], page 127), the data can be easily generated on-the-fly
(there is no header containing a priori information on the size of the dataset).
The syntax is also very permissive, which makes it ideal for testing purposes.
However this parsed format is read by Gmshs script parser, which makes
it inefficient if there are many elements in the dataset. Also, there is no con-
nectivity information in parsed views and all the elements are independent (all
fields can be discontinuous), so a lot of information can be duplicated. For
large datasets, you should thus use the mesh-based post-processing file format
described in Chapter 9 [File formats], page 103, or use one of the standard
formats like MED.
More explicitly, the syntax for a parsed View is the following
View "string " {
type ( list-of-coords ) { list-of-values }; ...
< TIME { expression-list }; >
< INTERPOLATION_SCHEME { val-coef-matrix } { val-exp-matrix }
< { geo-coef-matrix } { geo-exp-matrix } > ; >
};
where the 47 object types that can be displayed are:
type #list-of-coords #list-of-values
--------------------------------------------------------------------
Scalar point SP 3 1 * nb-time-steps
74 Gmsh 3.0
lower bits give the font size, whose eight next bits select the font (the index
corresponds to the position in the font menu in the GUI), and whose eight next
bits define the text alignment (0=bottom-left, 1=bottom-center, 2=bottom-
right, 3=top-left, 4=top-center, 5=top-right, 6=center-left, 7=center-center,
8=center-right).
For the 3D text objects, the three first expressions in list-of-coords give the XYZ
position of the string in model (real world) coordinates. The fourth expression
has the same meaning as the third expression in 2D text objects.
For both 2D and 3D text objects, the list-of-values can contain an arbitrary
number of char-expressions. If the char-expression starts with file://, the
remainder of the string is interpreted as the name of an image file, and the
image is displayed instead of the string. A format string in the form @wxh or
@wxh,wx,wy,wz,hx,hy,hz, where w and h are the width and height (in model
coordinates for T3 or in pixels for T2) of the image, wx,wy,wz is the direction
of the bottom edge of the image and hx,hy,hz is the direction of the left edge
of the image.
The optional TIME list can contain a list of expressions giving the value of the
time (or any other variable) for which an evolution was saved.
The optional INTERPOLATION_SCHEME lists can contain the interpolation matri-
ces used for high-order adaptive visualization.
Let us assume that the approximation of the views value over an element
is written as a linear combination of d basis functions f [i], i=0, ..., d-1 (the
coefficients being stored in list-of-values). Defining f [i] = Sum(j=0, ..., d-1)
F[i][j] p[j], with p[j] = u^P[j][0] v^P[j][1] w^P[j][2] (u, v and w being the
coordinates in the elements parameter space), then val-coef-matrix denotes
the d x d matrix F and val-exp-matrix denotes the d x 3 matrix P.
In the same way, let us also assume that the coordinates x, y and z of the
element are obtained through a geometrical mapping from parameter space as
a linear combination of m basis functions g[i], i=0, ..., m-1 (the coefficients
being stored in list-of-coords). Defining g[i] = Sum(j=0, ..., m-1) G[i][j] q[j],
with q[j] = u^Q[j][0] v^Q[j][1] w^Q[j][2], then val-coef-matrix denotes the m x
m matrix G and val-exp-matrix denotes the m x 3 matrix Q.
Here are for example the interpolation matrices for a first order quadrangle:
INTERPOLATION_SCHEME
{
{1/4,-1/4, 1/4,-1/4},
{1/4, 1/4,-1/4,-1/4},
{1/4, 1/4, 1/4, 1/4},
{1/4,-1/4,-1/4, 1/4}
}
{
{0, 0, 0},
{1, 0, 0},
{0, 1, 0},
{1, 1, 0}
};
76 Gmsh 3.0
Plugin(AnalyseCurvedMesh)
Plugin(AnalyseCurvedMesh) analyse all elements of a given dimension. Accord-
ing to what is asked, it computes the minimum of the Jacobian determinant (J),
of the scaled Jacobian and/or of the isotropy measure. Statistics are printed
and if asked a Pview is created for each measure. The plugin hides elements for
which the measure mu > Hidding threshold, where mu is the isotropy measure
if asked otherwise the scaled Jacobian if asked otherwise the Jacobian determi-
nant.
J is faster to compute but gives informations only on validity while the other
measure gives also informations on quality.
Warning: the scaled Jacobian is experimental for triangles, tetrahedra, prisms
and pyramids. Computation may take a lot of time for those elements!
Parameters:
- Hidding threshold = [0, 1]: Does nothing if Isotropy == 0 and Scaled Jaco-
bian == 0. Otherwise, hides all element for which min(mu) is strictly greater
than the threshold, where mu is the isotropy if Isotropy == 1, otherwise it is
the Scaled Jacobian. If threshold == 1, no effect, if == 0 hide all elements
except invalid.
Jacobian determinant
Default value: 1
Scaled Jacobian
Default value: 0
Isotropy Default value: 1
Hidding threshold
Default value: 9
Draw PView
Default value: 0
Recompute
Default value: 0
Dimension of elements
Default value: -1
Plugin(Annotate)
Plugin(Annotate) adds the text string Text, in font Font and size FontSize,
in the view View. The string is aligned according to Align.
If ConnectPoints is zero, the plugin creates points; otherwise, the plugin gen-
erates hexahedra, quadrangles, lines or points depending on the values of Num-
PointsU, NumPointsV and NumPointsW.
If Boundary is zero, the plugin interpolates the view inside the box; otherwise
the plugin interpolates the view at its boundary.
Plugin(CutGrid)
Plugin(CutGrid) cuts the view View with a rectangular grid defined by the 3
points (X0,Y0,Z0) (origin), (X1,Y1,Z1) (axis of U) and (X2,Y2,Z2)
(axis of V).
The number of points along U and V is set with the options NumPointsU and
NumPointsV.
If ConnectPoints is zero, the plugin creates points; otherwise, the plugin gen-
erates quadrangles, lines or points depending on the values of NumPointsU
and NumPointsV.
Plugin(CutSphere)
Plugin(CutSphere) cuts the view View with the sphere (X-Xc)^2 + (Y-Yc)^2
+ (Z-Zc)^2 = R^2.
If ExtractVolume is nonzero, the plugin extracts the elements inside (if Ex-
tractVolume < 0) or outside (if ExtractVolume > 0) the sphere.
Min Scale and max Scale, scale the distance function. If min Scale<0 and max
Scale<0, then no scaling is applied to the distance function.
Chapter 8: Post-processing module 83
Plugin(Distance) creates a new distance view and also saves the view in the
fileName.pos file. String options:
Filename Default value: "distance.pos"
Numeric options:
PhysPoint
Default value: 0
PhysLine Default value: 0
PhysSurface
Default value: 0
Computation
Default value: -1
MinScale Default value: -1
MaxScale Default value: -1
Orthogonal
Default value: -1
Plugin(Divergence)
Plugin(Divergence) computes the divergence of the field in the view View.
Thickness is the thichness of the flat quadrangles. Set a value different to zero
can be helpfull to check the connectivity.
Prefix is the prefix of the name of physicals containing the new embedded. All
physicals containing embedded lines are replaced by physicals containing the
coresponding joint elements. String options:
Prefix Default value: "FAMI_"
Numeric options:
SurfaceTag
Default value: 1
Thickness
Default value: 0
Plugin(FieldFromAmplitudePhase)
Plugin(FieldFromAmplitudePhase) builds a complex field u from amplitude
a (complex) and phase phi given in two different Views u = a * exp(k*phi),
with k the wavenumber.
If PhysicalGroup is nonzero, the plugin only creates points for the elements
belonging to the group. Numeric options:
Order Default value: 0
Dimension
Default value: 2
PhysicalGroup
Default value: 0
86 Gmsh 3.0
Plugin(Gradient)
Plugin(Gradient) computes the gradient of the field in the view View.
Define physical groups in order to specify the computation domain and the
relative subdomain. Otherwise the whole mesh is the domain and the relative
subdomain is empty.
DimensionOfChainsToSave
Default value: "0, 1, 2, 3"
Filename Default value: "homology.msh"
Numeric options:
ComputeHomology
Default value: 1
ComputeCohomology
Default value: 0
HomologyPhysicalGroupsBegin
Default value: -1
CohomologyPhysicalGroupsBegin
Default value: -1
CreatePostProcessingViews
Default value: 1
ReductionOmit
Default value: 1
ReductionCombine
Default value: 3
PostProcessSimplify
Default value: 1
ReductionHeuristic
Default value: 1
Plugin(HomologyPostProcessing)
Plugin(HomologyPostProcessing) operates on representative basis chains of ho-
mology and cohomology spaces. Functionality:
Options:
PhysicalGroupsToTraceResults: Trace the resulting (co)chains to the given
physical groups.
88 Gmsh 3.0
String options:
TransformationMatrix
Default value: "1, 0; 0, 1"
PhysicalGroupsOfOperatedChains
Default value: "1, 2"
PhysicalGroupsOfOperatedChains2
Default value: ""
PhysicalGroupsToTraceResults
Default value: ""
PhysicalGroupsToProjectResults
Default value: ""
NameForResultChains
Default value: "c"
Numeric options:
ApplyBoundaryOperatorToResults
Default value: 0
Plugin(Integrate)
Plugin(Integrate) integrates a scalar field over all the elements of the view
View (if Dimension < 0), or over all elements of the prescribed dimension (if
Dimension > 0). If the field is a vector field,the circulation/flux of the field
over line/surface elements is calculated.
If OverTime = i > -1 , the plugin integrates the scalar view over time instead
of over space, starting at iteration i.If Visible = 1, the plugin only integrates
overvisible entities.
Plugin(Isosurface)
Plugin(Isosurface) extracts the isosurface of value Value from the view View,
and draws the OtherTimeStep-th step of the view OtherView on this isosur-
face.
If OtherTimeStep < 0, the plugin uses, for each time step in View, the corre-
sponding time step in OtherView. If OtherView < 0, the plugin uses View
as the value source.
If View contains tensor elements, the plugin directly uses the tensors as the
values of the velocity gradient tensor; if View contains vector elements, the
plugin uses them as the velocities from which to derive the velocity gradient
tensor.
In addition to the usual mathematical functions (Exp, Log, Sqrt, Sin, Cos,
Fabs, etc.) and operators (+, -, *, /, ^), all expressions can contain:
- the symbols v0, v1, v2, ..., vn, which represent the n components in View;
- the symbols w0, w1, w2, ..., wn, which represent the n components of
OtherView, at time step OtherTimeStep;
If TimeStep < 0, the plugin extracts data from all the time steps in the view.
InputPhysicalGroup
Default value: 1
OuputDimension
Default value: 0
OuputPhysicalGroup
Default value: 2000
Plugin(MinMax)
Plugin(MinMax) computes the min/max of a view.
If View < 0, the plugin is run on the current view. If OverTime = 1, the
plugin calculates the min/max over space and time. If Argument = 1, the
plugin calculates the min/max and the argmin/argmax. If Visible = 1, the
plugin is only applied to visible entities.
- the usual mathematical functions (Log, Sqrt, Sin, Cos, Fabs, ...) and operators
(+, -, *, /, ^);
- the symbols Time and TimeStep, to retrieve the current time and time step
values;
- the symbols v0, v1, v2, ..., v8, to retrieve each component of the field in View
at the TimeStep-th time step;
- the symbols w0, w1, w2, ..., w8, to retrieve each component of the field in
OtherView at the OtherTimeStep-th time step. If OtherView and View are
based on different spatial grids, or if their data types are different, OtherView
is interpolated onto View.
Chapter 8: Post-processing module 93
If TimeStep < 0, the plugin automatically loops over all the time steps in
View and evaluates the expressions for each one.
Parameters: the wavenumber, the angular discretisation (phi in [0, 2*Pi] and
theta in [0, Pi]) of the far field sphere and the indices of the views containing the
complex-valued E and H fields. If Normalize is set, the far field is normalized
to 1. If dB is set, the far field is computed in dB. If NegativeTime is set,
E and H are assumed to have exp(-iwt) time dependency; otherwise they are
assume to have exp(+iwt) time dependency. If MatlabOutputFile is given the
raw far field data is also exported in Matlab format.
dB Default value: 1
NegativeTime
Default value: 0
RFar Default value: 0
Plugin(NearestNeighbor)
Plugin(NearestNeighbor) computes the distance from each point in View to
its nearest neighbor.
The number of particles along U and V that are to be transported is set with
the options NumPointsU and NumPointsV. The equation
is then solved with the initial conditions X(t=0) chosen as the grid,
dX/dt(t=0)=0, and with F interpolated from the vector view.
Time stepping is done using a Newmark scheme with step size DT and
MaxIter maximum number of iterations.
Z0 Default value: 0
X1 Default value: 1
Y1 Default value: 0
Z1 Default value: 0
X2 Default value: 0
Y2 Default value: 1
Z2 Default value: 0
NumPointsU
Default value: 10
NumPointsV
Default value: 1
A2 Default value: 1
A1 Default value: 0
A0 Default value: 0
DT Default value: 0.1
MaxIter Default value: 100
TimeStep Default value: 0
View Default value: -1
Plugin(Probe)
Plugin(Probe) gets the value of the view View at the point (X,Y,Z).
Plugin(Scal2Vec)
Plugin(Scal2Vec) converts the scalar fields into a vectorial field. The new view
NameNewView contains it. If the number of a view is -1, the value of the
corresponding component of the vector field is 0. String options:
NameNewView
Default value: "NewView"
Numeric options:
ViewX Default value: -1
ViewY Default value: -1
ViewZ Default value: -1
Plugin(ShowNeighborElements)
Plugin(ShowNeighborElements) allows to set visible some given elements and a
layer of elements around them, the other being set invisible. Numeric options:
NumLayers
Default value: 1
Element1 Default value: 0
Element2 Default value: 0
Element3 Default value: 0
Element4 Default value: 0
Element5 Default value: 0
Plugin(SimplePartition)
Plugin(SimplePartition) partitions the current mesh into NumSlices slices,
along the X-, Y- or Z-axis depending on the value of Direction (0,1,2). The
plugin creates partition boundaries if CreateBoundaries is set. String options:
Mapping Default value: "t"
Numeric options:
NumSlices
Default value: 4
Direction
Default value: 0
CreateBoundaries
Default value: 1
Plugin(Skin)
Plugin(Skin) extracts the boundary (skin) of the current mesh (if FromMesh
= 1), or from the the view View (in which case it creates a new view). If
View < 0 and FromMesh = 0, the plugin is run on the current view.
If Visible is set, the plugin only extracts the skin of visible entities. Numeric
options:
Chapter 8: Post-processing module 99
Instead of elevating the nodes along the X, Y and Z axes as with the
View[View].RaiseX, View[View].RaiseY and View[View].RaiseZ options,
the raise is applied along the radius of a sphere centered at (Xc, Yc, Zc).
The plugin takes as input a grid defined by the 3 points (X0,Y0,Z0) (origin),
(X1,Y1,Z1) (axis of U) and (X2,Y2,Z2) (axis of V).
The number of points along U and V that are to be transported is set with the
options NumPointsU and NumPointsV. The equation
100 Gmsh 3.0
dX(t)/dt = V(x,y,z)
is then solved with the initial condition X(t=0) chosen as the grid and with
V(x,y,z) interpolated on the vector view.
The time stepping scheme is a RK44 with step size DT and MaxIter maxi-
mum number of iterations.
If TimeStep < 0, the plugin tries to compute streamlines of the unsteady flow.
Plugin(StreamLines) creates one new view. This view contains multi-step vec-
tor points if OtherView < 0, or single-step scalar lines if OtherView >= 0.
Numeric options:
X0 Default value: 0
Y0 Default value: 0
Z0 Default value: 0
X1 Default value: 1
Y1 Default value: 0
Z1 Default value: 0
X2 Default value: 0
Y2 Default value: 1
Z2 Default value: 0
NumPointsU
Default value: 10
NumPointsV
Default value: 1
DT Default value: 0.1
MaxIter Default value: 100
TimeStep Default value: 0
View Default value: -1
OtherView
Default value: -1
Plugin(Tetrahedralize)
Plugin(Tetrahedralize) tetrahedralizes the points in the view View.
Algorithm
Default value: 0
View Default value: -1
Plugin(Warp)
Plugin(Warp) transforms the elements in the view View by adding to their
node coordinates the vector field stored in the TimeStep-th time step of the
view OtherView, scaled by Factor.
If OtherView < 0, the vector field is taken as the field of surface normals
multiplied by the TimeStep value in View. (The smoothing of the surface
normals is controlled by the SmoothingAngle parameter.)
9 File formats
This chapter describes Gmshs native MSH file format, used to store meshes and associ-
ated post-processing datasets. The MSH format exists in two flavors: ASCII and binary.
The format has a version number (currently: 2.2) that is independent of Gmshs main
version number.
(Remember that for small post-processing datasets you can also use human-readable
parsed post-processing views, as described in Section 8.1 [Post-processing commands],
page 72. Such parsed views do not require an underlying mesh, and can therefore be
easier to use in some cases.)
number-of-elements
elm-number elm-type number-of-tags < tag > ... node-number-list
...
$EndElements
$Periodic
number-of-periodic-entities
dimension slave-entity-tag master-entity-tag
number-of-nodes
slave-node-number master-node-number
...
$EndPeriodic
$NodeData
number-of-string-tags
< "string-tag " >
...
number-of-real-tags
< real-tag >
...
number-of-integer-tags
< integer-tag >
...
node-number value ...
...
$EndNodeData
$ElementData
number-of-string-tags
< "string-tag " >
...
number-of-real-tags
< real-tag >
...
number-of-integer-tags
< integer-tag >
...
elm-number value ...
...
$EndElementData
$ElementNodeData
number-of-string-tags
< "string-tag " >
...
number-of-real-tags
< real-tag >
...
number-of-integer-tags
< integer-tag >
...
Chapter 9: File formats 105
7 5-node pyramid.
8 3-node second order line (2 nodes associated with the vertices and
1 with the edge).
9 6-node second order triangle (3 nodes associated with the vertices
and 3 with the edges).
10 9-node second order quadrangle (4 nodes associated with the ver-
tices, 4 with the edges and 1 with the face).
11 10-node second order tetrahedron (4 nodes associated with the ver-
tices and 6 with the edges).
12 27-node second order hexahedron (8 nodes associated with the ver-
tices, 12 with the edges, 6 with the faces and 1 with the volume).
13 18-node second order prism (6 nodes associated with the vertices,
9 with the edges and 3 with the quadrangular faces).
14 14-node second order pyramid (5 nodes associated with the vertices,
8 with the edges and 1 with the quadrangular face).
15 1-node point.
16 8-node second order quadrangle (4 nodes associated with the ver-
tices and 4 with the edges).
17 20-node second order hexahedron (8 nodes associated with the ver-
tices and 12 with the edges).
18 15-node second order prism (6 nodes associated with the vertices
and 9 with the edges).
19 13-node second order pyramid (5 nodes associated with the vertices
and 8 with the edges).
20 9-node third order incomplete triangle (3 nodes associated with the
vertices, 6 with the edges)
21 10-node third order triangle (3 nodes associated with the vertices,
6 with the edges, 1 with the face)
22 12-node fourth order incomplete triangle (3 nodes associated with
the vertices, 9 with the edges)
23 15-node fourth order triangle (3 nodes associated with the vertices,
9 with the edges, 3 with the face)
24 15-node fifth order incomplete triangle (3 nodes associated with the
vertices, 12 with the edges)
25 21-node fifth order complete triangle (3 nodes associated with the
vertices, 12 with the edges, 6 with the face)
26 4-node third order edge (2 nodes associated with the vertices, 2
internal to the edge)
Chapter 9: File formats 107
value is a real number giving the value associated with a node or an element. For
NodeData (respectively ElementData) views, there are ncomp values per node
(resp. per element), where ncomp is the number of field components. For
ElementNodeData views, there are ncomp times number-of-nodes-per-elements
values per element.
number-of-element-topologies
is the number of element topologies for which interpolation matrices are pro-
vided
elm-topology
is the id tag of a given element topology: 1 for points, 2 for lines, 3 for triangles,
4 for quadrangles, 5 for tetrahedra, 6 for pyramids, 7 for prisms, 8 for hexahedra,
9 for polygons and 10 for polyhedra.
number-of-interpolation-matrices
is the number of interpolation matrices provided for the element topology elm-
topology. Currently you should provide 2 matrices, i.e., the matrices that spec-
ify how to interpolate the data (they have the same meaning as in Section 8.1
[Post-processing commands], page 72). The matrices are specified by 2 integers
(num-rows and num-columns) followed by the values.
Below is a small example (a mesh consisting of two quadrangles with an associated nodal
scalar dataset; the comments are not part of the actual file!):
$MeshFormat
2.2 0 8
$EndMeshFormat
$Nodes
6 six mesh nodes:
1 0.0 0.0 0.0 node #1: coordinates (0.0, 0.0, 0.0)
2 1.0 0.0 0.0 node #2: coordinates (1.0, 0.0, 0.0)
3 1.0 1.0 0.0 etc.
4 0.0 1.0 0.0
5 2.0 0.0 0.0
6 2.0 1.0 0.0
$EndNodes
$Elements
2 two elements:
1 3 2 99 2 1 2 3 4 quad #1: type 3, physical 99, elementary 2, nodes 1 2 3 4
2 3 2 99 2 2 5 6 3 quad #2: type 3, physical 99, elementary 2, nodes 2 5 6 3
$EndElements
$NodeData
1 one string tag:
"A scalar view" the name of the view ("A scalar view")
1 one real tag:
0.0 the time value (0.0)
3 three integer tags:
0 the time step (0; time steps always start at 0)
1 1-component (scalar) field
6 six associated nodal values
1 0.0 value associated with node #1 (0.0)
2 0.1 value associated with node #2 (0.1)
3 0.2 etc.
4 0.0
5 0.2
Chapter 9: File formats 109
6 0.4
$EndNodeData
version-number
is a real number equal to 2.2.
file-type
is an integer equal to 1.
data-size
has the same meaning as in the ASCII file format. Currently only data-size =
sizeof(double) is supported.
one-binary
is an integer of value 1 written in binary form. This integer is used for detecting
if the computer on which the binary file was written and the computer on which
the file is read are of the same type (little or big endian).
Here is a pseudo C code to write one-binary:
int one = 1;
fwrite(&one, sizeof(int), 1, file);
number-of-nodes
has the same meaning as in the ASCII file format.
110 Gmsh 3.0
nodes-binary
is the list of nodes in binary form, i.e., a array of number-of-nodes * (4 + 3 *
data-size) bytes. For each node, the first 4 bytes contain the node number and
the next (3 * data-size) bytes contain the three floating point coordinates.
Here is a pseudo C code to write nodes-binary:
for(i = 0; i < number_of_nodes; i++){
fwrite(&num_i, sizeof(int), 1, file);
double xyz[3] = {node_i_x, node_i_y, node_i_z};
fwrite(xyz, sizeof(double), 3, file);
}
number-of-elements
has the same meaning as in the ASCII file format.
element-header-binary
is a list of 3 integers in binary form, i.e., an array of (3 * 4) bytes: the first
four bytes contain the type of the elements that follow (same as elm-type in the
ASCII format), the next four contain the number of elements that follow, and
the last four contain the number of tags per element (same as number-of-tags
in the ASCII format).
Here is a pseudo C code to write element-header-binary:
int header[3] = {elm_type, num_elm_follow, num_tags};
fwrite(header, sizeof(int), 3, file);
elements-binary
is a list of elements in binary form, i.e., an array of number of elements that
follow * (4 + number-of-tags * 4 + #node-number-list * 4) bytes. For each
element, the first four bytes contain the element number, the next (number-of-
tags * 4) contain the tags, and the last (#node-number-list * 4) contain the
node indices.
Here is a pseudo C code to write elements-binary for triangles with the 2 stan-
dard tags (the physical and elementary regions):
for(i = 0; i < number_of_triangles; i++){
int data[6] = {num_i, physical, elementary,
node_i_1, node_i_2, node_i_3};
fwrite(data, sizeof(int), 6, file);
}
v
^ 2
| | \
2 2 2 9 8
|\ |\ | \ | \
| \ | \ 7 6 10 (14) 7
| \ 5 4 | \ | \
| \ | \ 8 (9) 5 11 (12) (13) 6
| \ | \ | \ | \
0----------1 --> u 0-----3----1 0---3---4---1 0---3---4---5---1
v
^
|
3-----------2 3-----6-----2 3-----6-----2
| | | | | | |
| | | | | | |
| +---- | --> u 7 5 7 8 5
| | | | | |
| | | | | |
0-----------1 0-----4-----1 0-----4-----1
Tetrahedron: Tetrahedron10:
v
.
,/
/
2 2
,/|\ ,/|\
,/ | \ ,/ | \
,/ . \ ,6 . 5
,/ | \ ,/ 8 \
,/ | \ ,/ | \
0-----------.--------1 --> u 0--------4--.--------1
\. | ,/ \. | ,/
\. | ,/ \. | ,9
\. . ,/ 7. . ,/
\. |/ \. |/
3 3
\.
w
112 Gmsh 3.0
v
3----------2 3----13----2 3----13----2
|\ ^ |\ |\ |\ |\ |\
| \ | | \ | 15 | 14 |15 24 | 14
| \ | | \ 9 \ 11 \ 9 \ 20 11 \
| 7------+---6 | 7----19+---6 | 7----19+---6
| | +-- |-- | -> u | | | | |22 | 26 | 23|
0---+---\--1 | 0---+-8----1 | 0---+-8----1 |
\ | \ \ | \ 17 \ 18 \ 17 25 \ 18
\ | \ \ | 10 | 12| 10 | 21 12|
\| w \| \| \| \| \|
4----------5 4----16----5 4----16----5
w
^
|
3 3 3
,/|\ ,/|\ ,/|\
,/ | \ 12 | 13 12 | 13
,/ | \ ,/ | \ ,/ | \
4------+------5 4------14-----5 4------14-----5
| | | | 8 | | 8 |
| ,/|\ | | | | | ,/|\ |
| ,/ | \ | | | | | 15 | 16 |
|,/ | \| | | | |,/ | \|
,| | |\ 10 | 11 10-----17-----11
,/ | 0 | \ | 0 | | 0 |
u | ,/ \ | v | ,/ \ | | ,/ \ |
| ,/ \ | | ,6 7 | | ,6 7 |
|,/ \| |,/ \| |,/ \|
1-------------2 1------9------2 1------9------2
4 4 4
,/|\ ,/|\ ,/|\
,/ .|\ ,/ .|\ ,/ .|\
,/ | | \ ,/ | | \ ,/ | | \
,/ . | . ,/ . | . ,/ . | .
,/ | . \ ,7 | 12 \ ,7 | 12 \
,/ . w | \ ,/ . | \ ,/ . | \
,/ | ^ | \ ,/ 9 | 11 ,/ 9 | 11
0----------.--|-3 . 0--------6-.----3 . 0--------6-.----3 .
\ | | \ \ \ | \ \ \ | \ \
\ . +----\ - \ -> v 5 . 10 \ 5 . 13 10 \
\ | \ \ \ \ | \ \ \ | \ \
\. \ \ \. \ \. \
1----------------2 1--------8-------2 1--------8-------2
\
u
Chapter 9: File formats 113
number-of-elements
is the number of elements in the mesh.
elm-number
is the number (index) of the n-th element in the mesh; elm-number must be a
postive (non-zero) integer. Note that the elm-numbers do not necessarily have
to form a dense nor an ordered sequence.
elm-type defines the geometrical type of the n-th element:
1 2-node line.
2 3-node triangle.
3 4-node quadrangle.
4 4-node tetrahedron.
5 8-node hexahedron.
6 6-node prism.
7 5-node pyramid.
8 3-node second order line (2 nodes associated with the vertices and
1 with the edge).
9 6-node second order triangle (3 nodes associated with the vertices
and 3 with the edges).
10 9-node second order quadrangle (4 nodes associated with the ver-
tices, 4 with the edges and 1 with the face).
11 10-node second order tetrahedron (4 nodes associated with the ver-
tices and 6 with the edges).
12 27-node second order hexahedron (8 nodes associated with the ver-
tices, 12 with the edges, 6 with the faces and 1 with the volume).
13 18-node second order prism (6 nodes associated with the vertices,
9 with the edges and 3 with the quadrangular faces).
14 14-node second order pyramid (5 nodes associated with the vertices,
8 with the edges and 1 with the quadrangular face).
15 1-node point.
16 8-node second order quadrangle (4 nodes associated with the ver-
tices and 4 with the edges).
17 20-node second order hexahedron (8 nodes associated with the ver-
tices and 12 with the edges).
18 15-node second order prism (6 nodes associated with the vertices
and 9 with the edges).
19 13-node second order pyramid (5 nodes associated with the vertices
and 8 with the edges).
Chapter 9: File formats 115
file-type
is an integer equal to 0 in the ASCII file format.
data-size
is an integer equal to the size of the floating point numbers used in the file
(usually, data-size = sizeof(double)).
view-name
is a string containing the name of the view (max. 256 characters).
nb-time-steps
is an integer giving the number of time steps in the view.
nb-scalar-points
nb-vector-points
... are integers giving the number of scalar points, vector points, . . . , in the view.
nb-text2d
nb-text3d
are integers giving the number of 2D and 3D text strings in the view.
Chapter 9: File formats 117
nb-text2d-chars
nb-text3d-chars
are integers giving the total number of characters in the 2D and 3D strings.
time-step-values
is a list of nb-time-steps double precision numbers giving the value of the time
(or any other variable) for which an evolution was saved.
scalar-point-value
vector-point-value
... are lists of double precision numbers giving the node coordinates and the values
associated with the nodes of the nb-scalar-points scalar points, nb-vector-points
vector points, . . . , for each of the time-step-values.
For example, vector-triangle-value is defined as:
coord1-node1 coord1-node2 coord1-node3
coord2-node1 coord2-node2 coord2-node3
coord3-node1 coord3-node2 coord3-node3
comp1-node1-time1 comp2-node1-time1 comp3-node1-time1
comp1-node2-time1 comp2-node2-time1 comp3-node2-time1
comp1-node3-time1 comp2-node3-time1 comp3-node3-time1
comp1-node1-time2 comp2-node1-time2 comp3-node1-time2
comp1-node2-time2 comp2-node2-time2 comp3-node2-time2
comp1-node3-time2 comp2-node3-time2 comp3-node3-time2
...
The ordering of the nodes is given in Section 9.3 [Node ordering], page 110.
text2d is a list of 4 double precision numbers:
coord1 coord2 style index
where coord1 and coord2 give the X-Y position of the 2D string in screen co-
ordinates (measured from the top-left corner of the window) and where index
gives the starting index of the string in text2d-chars. If coord1 (respectively
coord2) is negative, the position is measured from the right (respectively bot-
tom) edge of the window. If coord1 (respectively coord2) is larger than 99999,
the string is centered horizontally (respectively vertically). If style is equal to
zero, the text is aligned bottom-left and displayed using the default font and
size. Otherwise, style is converted into an integer whose eight lower bits give
the font size, whose eight next bits select the font (the index corresponds to
the position in the font menu in the GUI), and whose eight next bits define the
text alignment (0=bottom-left, 1=bottom-center, 2=bottom-right, 3=top-left,
4=top-center, 5=top-right, 6=center-left, 7=center-center, 8=center-right).
text2d-chars
is a list of nb-text2d-chars characters. Substrings are separated with the null
\0 character.
text3d is a list of 5 double precision numbers
coord1 coord2 coord3 style index
118 Gmsh 3.0
where coord1, coord2 and coord3 give the XYZ coordinates of the string in
model (real world) coordinates, index gives the starting index of the string in
text3d-chars, and style has the same meaning as in text2d.
text3d-chars
is a list of nb-text3d-chars chars. Substrings are separated with the null \0
character.
fprintf(file, "$PostFormat\n");
fprintf(file, "%g %d %d\n", 1.4, 1, sizeof(double));
fprintf(file, "$EndPostFormat\n");
fprintf(file, "$View\n");
fprintf(file, "%s %d "
"%d %d %d %d %d %d %d %d %d "
"%d %d %d %d %d %d %d %d %d "
"%d %d %d %d %d %d %d %d %d "
"%d %d %d %d %d %d %d %d %d "
"%d %d %d %d %d %d %d %d %d "
"%d %d %d %d\n",
view-name, nb-time-steps,
nb-scalar-points, nb-vector-points, nb-tensor-points,
nb-scalar-lines, nb-vector-lines, nb-tensor-lines,
nb-scalar-triangles, nb-vector-triangles, nb-tensor-triangles,
nb-scalar-quadrangles, nb-vector-quadrangles, nb-tensor-quadrangles,
nb-scalar-tetrahedra, nb-vector-tetrahedra, nb-tensor-tetrahedra,
nb-scalar-hexahedra, nb-vector-hexahedra, nb-tensor-hexahedra,
nb-scalar-prisms, nb-vector-prisms, nb-tensor-prisms,
nb-scalar-pyramids, nb-vector-pyramids, nb-tensor-pyramids,
nb-scalar-lines2, nb-vector-lines2, nb-tensor-lines2,
nb-scalar-triangles2, nb-vector-triangles2, nb-tensor-triangles2,
nb-scalar-quadrangles2, nb-vector-quadrangles2, nb-tensor-quadrangles2,
nb-scalar-tetrahedra2, nb-vector-tetrahedra2, nb-tensor-tetrahedra2,
nb-scalar-hexahedra2, nb-vector-hexahedra2, nb-tensor-hexahedra2,
nb-scalar-prisms2, nb-vector-prisms2, nb-tensor-prisms2,
nb-scalar-pyramids2, nb-vector-pyramids2, nb-tensor-pyramids2,
Chapter 9: File formats 119
Appendix A Tutorial
The following examples introduce new features gradually, starting with Section A.1 [t1.geo],
page 121. The files corresponding to these examples are available in the tutorial directory
of the Gmsh distribution.
To learn how to run Gmsh on your computer, see Chapter 3 [Running Gmsh on
your system], page 11. Screencasts that show how to use the GUI are available on
http://gmsh.info/screencasts/.
A.1 t1.geo
/*********************************************************************
*
* Gmsh tutorial 1
*
* Variables, elementary entities (points, lines, surfaces), physical
* entities (points, lines, surfaces)
*
*********************************************************************/
lc = 1e-2;
// We can then define some additional points as well as our first curve. Curves
// are Gmshs second type of elementery entities, and, amongst curves, straight
// lines are the simplest. A straight line is defined by a list of point
// numbers. In the commands below, for example, the line 1 starts at point 1 and
// ends at point 2:
Line(1) = {1,2} ;
Line(2) = {3,2} ;
Line(3) = {3,4} ;
Line(4) = {4,1} ;
// We can then define the surface as a list of line loops (only one here, since
// there are no holes--see t4.geo):
// At this level, Gmsh knows everything to display the rectangular surface 6 and
// to mesh it. An optional step is needed if we want to associate specific
// region numbers to the various elements in the mesh (e.g. to the line segments
// discretizing lines 1 to 4 or to the triangles discretizing surface 1). This
// is achieved by the definition of physical entities. Physical entities will
// group elements belonging to several elementary entities by giving them a
// common number (a region number).
// We can for example group the points 1 and 2 into the physical entity 1:
// Consequently, two punctual elements will be saved in the output mesh file,
// both with the region number 1. The mechanism is identical for line or surface
// elements:
MY_LINE = 2;
Physical Line(MY_LINE) = {1,2} ;
Physical Line("My second line (automatic physical id)") = {3} ;
Physical Line("My third line (physical id 5)", 5) = {4} ;
Physical Surface("My surface") = {1} ;
// All the line elements created during the meshing of lines 1 and 2 will be
// saved in the output mesh file with the physical id 2. The elements from line
// 3 will be saved in the output mesh file with an automatic physical id,
// associated with the label "My second line (automatic physical id)". The
// elements from line 4 will be saved with physical id 5, associated with the
// label "My third line (physical id 5)". And finally, all the triangular
// elements resulting from the discretization of surface 6 will be given an
// automatic physical id associated with the label "My surface").
Appendix A: Tutorial 123
//
// Note that if no physical entities are defined, then all the elements in the
// mesh will be saved "as is", with their default orientation.
// Starting with Gmsh 3.0, models can also be built using constructive solid
// geometry. Instead of the built-in geometry kernel, you need to use the
// OpenCASCADE kernel:
//
// SetFactory("OpenCASCADE");
//
// In addition to the "bottom-up" geometry commands, you can now use "top-down"
// commands, like e.g.
//
// Rectangle(2) = {.2, 0, 0, 0.1, 0.3};
//
// See tutorial/t16.geo for an example, and demos/boolean for more.
A.2 t2.geo
/*********************************************************************
*
* Gmsh tutorial 2
*
* Includes, geometrical transformations, extruded geometries,
* elementary entities (volumes), physical entities (volumes)
*
*********************************************************************/
Include "t1.geo";
// We can then add new points and lines in the same way as we did in t1.geo:
// The resulting point can also be duplicated and translated by 0.1 along the y
// axis:
124 Gmsh 3.0
// This command created a new point with an automatically assigned id. This id
// can be obtained using the graphical user interface by hovering the mouse over
// it and looking at the bottom of the graphic window: in this case, the new
// point has id "6". Point 6 can then be used to create new entities, e.g.:
// Using the graphical user interface to obtain the ids of newly created
// entities can sometimes be cumbersome. It can then be advantageous to use the
// return value of the transformation commands directly. For example, the
// Translate command returns a list containing the ids of the translated
// entities. For example, we can translate copies of the two surfaces 6 and 11
// to the right with the following command:
// my_new_surfs[] (note the square brackets) denotes a list, which in this case
// contains the ids of the two new surfaces (check Tools->Message console to
// see the message):
// In Gmsh lists use square brackets for their definition (mylist[] = {1,2,3};)
// as well as to access their elements (myotherlist[] = {mylist[0],
// mylist[2]};). Note that list indexing starts at 0.
// Volumes are the fourth type of elementary entities in Gmsh. In the same way
// one defines line loops to build surfaces, one has to define surface loops
// (i.e. shells) to build volumes. The following volume does not have holes
// and thus consists of a single surface loop:
Point(100) = {0., 0.3, 0.13, lc}; Point(101) = {0.08, 0.3, 0.1, lc};
Point(102) = {0.08, 0.4, 0.1, lc}; Point(103) = {0., 0.4, 0.13, lc};
// When a volume can be extruded from a surface, it is usually easier to use the
// Extrude command directly instead of creating all the points, lines and
// surfaces by hand. For example, the following command extrudes the surface 11
// along the z axis and automatically creates a new volume (as well as all the
// needed points, lines and surfaces):
// To save all the tetrahedra discretizing the volumes 129 and 130 with a common
// region number, we finally define a physical volume:
A.3 t3.geo
/*********************************************************************
*
* Gmsh tutorial 3
*
* Extruded meshes, parameters, options
*
*********************************************************************/
Include "t1.geo";
126 Gmsh 3.0
h = 0.1;
Extrude {0,0,h} {
Surface{1}; Layers{ {8,2}, {0.5,1} };
}
// We can then define a new physical volume to save all the tetrahedra with a
// common region number (101):
// Let us now change some options... Since all interactive options are
// accessible in Gmshs scripting language, we can for example make point tags
// visible or redefine some colors directly in the input file:
Appendix A: Tutorial 127
Geometry.PointNumbers = 1;
Geometry.Color.Points = Orange;
General.Color.Text = White;
Mesh.Color.Points = {255,0,0};
Geometry.Color.Surfaces = Geometry.Color.Points;
// You can use the Help->Current options menu to see the current values of all
// options. To save all the options in a file, use File->Save as->Gmsh
// options. To associate the current options with the current file use
// File->Save Options->For Current File. To save the current options for all
// future Gmsh sessions use File->Save Options->As default.
A.4 t4.geo
/*********************************************************************
*
* Gmsh tutorial 4
*
* Built-in functions, surface holes, annotations, mesh colors
*
*********************************************************************/
cm = 1e-02;
e1 = 4.5 * cm; e2 = 6 * cm / 2; e3 = 5 * cm / 2;
h1 = 5 * cm; h2 = 10 * cm; h3 = 5 * cm; h4 = 2 * cm; h5 = 4.5 * cm;
R1 = 1 * cm; R2 = 1.5 * cm; r = 1 * cm;
Lc1 = 0.01;
Lc2 = 0.003;
// We can use all the usual mathematical functions (note the capitalized first
// letters), plus some useful functions like Hypot(a, b) := Sqrt(a^2 + b^2):
// Then we define some points and some lines using these variables:
128 Gmsh 3.0
Line(1) = {1 , 17};
Line(2) = {17, 16};
// Gmsh provides other curve primitives than stright lines: splines, B-splines,
// circle arcs, ellipse arcs, etc. Here we define a new circle arc, starting at
// point 14 and ending at point 16, with the circles center being the point 15:
Circle(3) = {14,15,16};
// Note that, in Gmsh, circle arcs should always be smaller than Pi. We can then
// define additional lines and circles, as well as a new surface:
// But we still need to define the exterior surface. Since this surface has a
// hole, its definition now requires two lines loops:
View "comments" {
// Add a text string in window coordinates, 10 pixels from the left and 10
// pixels from the bottom, using the StrCat function to concatenate strings:
T2(10, -10, 0){ StrCat("Created on ", Today, " with Gmsh") };
// Add a text string in model coordinates centered at (X,Y,Z) = (0, 0.11, 0):
T3(0, 0.11, 0, TextAttributes("Align", "Center", "Font", "Helvetica")){ "Hole" };
// The image can also be drawn in "billboard" mode, i.e. always parallel to
// the camera, by using the # symbol:
T3(0, 0.12, 0, TextAttributes("Align", "Center")){ "file://[email protected]#" };
A.5 t5.geo
/*********************************************************************
*
* Gmsh tutorial 5
*
* Characteristic lengths, arrays of variables, macros, loops
*
*********************************************************************/
lcar1 = .1;
lcar2 = .0005;
lcar3 = .055;
// If we wanted to change these mesh sizes globally (without changing the above
// definitions), we could give a global scaling factor for all characteristic
// lengths on the command line with the -clscale option (or with
// Mesh.CharacteristicLengthFactor in an option file). For example, with:
//
// > gmsh t5.geo -clscale 1
//
// this input file produces a mesh of approximately 1,300 nodes and 11,000
// tetrahedra. With
//
// > gmsh t5.geo -clscale 0.2
//
// the mesh counts approximately 350,000 nodes and 2.1 million tetrahedra. You
// can check mesh statistics in the graphical user interface with the
// Tools->Statistics menu.
Macro CheeseHole
// In the following commands we use the reserved variable name newp, which
// automatically selects a new point number. This number is chosen as the
// highest current point number, plus one. (Note that, analogously to newp,
// the variables newl, news, newv and newreg select the highest number
// amongst currently defined curves, surfaces, volumes and any entities other
// than points, respectively.)
// We need non-plane surfaces to define the spherical holes. Here we use ruled
// surfaces, which can have 3 or 4 sides:
// We then store the surface loops identification numbers in a list for later
// reference (we will need these to define the final volume):
theloops[t] = newreg ;
thehole = newreg ;
Volume(thehole) = theloops[t] ;
Return
x = 0 ; y = 0.75 ; z = 0 ; r = 0.09 ;
For t In {1:5}
x += 0.166 ;
z += 0.166 ;
Call CheeseHole ;
// We also print some variables on the terminal (note that, since all
// variables are treated internally as floating point numbers, the format
// string should only contain valid floating point format specifiers like
// %g, %f, %e, etc.):
EndFor
// We can then define the surface loop for the exterior surface of the cube:
theloops[0] = newreg ;
Appendix A: Tutorial 133
// The volume of the cube, without the 5 holes, is now defined by 6 surface
// loops: the first surface loop defines the exterior surface; the surface loops
// other than the first one define holes. (Again, to reference an array of
// variables, its identifier is followed by square brackets):
Volume(186) = {theloops[]} ;
// We finally define a physical volume for the elements discretizing the cube,
// without the holes (whose elements were already tagged with numbers 1 to 5 in
// the For loop):
// We could make only part of the model visible to only mesh this subset:
//
// Hide "*";
// Recursive Show { Volume{129}; }
// Mesh.MeshOnlyVisible=1;
A.6 t6.geo
/*********************************************************************
*
* Gmsh tutorial 6
*
* Transfinite meshes
*
*********************************************************************/
// Lets use the geometry from the first tutorial as a basis for this one
Include "t1.geo";
// Delete the left line and create replace it with 3 new ones
Delete{ Surface{1}; Line{4}; }
// Create surface
Line Loop(2) = {2, -1, l1, l2, l3, -3};
134 Gmsh 3.0
// Put 20 points total on combination of curves l1, l2 and l3 (beware that the
// points p1 and p2 are shared by the curves, so we do not create 6 + 6 + 10 =
// 22 points, but 20!)
Transfinite Line{l1} = 6;
Transfinite Line{l2} = 6;
Transfinite Line{l3} = 10;
// (Note that the list on the right hand side refers to points, not curves. When
// the surface has only 3 or 4 points on its boundary the list can be
// omitted. The way triangles are generated can be controlled by appending
// "Left", "Right" or "Alternate" after the list.)
Physical Surface(1) = 1;
// When the surface has only 3 or 4 control points, the transfinite constraint
// can be applied automatically (without specifying the corners explictly).
A.7 t7.geo
/*********************************************************************
*
* Gmsh tutorial 7
*
* Background mesh
*
*********************************************************************/
A.8 t8.geo
/*********************************************************************
*
* Gmsh tutorial 8
*
* Post-processing, scripting, animations, options
*
*********************************************************************/
Include "t1.geo";
Include "view1.pos";
Include "view1.pos";
Include "view4.pos";
General.Trackball = 0;
General.RotationX = 0; General.RotationY = 0; General.RotationZ = 0;
General.Color.Background = White; General.Color.Foreground = Black;
136 Gmsh 3.0
General.Color.Text = Black;
General.Orthographic = 0;
General.Axes = 0; General.SmallAxes = 0;
v0 = PostProcessing.NbViews-4;
v1 = v0+1; v2 = v0+2; v3 = v0+3;
View[v0].IntervalsType = 2;
View[v0].OffsetZ = 0.05;
View[v0].RaiseZ = 0;
View[v0].Light = 1;
View[v0].ShowScale = 0;
View[v0].SmoothNormals = 1;
View[v1].IntervalsType = 1;
View[v1].ColorTable = { Green, Blue };
View[v1].NbIso = 10;
View[v1].ShowScale = 0;
View[v2].Name = "Test...";
View[v2].Axes = 1;
View[v2].Color.Axes = Black;
View[v2].IntervalsType = 2;
View[v2].Type = 2;
View[v2].IntervalsType = 2;
View[v2].AutoPosition = 0;
View[v2].PositionX = 85;
View[v2].PositionY = 50;
View[v2].Width = 200;
View[v2].Height = 130;
View[v3].Visible = 0;
// We then loop from 1 to 3 with a step of 1. (To use a different step, just add
// a third argument in the list. For example, For num In {0.5:1.5:0.1} would
// increment num from 0.5 to 1.5 with a step of 0.1.)
t = 0;
View[v0].TimeStep = t;
View[v1].TimeStep = t;
View[v2].TimeStep = t;
View[v3].TimeStep = t;
Appendix A: Tutorial 137
View[v0].RaiseZ += 0.01/View[v0].Max * t;
If (num == 3)
// We want to create 640x480 frames when num == 3:
General.GraphicsWidth = General.MenuWidth + 640;
General.GraphicsHeight = 480;
EndIf
frames = 50;
General.RotationX += 10;
General.RotationY = General.RotationX / 3;
General.RotationZ += 0.1;
If (num == 3)
// The Print command saves the graphical window; the Sprintf function
// permits to create the file names on the fly:
//Print Sprintf("t8-%02g.gif", num2);
//Print Sprintf("t8-%02g.ppm", num2);
//Print Sprintf("t8-%02g.jpg", num2);
EndIf
EndFor
If(num == 3)
// Here we could make a system call to generate a movie. For example,
// with whirlgif:
/*
System "whirlgif -minimize -loop -o t8.gif t8-*.gif";
*/
// with mencoder:
/*
System "mencoder mf://*.jpg -mf fps=5 -o t8.mpg -ovc lavc
-lavcopts vcodec=mpeg1video:vhq";
System "mencoder mf://*.jpg -mf fps=5 -o t8.mpg -ovc lavc
-lavcopts vcodec=mpeg4:vhq";
*/
// with ffmpeg:
/*
System "ffmpeg -hq -r 5 -b 800 -vcodec mpeg1video
-i t8-%02d.jpg t8.mpg"
System "ffmpeg -hq -r 5 -b 800 -i t8-%02d.jpg t8.asf"
*/
EndIf
EndFor
A.9 t9.geo
/*********************************************************************
*
* Gmsh tutorial 9
*
* Post-processing plugins (levelsets, sections, annotations)
*
*********************************************************************/
Appendix A: Tutorial 139
Include "view3.pos" ;
// We then set some options for the Isosurface plugin (which extracts an
// isosurface from a 3D scalar view), and run it:
// We also set some options for the CutPlane plugin (which computes a section
// of a 3D view using the plane A*x+B*y+C*z+D=0), and then run it:
Plugin(CutPlane).A = 0 ;
Plugin(CutPlane).B = 0.2 ;
Plugin(CutPlane).C = 1 ;
Plugin(CutPlane).D = 0 ;
Plugin(CutPlane).View = 0 ;
Plugin(CutPlane).Run ;
// Add a title (By convention, for window coordinates a value greater than 99999
// represents the center. We could also use General.GraphicsWidth / 2, but
// that would only center the string for the current window size.):
Plugin(Annotate).Run ;
View[0].Light = 1;
View[0].IntervalsType = 1;
View[0].NbIso = 6;
View[0].SmoothNormals = 1;
View[1].IntervalsType = 2;
View[2].IntervalsType = 2;
A.10 t10.geo
/*********************************************************************
*
* Gmsh tutorial 10
*
* General mesh size fields
*
*********************************************************************/
// Say we would like to obtain mesh elements with size lc/30 near line 1 and
// point 5, and size lc elsewhere. To achieve this, we can use two fields:
// "Attractor", and "Threshold". We first define an Attractor field (Field[1])
// on points 5 and on line 1. This field returns the distance to point 5 and to
// (100 equidistant points on) line 1.
Field[1] = Attractor;
Field[1].NodesList = {5};
Field[1].NNodesByEdge = 100;
Field[1].EdgesList = {2};
// We then define a Threshold field, which uses the return value of the
// Attractor Field[1] in order to define a simple change in element size around
Appendix A: Tutorial 141
// Say we want to modulate the mesh element sizes using a mathematical function
// of the spatial coordinates. We can do this with the MathEval field:
Field[3] = MathEval;
Field[3].F = "Cos(4*3.14*x) * Sin(4*3.14*y) / 10 + 0.101";
// We could also combine MathEval with values coming from other fields. For
// example, lets define an Attractor around point 1
Field[4] = Attractor;
Field[4].NodesList = {1};
// We can then create a MathEval field with a function that depends on the
// return value of the Attractr Field[4], i.e., depending on the distance to
// point 1 (here using a cubic law, with minumum element size = lc / 100)
Field[5] = MathEval;
Field[5].F = Sprintf("F4^3 + %g", lc / 100);
// We could also use a Box field to impose a step change in element sizes inside
// a box
Field[6] = Box;
Field[6].VIn = lc / 15;
Field[6].VOut = lc;
Field[6].XMin = 0.3;
Field[6].XMax = 0.6;
Field[6].YMin = 0.3;
Field[6].YMax = 0.6;
// Many other types of fields are available: see the reference manual for a
// complete list. You can also create fields directly in the graphical user
// interface by selecting Define->Fields in the Mesh module.
// Finally, lets use the minimum of all the fields as the background mesh field
142 Gmsh 3.0
Field[7] = Min;
Field[7].FieldsList = {2, 3, 5, 6};
Background Field = 7;
// If the boundary mesh size was too small, we could ask not to extend the
// elements sizes from the boundary inside the domain:
// Mesh.CharacteristicLengthExtendFromBoundary = 0;
A.11 t11.geo
/*********************************************************************
*
* Gmsh tutorial 11
*
* Unstructured quadrangular meshes
*
*********************************************************************/
// We have seen in tutorials t3 and t6 that extruded and transfinite meshes can
// be "recombined" into quads/prisms/hexahedra by using the "Recombine"
// keyword. Unstructured meshes can be recombined in the same way. Lets define
// a simple geometry with an analytical mesh size field:
Field[1] = MathEval;
Field[1].F = "0.01*(1.0+30.*(y-x*x)*(y-x*x) + (1-x)*(1-x))";
Background Field = 1;
// If wed had several surfaces, we could have used Recombine Surface "*";.
// Yet another way would be to specify the global option "Mesh.RecombineAll =
// 1;".
// For even better quadrilateral meshes, you can try the experimental "Delaunay
// for quads" (DelQuad) meshing algorithm: DelQuad is a triangulation algorithm
// that enables to create right triangles almost everywhere. Uncomment the
// following line to try DelQuad: Mesh.Algorithm = 8;
A.12 t12.geo
/*********************************************************************
*
* Gmsh tutorial 12
*
* Cross-patch meshing with compounds
*
*********************************************************************/
lc = 0.1;
A.13 t13.geo
/*********************************************************************
*
* Gmsh tutorial 13
*
* Remeshing STL with compounds
*
*********************************************************************/
// Since compound geometrical compute a new parametrization, one can also use
// them to remesh STL files, even if in this case theres usually only a single
// elementary geometrical entity per compound.
// Lets merge the mesh that we would like to remesh. This mesh was reclassified
// ("colored") from an initial STL triangulation using the "Reclassify 2D" tool
// in Gmsh, so that we could split it along sharp geometrical features.
Merge "t13_data.msh";
// We can now define a compound line (resp. surface) for each discrete line
// (resp. surface) in the model
ll[] = Line "*";
For j In {0 : #ll[]-1}
Compound Line(newl) = ll[j];
EndFor
ss[] = Surface "*";
s = news;
For i In {0 : #ss[]-1}
Compound Surface(s+i) = ss[i];
EndFor
// And we can create the volume based on the new compound entities
Surface Loop(1) = {s : s + #ss[]-1};
Volume(1) = {1};
DefineConstant[
funny = {0, Choices{0,1},
Name "Parameters/Apply funny mesh size field?"},
hide = {Geometry.HideCompounds, Choices{0,1},
AutoCheck 0, GmshOption "Geometry.HideCompounds",
Name "Parameters/Hide compound sub-entities"}
];
If(funny)
Field[1].F = "2*Sin((x+y)/5) + 3";
EndIf
Mesh.RemeshAlgorithm = 1; // automatic
Mesh.RemeshParametrization = 7; // conformal finite element
Mesh.Algorithm = 6; // Frontal
A.14 t14.geo
/*********************************************************************
*
* Gmsh tutorial 14
*
146 Gmsh 3.0
// Create physical groups, which are used to define the domain of the
// (co)homology computation and the subdomain of the relative (co)homology
// computation.
// Whole domain
Physical Volume(1) = {1};
// Find bases for relative homology spaces of the domain modulo the four
// terminals.
Homology {{1}, {70, 71, 72, 73}};
// Find homology space bases isomorphic to the previous bases: homology spaces
// modulo the non-terminal domain surface, a.k.a the thin cuts.
Homology {{1}, {75}};
// More examples:
// Homology {1};
// Homology;
// Homology {{1}, {80}};
// Homology {{}, {80}};
A.15 t15.geo
/*********************************************************************
*
* Gmsh tutorial 15
*
* Embedded points, lines and surfaces
*
*********************************************************************/
// One can force this point to be included ("embedded") in the 2D mesh, using
// the "Point In Surface" command:
Point{5} In Surface{1};
148 Gmsh 3.0
// In the same way, one can force a curve to be embedded in the 2D mesh using
// the "Line in Surface" command:
Point(6) = {0.02, 0.12, 0, lc};
Point(7) = {0.04, 0.18, 0, lc};
Line(5) = {6, 7};
Line{5} In Surface{1};
// One can also embed points and lines in a volume using the "Line/Point In
// Volume" commands:
Extrude {0, 0, 0.1}{ Surface {1}; }
p = newp;
Point(p) = {0.07, 0.15, 0.025, lc};
Point{p} In Volume {1};
l = newl;
Point(p+1) = {0.025, 0.15, 0.025, lc};
Line(l) = {7, p+1};
Line{l} In Volume {1};
// Finally, one can also embed a surface in a volume using the "Surface In
// Volume" command:
Point(p+2) = {0.02, 0.12, 0.05, lc};
Point(p+3) = {0.04, 0.12, 0.05, lc};
Point(p+4) = {0.04, 0.18, 0.05, lc};
Point(p+5) = {0.02, 0.18, 0.05, lc};
Line(l+1) = {p+2, p+3};
Line(l+2) = {p+3, p+4};
Line(l+3) = {p+4, p+5};
Line(l+4) = {p+5, p+2};
ll = newll;
Line Loop(ll) = {l+1:l+4};
s = news;
Plane Surface(s) = {ll};
Surface{s} In Volume{1};
A.16 t16.geo
/*********************************************************************
*
* Gmsh tutorial 16
*
* Constructive Solid Geometry, OpenCASCADE geometry kernel
*
*********************************************************************/
Appendix A: Tutorial 149
SetFactory("OpenCASCADE");
// And lets build the same model as in t5.geo, but using constructive solid
// geometry:
Appendix B Options
This appendix lists all the available options. Gmshs default behavior is to save some of these
options in a per-user session resource file (cf. Saved in: General.SessionFileName in
the lists below) every time Gmsh is shut down. This permits for example to automatically
remember the size and location of the windows or which fonts to use. A second set of
options can be saved (automatically or manually with the File->Save Options->As Default
menu) in a per-user option file (cf. Saved in: General.OptionsFileName in the lists
below), automatically loaded by Gmsh every time it starts up. Finally, other options are
only saved to disk manually, either by explicitely saving an option file with File->Export,
or when saving per-model options with File->Save Options->For Current File (cf. Saved
in: - in the lists below).
To reset all options to their default values, use the Restore default options button
in Tools->Options->General->Advanced, or erase the General.SessionFileName and
General.OptionsFileName files by hand.
General.AxesFormatY
Number format for Y-axis (in standard C form)
Default value: "%.3g"
Saved in: General.OptionsFileName
General.AxesFormatZ
Number format for Z-axis (in standard C form)
Default value: "%.3g"
Saved in: General.OptionsFileName
General.AxesLabelX
X-axis label
Default value: ""
Saved in: General.OptionsFileName
General.AxesLabelY
Y-axis label
Default value: ""
Saved in: General.OptionsFileName
General.AxesLabelZ
Z-axis label
Default value: ""
Saved in: General.OptionsFileName
152 Gmsh 3.0
General.BackgroundImageFileName
Background image file in JPEG, PNG or PDF format
Default value: ""
Saved in: General.OptionsFileName
General.DefaultFileName
Default project file name
Default value: "untitled.geo"
Saved in: General.OptionsFileName
General.Display
X server to use (only for Unix versions)
Default value: ""
Saved in: -
General.ErrorFileName
File into which the log is saved if a fatal error occurs
Default value: ".gmsh-errors"
Saved in: General.OptionsFileName
General.ExecutableFileName
File name of the Gmsh executable (read-only)
Default value: ""
Saved in: General.SessionFileName
General.FileName
Current project file name (read-only)
Default value: ""
Saved in: -
General.FltkTheme
FLTK user interface theme (try e.g. plastic or gtk+)
Default value: ""
Saved in: General.SessionFileName
General.GraphicsFont
Font used in the graphic window
Default value: "Helvetica"
Saved in: General.OptionsFileName
General.GraphicsFontEngine
Set graphics font engine (Native, Cairo)
Default value: "Native"
Saved in: General.OptionsFileName
General.GraphicsFontTitle
Font used in the graphic window for titles
Default value: "Helvetica"
Saved in: General.OptionsFileName
Appendix B: Options 153
General.OptionsFileName
Option file created with Tools->Options->Save; automatically read on startup
Default value: ".gmsh-options"
Saved in: General.SessionFileName
General.RecentFile0
Most recent opened file
Default value: "untitled.geo"
Saved in: General.SessionFileName
General.RecentFile1
2nd most recent opened file
Default value: "untitled.geo"
Saved in: General.SessionFileName
General.RecentFile2
3rd most recent opened file
Default value: "untitled.geo"
Saved in: General.SessionFileName
General.RecentFile3
4th most recent opened file
Default value: "untitled.geo"
Saved in: General.SessionFileName
General.RecentFile4
5th most recent opened file
Default value: "untitled.geo"
Saved in: General.SessionFileName
General.RecentFile5
6th most recent opened file
Default value: "untitled.geo"
Saved in: General.SessionFileName
General.RecentFile6
7th most recent opened file
Default value: "untitled.geo"
Saved in: General.SessionFileName
General.RecentFile7
8th most recent opened file
Default value: "untitled.geo"
Saved in: General.SessionFileName
General.RecentFile8
9th most recent opened file
Default value: "untitled.geo"
Saved in: General.SessionFileName
154 Gmsh 3.0
General.RecentFile9
10th most recent opened file
Default value: "untitled.geo"
Saved in: General.SessionFileName
General.SessionFileName
Option file into which session specific information is saved; automatically read
on startup
Default value: ".gmshrc"
Saved in: -
General.TextEditor
System command to launch a text editor
Default value: "open -t %s"
Saved in: General.OptionsFileName
General.TmpFileName
Temporary file used by the geometry module
Default value: ".gmsh-tmp"
Saved in: General.SessionFileName
General.WatchFilePattern
Pattern of files to merge as they become available
Default value: ""
Saved in: -
General.AlphaBlending
Enable alpha blending (transparency) in post-processing views
Default value: 1
Saved in: General.OptionsFileName
General.Antialiasing
Use multisample antialiasing (will slow down rendering)
Default value: 0
Saved in: General.OptionsFileName
General.ArrowHeadRadius
Relative radius of arrow head
Default value: 0.12
Saved in: General.OptionsFileName
General.ArrowStemLength
Relative length of arrow stem
Default value: 0.56
Saved in: General.OptionsFileName
General.ArrowStemRadius
Relative radius of arrow stem
Default value: 0.02
Saved in: General.OptionsFileName
Appendix B: Options 155
General.Axes
Axes (0=none, 1=simple axes, 2=box, 3=full grid, 4=open grid, 5=ruler)
Default value: 0
Saved in: General.OptionsFileName
General.AxesMikado
Mikado axes style
Default value: 0
Saved in: General.OptionsFileName
General.AxesAutoPosition
Position the axes automatically
Default value: 1
Saved in: General.OptionsFileName
General.AxesForceValue
Force values on axes (otherwise use natural coordinates)
Default value: 0
Saved in: General.OptionsFileName
General.AxesMaxX
Maximum X-axis coordinate
Default value: 1
Saved in: General.OptionsFileName
General.AxesMaxY
Maximum Y-axis coordinate
Default value: 1
Saved in: General.OptionsFileName
General.AxesMaxZ
Maximum Z-axis coordinate
Default value: 1
Saved in: General.OptionsFileName
General.AxesMinX
Minimum X-axis coordinate
Default value: 0
Saved in: General.OptionsFileName
General.AxesMinY
Minimum Y-axis coordinate
Default value: 0
Saved in: General.OptionsFileName
General.AxesMinZ
Minimum Z-axis coordinate
Default value: 0
Saved in: General.OptionsFileName
156 Gmsh 3.0
General.AxesTicsX
Number of tics on the X-axis
Default value: 5
Saved in: General.OptionsFileName
General.AxesTicsY
Number of tics on the Y-axis
Default value: 5
Saved in: General.OptionsFileName
General.AxesTicsZ
Number of tics on the Z-axis
Default value: 5
Saved in: General.OptionsFileName
General.AxesValueMaxX
Maximum X-axis forced value
Default value: 1
Saved in: General.OptionsFileName
General.AxesValueMaxY
Maximum Y-axis forced value
Default value: 1
Saved in: General.OptionsFileName
General.AxesValueMaxZ
Maximum Z-axis forced value
Default value: 1
Saved in: General.OptionsFileName
General.AxesValueMinX
Minimum X-axis forced value
Default value: 0
Saved in: General.OptionsFileName
General.AxesValueMinY
Minimum Y-axis forced value
Default value: 0
Saved in: General.OptionsFileName
General.AxesValueMinZ
Minimum Z-axis forced value
Default value: 0
Saved in: General.OptionsFileName
General.BackgroundGradient
Draw background gradient (0=none, 1=vertical, 2=horizontal, 3=radial)
Default value: 1
Saved in: General.OptionsFileName
General.BackgroundImage3D
Create background image in the 3D model (units = model units) or as 2D
background (units = pixels)
Appendix B: Options 157
Default value: 0
Saved in: General.OptionsFileName
General.BackgroundImagePage
Page to render in the background image (for multi-page PDFs)
Default value: 0
Saved in: General.OptionsFileName
General.BackgroundImagePositionX
X position of background image (for 2D background: < 0: measure from right
window edge; >= 1e5: centered)
Default value: 0
Saved in: General.OptionsFileName
General.BackgroundImagePositionY
Y position of background image (for 2D background: < 0: measure from bottom
window edge; >= 1e5: centered)
Default value: 0
Saved in: General.OptionsFileName
General.BackgroundImageWidth
Width of background image (0: actual width if height = 0, natural scaling if
not; -1: graphic window width)
Default value: -1
Saved in: General.OptionsFileName
General.BackgroundImageHeight
Height of background image (0: actual height if width = 0, natural scaling if
not; -1: graphic window height)
Default value: -1
Saved in: General.OptionsFileName
General.BoundingBoxSize
Overall bounding box size (read-only)
Default value: 1
Saved in: General.OptionsFileName
General.Camera
Enable camera view mode
Default value: 0
Saved in: General.OptionsFileName
General.CameraAperture
Camera aperture in degrees
Default value: 40
Saved in: General.OptionsFileName
General.CameraEyeSeparationRatio
Eye separation ratio in % for stereo rendering
Default value: 1.5
Saved in: General.OptionsFileName
158 Gmsh 3.0
General.CameraFocalLengthRatio
Camera Focal length ratio
Default value: 1
Saved in: General.OptionsFileName
General.Clip0A
First coefficient in equation for clipping plane 0 (A in AX+BY+CZ+D=0)
Default value: 1
Saved in: -
General.Clip0B
Second coefficient in equation for clipping plane 0 (B in AX+BY+CZ+D=0)
Default value: 0
Saved in: -
General.Clip0C
Third coefficient in equation for clipping plane 0 (C in AX+BY+CZ+D=0)
Default value: 0
Saved in: -
General.Clip0D
Fourth coefficient in equation for clipping plane 0 (D in AX+BY+CZ+D=0)
Default value: 0
Saved in: -
General.Clip1A
First coefficient in equation for clipping plane 1
Default value: 0
Saved in: -
General.Clip1B
Second coefficient in equation for clipping plane 1
Default value: 1
Saved in: -
General.Clip1C
Third coefficient in equation for clipping plane 1
Default value: 0
Saved in: -
General.Clip1D
Fourth coefficient in equation for clipping plane 1
Default value: 0
Saved in: -
General.Clip2A
First coefficient in equation for clipping plane 2
Default value: 0
Saved in: -
Appendix B: Options 159
General.Clip2B
Second coefficient in equation for clipping plane 2
Default value: 0
Saved in: -
General.Clip2C
Third coefficient in equation for clipping plane 2
Default value: 1
Saved in: -
General.Clip2D
Fourth coefficient in equation for clipping plane 2
Default value: 0
Saved in: -
General.Clip3A
First coefficient in equation for clipping plane 3
Default value: -1
Saved in: -
General.Clip3B
Second coefficient in equation for clipping plane 3
Default value: 0
Saved in: -
General.Clip3C
Third coefficient in equation for clipping plane 3
Default value: 0
Saved in: -
General.Clip3D
Fourth coefficient in equation for clipping plane 3
Default value: 1
Saved in: -
General.Clip4A
First coefficient in equation for clipping plane 4
Default value: 0
Saved in: -
General.Clip4B
Second coefficient in equation for clipping plane 4
Default value: -1
Saved in: -
General.Clip4C
Third coefficient in equation for clipping plane 4
Default value: 0
Saved in: -
160 Gmsh 3.0
General.Clip4D
Fourth coefficient in equation for clipping plane 4
Default value: 1
Saved in: -
General.Clip5A
First coefficient in equation for clipping plane 5
Default value: 0
Saved in: -
General.Clip5B
Second coefficient in equation for clipping plane 5
Default value: 0
Saved in: -
General.Clip5C
Third coefficient in equation for clipping plane 5
Default value: -1
Saved in: -
General.Clip5D
Fourth coefficient in equation for clipping plane 5
Default value: 1
Saved in: -
General.ClipFactor
Near and far clipping plane distance factor (decrease value for better z-buffer
resolution)
Default value: 5
Saved in: -
General.ClipOnlyDrawIntersectingVolume
Only draw layer of elements that intersect the clipping plane
Default value: 0
Saved in: General.OptionsFileName
General.ClipOnlyVolume
Only clip volume elements
Default value: 0
Saved in: General.OptionsFileName
General.ClipPositionX
Horizontal position (in pixels) of the upper left corner of the clipping planes
window
Default value: 650
Saved in: General.SessionFileName
General.ClipPositionY
Vertical position (in pixels) of the upper left corner of the clipping planes win-
dow
Default value: 150
Saved in: General.SessionFileName
Appendix B: Options 161
General.ClipWholeElements
Clip whole elements
Default value: 0
Saved in: General.OptionsFileName
General.ColorScheme
Default color scheme for graphics (0=dark, 1=light, 2=grayscale, 3=reverse)
Default value: 1
Saved in: General.SessionFileName
General.ConfirmOverwrite
Ask confirmation before overwriting files?
Default value: 1
Saved in: General.OptionsFileName
General.ContextPositionX
Horizontal position (in pixels) of the upper left corner of the contextual windows
Default value: 650
Saved in: General.SessionFileName
General.ContextPositionY
Vertical position (in pixels) of the upper left corner of the contextual windows
Default value: 150
Saved in: General.SessionFileName
General.DetachedMenu
Should the menu window be detached from the graphic window?
Default value: 0
Saved in: General.SessionFileName
General.DisplayBorderFactor
Border factor for model display (0: model fits window size exactly)
Default value: 0.2
Saved in: General.OptionsFileName
General.DoubleBuffer
Use a double buffered graphic window (on Unix, should be set to 0 when working
on a remote host without GLX)
Default value: 1
Saved in: General.OptionsFileName
General.DrawBoundingBoxes
Draw bounding boxes
Default value: 0
Saved in: General.OptionsFileName
General.ExpertMode
Enable expert mode (to disable all the messages meant for inexperienced users)
Default value: 0
Saved in: General.OptionsFileName
162 Gmsh 3.0
General.ExtraPositionX
Horizontal position (in pixels) of the upper left corner of the generic extra
window
Default value: 650
Saved in: General.SessionFileName
General.ExtraPositionY
Vertical position (in pixels) of the upper left corner of the generic extra window
Default value: 350
Saved in: General.SessionFileName
General.ExtraHeight
Height (in pixels) of the generic extra window
Default value: 100
Saved in: General.SessionFileName
General.ExtraWidth
Width (in pixels) of the generic extra window
Default value: 100
Saved in: General.SessionFileName
General.FastRedraw
Draw simplified model while rotating, panning and zooming
Default value: 0
Saved in: General.OptionsFileName
General.FieldPositionX
Horizontal position (in pixels) of the upper left corner of the field window
Default value: 650
Saved in: General.SessionFileName
General.FieldPositionY
Vertical position (in pixels) of the upper left corner of the field window
Default value: 550
Saved in: General.SessionFileName
General.FieldHeight
Height (in pixels) of the field window
Default value: 320
Saved in: General.SessionFileName
General.FieldWidth
Width (in pixels) of the field window
Default value: 420
Saved in: General.SessionFileName
General.FileChooserPositionX
Horizontal position (in pixels) of the upper left corner of the file chooser windows
Default value: 200
Saved in: General.SessionFileName
Appendix B: Options 163
General.FileChooserPositionY
Vertical position (in pixels) of the upper left corner of the file chooser windows
Default value: 200
Saved in: General.SessionFileName
General.FltkColorScheme
FLTK user interface color theme (0: standard, 1:dark)
Default value: 0
Saved in: General.SessionFileName
General.FontSize
Size of the font in the user interface, in pixels (-1: automatic)
Default value: -1
Saved in: General.OptionsFileName
General.GraphicsFontSize
Size of the font in the graphic window, in pixels
Default value: 15
Saved in: General.OptionsFileName
General.GraphicsFontSizeTitle
Size of the font in the graphic window for titles, in pixels
Default value: 18
Saved in: General.OptionsFileName
General.GraphicsHeight
Height (in pixels) of the graphic window
Default value: 600
Saved in: General.SessionFileName
General.GraphicsPositionX
Horizontal position (in pixels) of the upper left corner of the graphic window
Default value: 50
Saved in: General.SessionFileName
General.GraphicsPositionY
Vertical position (in pixels) of the upper left corner of the graphic window
Default value: 50
Saved in: General.SessionFileName
General.GraphicsWidth
Width (in pixels) of the graphic window
Default value: 800
Saved in: General.SessionFileName
General.HighOrderToolsPositionX
Horizontal position (in pixels) of the upper left corner of the high order tools
window
Default value: 650
Saved in: General.SessionFileName
164 Gmsh 3.0
General.HighOrderToolsPositionY
Vertical position (in pixels) of the upper left corner of the high order tools
window
Default value: 150
Saved in: General.SessionFileName
General.HighResolutionGraphics
Use high-resolution OpenGL graphics (e.g. for Macs with retina displays)
Default value: 1
Saved in: General.OptionsFileName
General.HighResolutionPointSizeFactor
Point size factor when using high-resolution OpenGL graphics
Default value: 2
Saved in: General.OptionsFileName
General.InitialModule
Module launched on startup (0=automatic, 1=geometry, 2=mesh, 3=solver,
4=post-processing)
Default value: 0
Saved in: General.OptionsFileName
General.Light0
Enable light source 0
Default value: 1
Saved in: General.OptionsFileName
General.Light0X
X position of light source 0
Default value: 0.65
Saved in: General.OptionsFileName
General.Light0Y
Y position of light source 0
Default value: 0.65
Saved in: General.OptionsFileName
General.Light0Z
Z position of light source 0
Default value: 1
Saved in: General.OptionsFileName
General.Light0W
Divisor of the X, Y and Z coordinates of light source 0 (W=0 means infinitely
far source)
Default value: 0
Saved in: General.OptionsFileName
General.Light1
Enable light source 1
Default value: 0
Saved in: General.OptionsFileName
Appendix B: Options 165
General.Light1X
X position of light source 1
Default value: 0.5
Saved in: General.OptionsFileName
General.Light1Y
Y position of light source 1
Default value: 0.3
Saved in: General.OptionsFileName
General.Light1Z
Z position of light source 1
Default value: 1
Saved in: General.OptionsFileName
General.Light1W
Divisor of the X, Y and Z coordinates of light source 1 (W=0 means infinitely
far source)
Default value: 0
Saved in: General.OptionsFileName
General.Light2
Enable light source 2
Default value: 0
Saved in: General.OptionsFileName
General.Light2X
X position of light source 2
Default value: 0.5
Saved in: General.OptionsFileName
General.Light2Y
Y position of light source 2
Default value: 0.3
Saved in: General.OptionsFileName
General.Light2Z
Z position of light source 2
Default value: 1
Saved in: General.OptionsFileName
General.Light2W
Divisor of the X, Y and Z coordinates of light source 2 (W=0 means infinitely
far source)
Default value: 0
Saved in: General.OptionsFileName
General.Light3
Enable light source 3
Default value: 0
Saved in: General.OptionsFileName
166 Gmsh 3.0
General.Light3X
X position of light source 3
Default value: 0.5
Saved in: General.OptionsFileName
General.Light3Y
Y position of light source 3
Default value: 0.3
Saved in: General.OptionsFileName
General.Light3Z
Z position of light source 3
Default value: 1
Saved in: General.OptionsFileName
General.Light3W
Divisor of the X, Y and Z coordinates of light source 3 (W=0 means infinitely
far source)
Default value: 0
Saved in: General.OptionsFileName
General.Light4
Enable light source 4
Default value: 0
Saved in: General.OptionsFileName
General.Light4X
X position of light source 4
Default value: 0.5
Saved in: General.OptionsFileName
General.Light4Y
Y position of light source 4
Default value: 0.3
Saved in: General.OptionsFileName
General.Light4Z
Z position of light source 4
Default value: 1
Saved in: General.OptionsFileName
General.Light4W
Divisor of the X, Y and Z coordinates of light source 4 (W=0 means infinitely
far source)
Default value: 0
Saved in: General.OptionsFileName
General.Light5
Enable light source 5
Default value: 0
Saved in: General.OptionsFileName
Appendix B: Options 167
General.Light5X
X position of light source 5
Default value: 0.5
Saved in: General.OptionsFileName
General.Light5Y
Y position of light source 5
Default value: 0.3
Saved in: General.OptionsFileName
General.Light5Z
Z position of light source 5
Default value: 1
Saved in: General.OptionsFileName
General.Light5W
Divisor of the X, Y and Z coordinates of light source 5 (W=0 means infinitely
far source)
Default value: 0
Saved in: General.OptionsFileName
General.LineWidth
Display width of lines (in pixels)
Default value: 1
Saved in: General.OptionsFileName
General.ManipulatorPositionX
Horizontal position (in pixels) of the upper left corner of the manipulator win-
dow
Default value: 650
Saved in: General.SessionFileName
General.ManipulatorPositionY
Vertical position (in pixels) of the upper left corner of the manipulator window
Default value: 150
Saved in: General.SessionFileName
General.MaxX
Maximum model coordinate along the X-axis (read-only)
Default value: 0
Saved in: -
General.MaxY
Maximum model coordinate along the Y-axis (read-only)
Default value: 0
Saved in: -
General.MaxZ
Maximum model coordinate along the Z-axis (read-only)
Default value: 0
Saved in: -
168 Gmsh 3.0
General.MenuWidth
Width (in pixels) of the menu tree
Default value: 200
Saved in: General.SessionFileName
General.MenuHeight
Height (in pixels) of the (detached) menu tree
Default value: 200
Saved in: General.SessionFileName
General.MenuPositionX
Horizontal position (in pixels) of the (detached) menu tree
Default value: 400
Saved in: General.SessionFileName
General.MenuPositionY
Vertical position (in pixels) of the (detached) menu tree
Default value: 400
Saved in: General.SessionFileName
General.MeshDiscrete
Mesh discrete surfaces through automatic parametrization (MUMPS required
for efficiency) (0)
Default value: 0
Saved in: General.OptionsFileName
General.MessageFontSize
Size of the font in the message window, in pixels (-1: automatic)
Default value: -1
Saved in: General.OptionsFileName
General.MessageHeight
Height (in pixels) of the message console when it is visible (should be > 0)
Default value: 300
Saved in: General.SessionFileName
General.MinX
Minimum model coordinate along the X-axis (read-only)
Default value: 0
Saved in: -
General.MinY
Minimum model coordinate along the Y-axis (read-only)
Default value: 0
Saved in: -
General.MinZ
Minimum model coordinate along the Z-axis (read-only)
Default value: 0
Saved in: -
Appendix B: Options 169
General.MouseHoverMeshes
Enable mouse hover on meshes
Default value: 0
Saved in: General.OptionsFileName
General.MouseSelection
Enable mouse selection
Default value: 1
Saved in: General.OptionsFileName
General.NonModalWindows
Force all control windows to be on top of the graphic window ("non-modal")
Default value: 1
Saved in: General.SessionFileName
General.NoPopup
Disable interactive dialog windows in scripts (and use default values instead)
Default value: 0
Saved in: General.OptionsFileName
General.OptionsPositionX
Horizontal position (in pixels) of the upper left corner of the option window
Default value: 650
Saved in: General.SessionFileName
General.OptionsPositionY
Vertical position (in pixels) of the upper left corner of the option window
Default value: 150
Saved in: General.SessionFileName
General.Orthographic
Orthographic projection mode (0=perspective projection)
Default value: 1
Saved in: General.OptionsFileName
General.PluginPositionX
Horizontal position (in pixels) of the upper left corner of the plugin window
Default value: 650
Saved in: General.SessionFileName
General.PluginPositionY
Vertical position (in pixels) of the upper left corner of the plugin window
Default value: 550
Saved in: General.SessionFileName
General.PluginHeight
Height (in pixels) of the plugin window
Default value: 320
Saved in: General.SessionFileName
170 Gmsh 3.0
General.PluginWidth
Width (in pixels) of the plugin window
Default value: 420
Saved in: General.SessionFileName
General.PointSize
Display size of points (in pixels)
Default value: 3
Saved in: General.OptionsFileName
General.PolygonOffsetAlwaysOn
Always apply polygon offset, instead of trying to detect when it is required
Default value: 0
Saved in: General.OptionsFileName
General.PolygonOffsetFactor
Polygon offset factor (offset = factor * DZ + r * units)
Default value: 0.5
Saved in: General.OptionsFileName
General.PolygonOffsetUnits
Polygon offset units (offset = factor * DZ + r * units)
Default value: 1
Saved in: General.OptionsFileName
General.ProgressMeterStep
Increment (in percent) of the progress meter bar
Default value: 20
Saved in: General.OptionsFileName
General.QuadricSubdivisions
Number of subdivisions used to draw points or lines as spheres or cylinders
Default value: 6
Saved in: General.OptionsFileName
General.RotationX
First Euler angle (used if Trackball=0)
Default value: 0
Saved in: -
General.RotationY
Second Euler angle (used if Trackball=0)
Default value: 0
Saved in: -
General.RotationZ
Third Euler angle (used if Trackball=0)
Default value: 0
Saved in: -
General.RotationCenterGravity
Rotate around the (pseudo) center of mass instead of (RotationCenterX, Rota-
tionCenterY, RotationCenterZ)
Appendix B: Options 171
Default value: 1
Saved in: General.OptionsFileName
General.RotationCenterX
X coordinate of the center of rotation
Default value: 0
Saved in: -
General.RotationCenterY
Y coordinate of the center of rotation
Default value: 0
Saved in: -
General.RotationCenterZ
Z coordinate of the center of rotation
Default value: 0
Saved in: -
General.SaveOptions
Automatically save current options in General.OptionsFileName (1) or per
model (2)each time you quit Gmsh?
Default value: 0
Saved in: General.SessionFileName
General.SaveSession
Automatically save session specific information in General.SessionFileName
each time you quit Gmsh?
Default value: 1
Saved in: General.SessionFileName
General.ScaleX
X-axis scale factor
Default value: 1
Saved in: -
General.ScaleY
Y-axis scale factor
Default value: 1
Saved in: -
General.ScaleZ
Z-axis scale factor
Default value: 1
Saved in: -
General.Shininess
Material shininess
Default value: 0.4
Saved in: General.OptionsFileName
172 Gmsh 3.0
General.ShininessExponent
Material shininess exponent (between 0 and 128)
Default value: 40
Saved in: General.OptionsFileName
General.ShowOptionsOnStartup
Show option window on startup
Default value: 0
Saved in: General.OptionsFileName
General.ShowMessagesOnStartup
Show message window on startup
Default value: 0
Saved in: General.OptionsFileName
General.SmallAxes
Display the small axes
Default value: 1
Saved in: General.OptionsFileName
General.SmallAxesPositionX
X position (in pixels) of small axes (< 0: measure from right window edge; >=
1e5: centered)
Default value: -60
Saved in: General.OptionsFileName
General.SmallAxesPositionY
Y position (in pixels) of small axes (< 0: measure from bottom window edge;
>= 1e5: centered)
Default value: -40
Saved in: General.OptionsFileName
General.SmallAxesSize
Size (in pixels) of small axes
Default value: 30
Saved in: General.OptionsFileName
General.StatisticsPositionX
Horizontal position (in pixels) of the upper left corner of the statistic window
Default value: 650
Saved in: General.SessionFileName
General.StatisticsPositionY
Vertical position (in pixels) of the upper left corner of the statistic window
Default value: 150
Saved in: General.SessionFileName
General.Stereo
Use stereo rendering
Default value: 0
Saved in: General.OptionsFileName
Appendix B: Options 173
General.SystemMenuBar
Use the system menu bar on Mac OS X?
Default value: 1
Saved in: General.SessionFileName
General.Terminal
Should information be printed on the terminal (if available)?
Default value: 0
Saved in: General.OptionsFileName
General.Tooltips
Show tooltips in the user interface
Default value: 1
Saved in: General.OptionsFileName
General.Trackball
Use trackball rotation mode
Default value: 1
Saved in: General.OptionsFileName
General.TrackballHyperbolicSheet
Use hyperbolic sheet away from trackball center for z-rotations
Default value: 1
Saved in: General.OptionsFileName
General.TrackballQuaternion0
First trackball quaternion component (used if General.Trackball=1)
Default value: 0
Saved in: -
General.TrackballQuaternion1
Second trackball quaternion component (used if General.Trackball=1)
Default value: 0
Saved in: -
General.TrackballQuaternion2
Third trackball quaternion component (used if General.Trackball=1)
Default value: 0
Saved in: -
General.TrackballQuaternion3
Fourth trackball quaternion component (used if General.Trackball=1)
Default value: 1
Saved in: -
General.TranslationX
X-axis translation (in model units)
Default value: 0
Saved in: -
174 Gmsh 3.0
General.TranslationY
Y-axis translation (in model units)
Default value: 0
Saved in: -
General.TranslationZ
Z-axis translation (in model units)
Default value: 0
Saved in: -
General.VectorType
Default vector display type (for normals, etc.)
Default value: 4
Saved in: General.OptionsFileName
General.Verbosity
Level of information printed during processing (0=no information)
Default value: 5
Saved in: General.OptionsFileName
General.VisibilityPositionX
Horizontal position (in pixels) of the upper left corner of the visibility window
Default value: 650
Saved in: General.SessionFileName
General.VisibilityPositionY
Vertical position (in pixels) of the upper left corner of the visibility window
Default value: 150
Saved in: General.SessionFileName
General.ZoomFactor
Middle mouse button zoom acceleration factor
Default value: 4
Saved in: General.OptionsFileName
General.Color.Background
Background color
Default value: {255,255,255}
Saved in: General.OptionsFileName
General.Color.BackgroundGradient
Background gradient color
Default value: {208,215,255}
Saved in: General.OptionsFileName
General.Color.Foreground
Foreground color
Default value: {85,85,85}
Saved in: General.OptionsFileName
Appendix B: Options 175
General.Color.Text
Text color
Default value: {0,0,0}
Saved in: General.OptionsFileName
General.Color.Axes
Axes color
Default value: {0,0,0}
Saved in: General.OptionsFileName
General.Color.SmallAxes
Small axes color
Default value: {0,0,0}
Saved in: General.OptionsFileName
General.Color.AmbientLight
Ambient light color
Default value: {25,25,25}
Saved in: General.OptionsFileName
General.Color.DiffuseLight
Diffuse light color
Default value: {255,255,255}
Saved in: General.OptionsFileName
General.Color.SpecularLight
Specular light color
Default value: {255,255,255}
Saved in: General.OptionsFileName
Print.ParameterCommand
Command parsed when the print parameter is changed
Default value: "Mesh.Clip=1; View.Clip=1; General.ClipWholeElements=1;
General.Clip0D=Print.Parameter; SetChanged;"
Saved in: General.OptionsFileName
Print.Parameter
Current value of the print parameter
Default value: 0
Saved in: General.OptionsFileName
Print.ParameterFirst
First value of print parameter in loop
Default value: -1
Saved in: General.OptionsFileName
Print.ParameterLast
Last value of print parameter in loop
Default value: 1
Saved in: General.OptionsFileName
176 Gmsh 3.0
Print.ParameterSteps
Number of steps in loop over print parameter
Default value: 10
Saved in: General.OptionsFileName
Print.Background
Print background (gradient and image)?
Default value: 0
Saved in: General.OptionsFileName
Print.CompositeWindows
Composite all window tiles in the same output image (for bitmap output only)
Default value: 0
Saved in: General.OptionsFileName
Print.PgfTwoDim
Output PGF format for two dimensions. Mostly irrelevant if PgfExpor-
tAxis=0. Default 1 (yes).
Default value: 1
Saved in: General.OptionsFileName
Print.PgfExportAxis
Include axis in export pgf code (not in the png). Default 0 (no).
Default value: 0
Saved in: General.OptionsFileName
Print.PgfHorizontalBar
Use a horizontal color bar in the pgf output. Default 0 (no).
Default value: 0
Saved in: General.OptionsFileName
Print.DeleteTemporaryFiles
Delete temporary files used during printing
Default value: 1
Saved in: General.OptionsFileName
Print.EpsBestRoot
Try to minimize primitive splitting in BSP tree sorted PostScript/PDF output
Default value: 1
Saved in: General.OptionsFileName
Print.EpsCompress
Compress PostScript/PDF output using zlib
Default value: 0
Saved in: General.OptionsFileName
Print.EpsLineWidthFactor
Width factor for lines in PostScript/PDF output
Default value: 1
Saved in: General.OptionsFileName
Appendix B: Options 177
Print.EpsOcclusionCulling
Cull occluded primitives (to reduce PostScript/PDF file size)
Default value: 1
Saved in: General.OptionsFileName
Print.EpsPointSizeFactor
Size factor for points in PostScript/PDF output
Default value: 1
Saved in: General.OptionsFileName
Print.EpsPS3Shading
Enable PostScript Level 3 shading
Default value: 0
Saved in: General.OptionsFileName
Print.EpsQuality
PostScript/PDF quality (0=bitmap, 1=vector (simple sort), 2=vector (accurate
sort), 3=vector (unsorted)
Default value: 1
Saved in: General.OptionsFileName
Print.Format
File format (10=automatic)
Default value: 10
Saved in: General.OptionsFileName
Print.GeoLabels
Save labels in unrolled Gmsh geometries
Default value: 1
Saved in: General.OptionsFileName
Print.GeoOnlyPhysicals
Only save entities that belong to physical groups
Default value: 0
Saved in: General.OptionsFileName
Print.GifDither
Apply dithering to GIF output
Default value: 0
Saved in: General.OptionsFileName
Print.GifInterlace
Interlace GIF output
Default value: 0
Saved in: General.OptionsFileName
Print.GifSort
Sort the colormap in GIF output
Default value: 1
Saved in: General.OptionsFileName
178 Gmsh 3.0
Print.GifTransparent
Output transparent GIF image
Default value: 0
Saved in: General.OptionsFileName
Print.Height
Height of printed image; use (possibly scaled) current height if < 0
Default value: -1
Saved in: General.OptionsFileName
Print.JpegQuality
JPEG quality (between 1 and 100)
Default value: 100
Saved in: General.OptionsFileName
Print.JpegSmoothing
JPEG smoothing (between 0 and 100)
Default value: 0
Saved in: General.OptionsFileName
Print.PostElementary
Save elementary region tags in mesh statistics exported as post-processing views
Default value: 1
Saved in: General.OptionsFileName
Print.PostElement
Save element numbers in mesh statistics exported as post-processing views
Default value: 0
Saved in: General.OptionsFileName
Print.PostGamma
Save Gamma quality measure in mesh statistics exported as post-processing
views
Default value: 0
Saved in: General.OptionsFileName
Print.PostEta
Save Eta quality measure in mesh statistics exported as post-processing views
Default value: 0
Saved in: General.OptionsFileName
Print.PostRho
Save Rho quality measure in mesh statistics exported as post-processing views
Default value: 0
Saved in: General.OptionsFileName
Print.PostDisto
Save Disto quality measure in mesh statistics exported as post-processing views
Default value: 0
Saved in: General.OptionsFileName
Appendix B: Options 179
Print.TexAsEquation
Print all TeX strings as equations
Default value: 0
Saved in: General.OptionsFileName
Print.Text
Print text strings?
Default value: 1
Saved in: General.OptionsFileName
Print.X3dCompatibility
Produce highliy compatible X3D output (no scale bar)
Default value: 0
Saved in: General.OptionsFileName
Print.X3dPrecision
Precision of X3D output
Default value: 1e-09
Saved in: General.OptionsFileName
Print.X3dRemoveInnerBorders
Remove inner borders in X3D output
Default value: 0
Saved in: General.OptionsFileName
Print.X3dTransparency
Transparency for X3D output
Default value: 0
Saved in: General.OptionsFileName
Print.Width
Width of printed image; use (possibly scaled) current width if < 0)
Default value: -1
Saved in: General.OptionsFileName
Geometry.DoubleClickedVolumeCommand
Command parsed when double-clicking on a volume
Default value: ""
Saved in: General.OptionsFileName
Geometry.AutoCoherence
Should all duplicate entities be automatically removed? (If AutoCoherence ==
2, also remove degenerate entities)
Default value: 1
Saved in: General.OptionsFileName
Geometry.Clip
Enable clipping planes? (Plane[i]=2^i, i=0,...,5)
Default value: 0
Saved in: -
Geometry.CopyMeshingMethod
Copy meshing method (unstructured or transfinite) when duplicating geomet-
rical entities?
Default value: 0
Saved in: General.OptionsFileName
Geometry.DoubleClickedEntityTag
Tag of last double-clicked geometrical entity
Default value: 0
Saved in: -
Geometry.ExactExtrusion
Use exact extrusion formula in interpolations (set to 0 to allow geometrical
transformations of extruded entities)
Default value: 1
Saved in: General.OptionsFileName
Geometry.ExtrudeReturnLateralEntities
Add lateral entities in lists returned by extrusion commands?
Default value: 1
Saved in: General.OptionsFileName
Geometry.ExtrudeSplinePoints
Number of control points for splines created during extrusion
Default value: 5
Saved in: General.OptionsFileName
Geometry.HideCompounds
Hide entities that make up compound entities?
Default value: 1
Saved in: General.OptionsFileName
Geometry.HighlightOrphans
Highlight orphan entities (lines connected to a single surface, etc.)?
Default value: 0
Saved in: General.OptionsFileName
Appendix B: Options 181
Geometry.LabelType
Type of entity label (1=elementary number, 2=physical number)
Default value: 1
Saved in: General.OptionsFileName
Geometry.Light
Enable lighting for the geometry
Default value: 1
Saved in: General.OptionsFileName
Geometry.LightTwoSide
Light both sides of surfaces (leads to slower rendering)
Default value: 0
Saved in: General.OptionsFileName
Geometry.Lines
Display geometry curves?
Default value: 1
Saved in: General.OptionsFileName
Geometry.LineNumbers
Display curve numbers?
Default value: 0
Saved in: General.OptionsFileName
Geometry.LineSelectWidth
Display width of selected lines (in pixels)
Default value: 2
Saved in: General.OptionsFileName
Geometry.LineType
Display lines as solid color segments (0), 3D cylinders (1) or tapered cylinders
(2)
Default value: 0
Saved in: General.OptionsFileName
Geometry.LineWidth
Display width of lines (in pixels)
Default value: 2
Saved in: General.OptionsFileName
Geometry.MatchGeomAndMesh
Matches geometries and meshes
Default value: 0
Saved in: General.OptionsFileName
Geometry.Normals
Display size of normal vectors (in pixels)
Default value: 0
Saved in: General.OptionsFileName
182 Gmsh 3.0
Geometry.NumSubEdges
Number of edge subdivisions between control points when displaying curves
Default value: 20
Saved in: General.OptionsFileName
Geometry.OCCFixDegenerated
Fix degenerated edges/faces in STEP, IGES and BRep models
Default value: 0
Saved in: General.OptionsFileName
Geometry.OCCFixSmallEdges
Fix small edges in STEP, IGES and BRep models
Default value: 0
Saved in: General.OptionsFileName
Geometry.OCCFixSmallFaces
Fix small faces in STEP, IGES and BRep models
Default value: 0
Saved in: General.OptionsFileName
Geometry.OCCSewFaces
Sew faces in STEP, IGES and BRep models
Default value: 0
Saved in: General.OptionsFileName
Geometry.OCCParallel
Use multi-threaded OCC boolean operators
Default value: 0
Saved in: General.OptionsFileName
Geometry.OCCBooleanPreserveNumbering
Try to preserve numbering of entities through OCC boolean operations
Default value: 1
Saved in: General.OptionsFileName
Geometry.OCCScaling
Scale STEP, IGES and BRep model by given factor
Default value: 1
Saved in: General.OptionsFileName
Geometry.OffsetX
Model display offset along X-axis (in model coordinates)
Default value: 0
Saved in: -
Geometry.OffsetY
Model display offset along Y-axis (in model coordinates)
Default value: 0
Saved in: -
Appendix B: Options 183
Geometry.OffsetZ
Model display offset along Z-axis (in model coordinates)
Default value: 0
Saved in: -
Geometry.OldCircle
Use old circle description (compatibility option for old Gmsh geometries)
Default value: 0
Saved in: General.OptionsFileName
Geometry.OldRuledSurface
Use old 3-sided ruled surface interpolation (compatibility option for old Gmsh
geometries)
Default value: 0
Saved in: General.OptionsFileName
Geometry.OldNewReg
Use old newreg definition for geometrical transformations (compatibility option
for old Gmsh geometries)
Default value: 1
Saved in: General.OptionsFileName
Geometry.Points
Display geometry points?
Default value: 1
Saved in: General.OptionsFileName
Geometry.PointNumbers
Display points numbers?
Default value: 0
Saved in: General.OptionsFileName
Geometry.PointSelectSize
Display size of selected points (in pixels)
Default value: 5
Saved in: General.OptionsFileName
Geometry.PointSize
Display size of points (in pixels)
Default value: 4
Saved in: General.OptionsFileName
Geometry.PointType
Display points as solid color dots (0) or 3D spheres (1)
Default value: 0
Saved in: General.OptionsFileName
Geometry.ScalingFactor
Global geometry scaling factor
Default value: 1
Saved in: General.OptionsFileName
184 Gmsh 3.0
Geometry.OrientedPhysicals
Use sign of elementary entity in physical definition as orientation indicator
Default value: 1
Saved in: General.OptionsFileName
Geometry.SnapX
Snapping grid spacing along the X-axis
Default value: 0.1
Saved in: General.OptionsFileName
Geometry.SnapY
Snapping grid spacing along the Y-axis
Default value: 0.1
Saved in: General.OptionsFileName
Geometry.SnapZ
Snapping grid spacing along the Z-axis
Default value: 0.1
Saved in: General.OptionsFileName
Geometry.Surfaces
Display geometry surfaces?
Default value: 0
Saved in: General.OptionsFileName
Geometry.SurfaceNumbers
Display surface numbers?
Default value: 0
Saved in: General.OptionsFileName
Geometry.SurfaceType
Surface display type (0=cross, 1=wireframe, 2=solid)
Default value: 2
Saved in: General.OptionsFileName
Geometry.Tangents
Display size of tangent vectors (in pixels)
Default value: 0
Saved in: General.OptionsFileName
Geometry.Tolerance
Geometrical tolerance
Default value: 1e-08
Saved in: General.OptionsFileName
Geometry.ToleranceBoolean
Geometrical tolerance for boolean operations
Default value: 0
Saved in: General.OptionsFileName
Appendix B: Options 185
Geometry.Transform
Transform model display coordinates (0=no, 1=scale)
Default value: 0
Saved in: -
Geometry.TransformXX
Element (1,1) of the 3x3 model display transformation matrix
Default value: 1
Saved in: -
Geometry.TransformXY
Element (1,2) of the 3x3 model display transformation matrix
Default value: 0
Saved in: -
Geometry.TransformXZ
Element (1,3) of the 3x3 model display transformation matrix
Default value: 0
Saved in: -
Geometry.TransformYX
Element (2,1) of the 3x3 model display transformation matrix
Default value: 0
Saved in: -
Geometry.TransformYY
Element (2,2) of the 3x3 model display transformation matrix
Default value: 1
Saved in: -
Geometry.TransformYZ
Element (2,3) of the 3x3 model display transformation matrix
Default value: 0
Saved in: -
Geometry.TransformZX
Element (3,1) of the 3x3 model display transformation matrix
Default value: 0
Saved in: -
Geometry.TransformZY
Element (3,2) of the 3x3 model display transformation matrix
Default value: 0
Saved in: -
Geometry.TransformZZ
Element (3,3) of the 3x3 model display transformation matrix
Default value: 1
Saved in: -
186 Gmsh 3.0
Geometry.Volumes
Display geometry volumes? (not implemented yet)
Default value: 0
Saved in: General.OptionsFileName
Geometry.VolumeNumbers
Display volume numbers? (not implemented yet)
Default value: 0
Saved in: General.OptionsFileName
Geometry.Color.Points
Normal geometry point color
Default value: {90,90,90}
Saved in: General.OptionsFileName
Geometry.Color.Lines
Normal geometry curve color
Default value: {0,0,255}
Saved in: General.OptionsFileName
Geometry.Color.Surfaces
Normal geometry surface color
Default value: {128,128,128}
Saved in: General.OptionsFileName
Geometry.Color.Volumes
Normal geometry volume color
Default value: {255,255,0}
Saved in: General.OptionsFileName
Geometry.Color.Selection
Selected geometry color
Default value: {255,0,0}
Saved in: General.OptionsFileName
Geometry.Color.HighlightZero
Highlight 0 color
Default value: {255,0,0}
Saved in: General.OptionsFileName
Geometry.Color.HighlightOne
Highlight 1 color
Default value: {255,150,0}
Saved in: General.OptionsFileName
Geometry.Color.HighlightTwo
Highlight 2 color
Default value: {255,255,0}
Saved in: General.OptionsFileName
Appendix B: Options 187
Geometry.Color.Tangents
Tangent geometry vectors color
Default value: {255,255,0}
Saved in: General.OptionsFileName
Geometry.Color.Normals
Normal geometry vectors color
Default value: {255,0,0}
Saved in: General.OptionsFileName
Geometry.Color.Projection
Projection surface color
Default value: {0,255,0}
Saved in: General.OptionsFileName
Mesh.Algorithm3D
3D mesh algorithm (1=Delaunay, 2=New Delaunay, 4=Frontal, 5=Frontal De-
launay, 6=Frontal Hex, 7=MMG3D, 9=R-tree)
Default value: 1
Saved in: General.OptionsFileName
Mesh.AngleSmoothNormals
Threshold angle below which normals are not smoothed
Default value: 30
Saved in: General.OptionsFileName
Mesh.AnisoMax
Maximum anisotropy of the mesh
Default value: 1e+33
Saved in: General.OptionsFileName
Mesh.AllowSwapAngle
Threshold angle (in degrees) between faces normals under which we allow an
edge swap
Default value: 10
Saved in: General.OptionsFileName
Mesh.BdfFieldFormat
Field format for Nastran BDF files (0=free, 1=small, 2=large)
Default value: 1
Saved in: General.OptionsFileName
188 Gmsh 3.0
Mesh.Binary
Write mesh files in binary format (if possible)
Default value: 0
Saved in: General.OptionsFileName
Mesh.Lloyd
Apply lloyd optimization on surface meshes
Default value: 0
Saved in: General.OptionsFileName
Mesh.SmoothCrossField
Apply n barycentric smoothing passes to the cross field
Default value: 0
Saved in: General.OptionsFileName
Mesh.CgnsImportOrder
Enable the creation of high-order mesh from CGNS structured meshes(1, 2, 4,
8, ...)
Default value: 1
Saved in: General.OptionsFileName
Mesh.ChacoArchitecture
(Adv. Chaco): Parallel architecture topology (0=hypercube, 1-3=mesh dimen-
sions)
Default value: 1
Saved in: General.OptionsFileName
Mesh.ChacoEigensolver
(Adv. Chaco): Type of eigensolver for a spectral algorithm (0=Lanczos,
1=Multilevel RQI/Symmlq)
Default value: 1
Saved in: General.OptionsFileName
Mesh.ChacoEigTol
(Adv. Chaco): Tolerance of the eigensolver for spectral or multilevel-KL algo-
rithms
Default value: 0.001
Saved in: General.OptionsFileName
Mesh.ChacoGlobalMethod
Chaco partitioning algorithm (1=Multilevel-KL, 2=Spectral, 4=Linear,
5=Random, 6=Scattered)
Default value: 1
Saved in: General.OptionsFileName
Mesh.ChacoHypercubeDim
(Adv. Chaco): Dimensional partitioning for a hypercube topology
Default value: 0
Saved in: General.OptionsFileName
Appendix B: Options 189
Mesh.ChacoLocalMethod
(Adv. Chaco): Local partitioning algorithm
Default value: 1
Saved in: General.OptionsFileName
Mesh.ChacoMeshDim1
(Adv. Chaco): Number of partitions in the first dimension of a mesh topology
Default value: 1
Saved in: General.OptionsFileName
Mesh.ChacoMeshDim2
(Adv. Chaco): Number of partitions in the second dimension of a mesh topology
Default value: 1
Saved in: General.OptionsFileName
Mesh.ChacoMeshDim3
(Adv. Chaco): Number of partitions in the third dimension of a mesh topology
Default value: 1
Saved in: General.OptionsFileName
Mesh.ChacoPartitionSection
(Adv. Chaco): Partition by (1=bisection, 2=quadrisection, 3=octasection
Default value: 1
Saved in: General.OptionsFileName
Mesh.ChacoSeed
(Adv. Chaco): Seed for random number generator
Default value: 7.65432e+06
Saved in: General.OptionsFileName
Mesh.ChacoVMax
(Adv. Chaco): Maximum vertices in a coarse graph (for multilevel-KL algo-
rithm and Multilevel RQI/Symmlq eigensolver)
Default value: 250
Saved in: General.OptionsFileName
Mesh.ChacoParamINTERNAL_VERTICES
(Adv. Chaco): Parameter INTERNAL VERTICES
Default value: 0
Saved in: General.OptionsFileName
Mesh.ChacoParamREFINE_MAP
(Adv. Chaco): Parameter REFINE MAP
Default value: 1
Saved in: General.OptionsFileName
Mesh.ChacoParamREFINE_PARTITION
(Adv. Chaco): Parameter REFINE PARTITION
Default value: 0
Saved in: General.OptionsFileName
190 Gmsh 3.0
Mesh.ChacoParamTERMINAL_PROPOGATION
(Adv. Chaco): Parameter TERMINAL PROPOGATION
Default value: 0
Saved in: General.OptionsFileName
Mesh.CharacteristicLengthExtendFromBoundary
Extend computation of mesh element sizes from the boundaries into the sur-
faces/volumes
Default value: 1
Saved in: General.OptionsFileName
Mesh.CharacteristicLengthFactor
Factor applied to all mesh element sizes
Default value: 1
Saved in: General.OptionsFileName
Mesh.CharacteristicLengthMin
Minimum mesh element size
Default value: 0
Saved in: General.OptionsFileName
Mesh.CharacteristicLengthMax
Maximum mesh element size
Default value: 1e+22
Saved in: General.OptionsFileName
Mesh.CharacteristicLengthFromCurvature
Automatically compute mesh element sizes from curvature (experimental)
Default value: 0
Saved in: General.OptionsFileName
Mesh.CharacteristicLengthFromPoints
Compute mesh element sizes from values given at geometry points
Default value: 1
Saved in: General.OptionsFileName
Mesh.Clip
Enable clipping planes? (Plane[i]=2^i, i=0,...,5)
Default value: 0
Saved in: -
Mesh.ColorCarousel
Mesh coloring (0=by element type, 1=by elementary entity, 2=by physical en-
tity, 3=by partition)
Default value: 1
Saved in: General.OptionsFileName
Mesh.CpuTime
CPU time (in seconds) for the generation of the current mesh (read-only)
Default value: 0
Saved in: -
Appendix B: Options 191
Mesh.DrawSkinOnly
Draw only the skin of 3D meshes?
Default value: 0
Saved in: General.OptionsFileName
Mesh.Dual
Display the dual mesh obtained by barycentric subdivision
Default value: 0
Saved in: General.OptionsFileName
Mesh.ElementOrder
Element order (1=linear elements, N (<6) = elements of higher order)
Default value: 1
Saved in: General.OptionsFileName
Mesh.Explode
Element shrinking factor (between 0 and 1)
Default value: 1
Saved in: General.OptionsFileName
Mesh.FlexibleTransfinite
Allow transfinite contraints to be modified for Blossom or by global mesh size
factor
Default value: 0
Saved in: General.OptionsFileName
Mesh.NewtonConvergenceTestXYZ
Force inverse surface mapping algorithm (Newton-Raphson) to converge in real
coordinates (experimental)
Default value: 0
Saved in: General.OptionsFileName
Mesh.Format
Mesh output format (1=msh, 2=unv, 10=automatic, 19=vrml, 26=pos statis-
tics, 27=stl, 30=mesh, 31=bdf, 32=cgns, 33=med, 39=inp, 40=ply2)
Default value: 10
Saved in: General.OptionsFileName
Mesh.Hexahedra
Display mesh hexahedra?
Default value: 1
Saved in: General.OptionsFileName
Mesh.HighOrderNumLayers
Number of high order mesh elements to consider for optimization
Default value: 6
Saved in: -
Mesh.HighOrderOptimize
Optimize high order meshes?
Default value: 0
Saved in: General.OptionsFileName
192 Gmsh 3.0
Mesh.HighOrderPoissonRatio
Poisson ratio of the material used in the elastic smoother for high order mesh-
esMust be between -1.0 and 0.5, excluded
Default value: 0.33
Saved in: -
Mesh.HighOrderThresholdMin
Minimum threshold for high order element optimization
Default value: 0.1
Saved in: General.OptionsFileName
Mesh.HighOrderThresholdMax
Maximum threshold for high order element optimization
Default value: 2
Saved in: General.OptionsFileName
Mesh.HighOrderOptPrimSurfMesh
Try to fix flipped surface mesh elements in high-order optimizer
Default value: 0
Saved in: General.OptionsFileName
Mesh.LabelSampling
Label sampling rate (display one label every LabelSampling elements)
Default value: 1
Saved in: General.OptionsFileName
Mesh.LabelType
Type of element label (0=element number, 1=elementary entity number,
2=physical entity number, 3=partition number, 4=coordinates)
Default value: 0
Saved in: General.OptionsFileName
Mesh.LcIntegrationPrecision
Accuracy of evaluation of the LC field for 1D mesh generation
Default value: 1e-09
Saved in: General.OptionsFileName
Mesh.Light
Enable lighting for the mesh
Default value: 1
Saved in: General.OptionsFileName
Mesh.LightLines
Enable lighting for mesh edges (0=no, 1=surfaces, 2=surfaces+volumes
Default value: 2
Saved in: General.OptionsFileName
Mesh.LightTwoSide
Light both sides of surfaces (leads to slower rendering)
Default value: 0
Saved in: General.OptionsFileName
Appendix B: Options 193
Mesh.Lines
Display mesh lines (1D elements)?
Default value: 0
Saved in: General.OptionsFileName
Mesh.LineNumbers
Display mesh line numbers?
Default value: 0
Saved in: General.OptionsFileName
Mesh.LineWidth
Display width of mesh lines (in pixels)
Default value: 1
Saved in: General.OptionsFileName
Mesh.MeshOnlyVisible
Mesh only visible entities (experimental: use with caution!)
Default value: 0
Saved in: General.OptionsFileName
Mesh.MetisAlgorithm
METIS partitioning algorithm (1=Recursive, 2=K-way, 3=Nodal weight)
Default value: 1
Saved in: General.OptionsFileName
Mesh.MetisEdgeMatching
(Adv. METIS): Determines the matching type (1=Random, 2=Heavy-Edge,
3=Sorted Heavy-Edge)
Default value: 3
Saved in: General.OptionsFileName
Mesh.MetisRefinementAlgorithm
(Adv. METIS): Algorithm for k-way refinement (1=Random, 2=Greedy,
3=Random with minimized connectivity)
Default value: 3
Saved in: General.OptionsFileName
Mesh.MinimumCirclePoints
Minimum number of points used to mesh a circle
Default value: 7
Saved in: General.OptionsFileName
Mesh.MinimumCurvePoints
Minimum number of points used to mesh a (non-straight) curve
Default value: 3
Saved in: General.OptionsFileName
Mesh.MshFileVersion
Version of the MSH file format to use
Default value: 2.2
Saved in: General.OptionsFileName
194 Gmsh 3.0
Mesh.MshFilePartitioned
Split MSH file by mesh partition (0: no, 1: yes, 2: create physicals by partition)
Default value: 0
Saved in: General.OptionsFileName
Mesh.PartitionHexWeight
Weight of hexahedral element for METIS load balancing
Default value: 1
Saved in: General.OptionsFileName
Mesh.PartitionPrismWeight
Weight of prismatic element (wedge) for METIS load balancing
Default value: 1
Saved in: General.OptionsFileName
Mesh.PartitionPyramidWeight
Weight of pyramidal element for METIS load balancing
Default value: 1
Saved in: General.OptionsFileName
Mesh.PartitionTrihedronWeight
Weight of trihedron element for METIS load balancing
Default value: 0
Saved in: General.OptionsFileName
Mesh.PartitionQuadWeight
Weight of quadrangle for METIS load balancing
Default value: 1
Saved in: General.OptionsFileName
Mesh.PartitionTetWeight
Weight of tetrahedral element for METIS load balancing
Default value: 1
Saved in: General.OptionsFileName
Mesh.PartitionTriWeight
Weight of triangle for METIS load balancing
Default value: 1
Saved in: General.OptionsFileName
Mesh.NbHexahedra
Number of hexahedra in the current mesh (read-only)
Default value: 0
Saved in: -
Mesh.NbNodes
Number of nodes in the current mesh (read-only)
Default value: 0
Saved in: -
Appendix B: Options 195
Mesh.NbPartitions
Number of partitions
Default value: 1
Saved in: General.OptionsFileName
Mesh.NbPrisms
Number of prisms in the current mesh (read-only)
Default value: 0
Saved in: -
Mesh.NbPyramids
Number of pyramids in the current mesh (read-only)
Default value: 0
Saved in: -
Mesh.NbTrihedra
Number of trihedra in the current mesh (read-only)
Default value: 0
Saved in: -
Mesh.NbQuadrangles
Number of quadrangles in the current mesh (read-only)
Default value: 0
Saved in: -
Mesh.NbTetrahedra
Number of tetrahedra in the current mesh (read-only)
Default value: 0
Saved in: -
Mesh.NbTriangles
Number of triangles in the current mesh (read-only)
Default value: 0
Saved in: -
Mesh.Normals
Display size of normal vectors (in pixels)
Default value: 0
Saved in: General.OptionsFileName
Mesh.NumSubEdges
Number of edge subdivisions when displaying high order elements
Default value: 2
Saved in: General.OptionsFileName
Mesh.OldRefinement
Use old 3D point insertion algorithm
Default value: 1
Saved in: General.OptionsFileName
196 Gmsh 3.0
Mesh.Optimize
Optimize the mesh to improve the quality of tetrahedral elements
Default value: 1
Saved in: General.OptionsFileName
Mesh.OptimizeThreshold
Optimize tetrahedra that have a quality below ...
Default value: 0.3
Saved in: General.OptionsFileName
Mesh.OptimizeNetgen
Optimize the mesh using Netgen to improve the quality of tetrahedral elements
Default value: 0
Saved in: General.OptionsFileName
Mesh.Partitioner
Partitioner software (1=Chacho, 2=METIS)
Default value: 2
Saved in: General.OptionsFileName
Mesh.Points
Display mesh vertices (nodes)?
Default value: 0
Saved in: General.OptionsFileName
Mesh.PointNumbers
Display mesh node numbers?
Default value: 0
Saved in: General.OptionsFileName
Mesh.PointSize
Display size of mesh vertices (in pixels)
Default value: 4
Saved in: General.OptionsFileName
Mesh.PointType
Display mesh vertices as solid color dots (0) or 3D spheres (1)
Default value: 0
Saved in: General.OptionsFileName
Mesh.Prisms
Display mesh prisms?
Default value: 1
Saved in: General.OptionsFileName
Mesh.Pyramids
Display mesh pyramids?
Default value: 1
Saved in: General.OptionsFileName
Appendix B: Options 197
Mesh.Trihedra
Display mesh trihedra?
Default value: 1
Saved in: General.OptionsFileName
Mesh.Quadrangles
Display mesh quadrangles?
Default value: 1
Saved in: General.OptionsFileName
Mesh.QualityInf
Only display elements whose quality measure is greater than QualityInf
Default value: 0
Saved in: General.OptionsFileName
Mesh.QualitySup
Only display elements whose quality measure is smaller than QualitySup
Default value: 0
Saved in: General.OptionsFileName
Mesh.QualityType
Type of quality measure (0=gamma~vol/sum face/max edge,
1=eta~vol^(2/3)/sum edge^2, 2=rho~min edge/max edge)
Default value: 2
Saved in: General.OptionsFileName
Mesh.RadiusInf
Only display elements whose longest edge is greater than RadiusInf
Default value: 0
Saved in: General.OptionsFileName
Mesh.RadiusSup
Only display elements whose longest edge is smaller than RadiusSup
Default value: 0
Saved in: General.OptionsFileName
Mesh.RandomFactor
Random factor used in the 2D meshing algorithm (should be increased if Ran-
domFactor * size(triangle)/size(model) approaches machine accuracy)
Default value: 1e-09
Saved in: General.OptionsFileName
Mesh.IgnorePartitionBoundary
Ignore partitions boundaries (0=no, 1=yes)
Default value: 0
Saved in: General.OptionsFileName
Mesh.PreserveNumberingMsh2
Preserve element numbering in MSH2 format (will break meshes with multiple
physical groups for a single elementary entity)
Default value: 0
Saved in: General.OptionsFileName
198 Gmsh 3.0
Mesh.IgnorePeriodicity
Ignore alignement of periodic boundaries when reading the mesh (used by Par-
aView plugin)
Default value: 0
Saved in: General.OptionsFileName
Mesh.RecombinationAlgorithm
Mesh recombination algorithm (0=standard, 1=blossom)
Default value: 1
Saved in: General.OptionsFileName
Mesh.RecombineAll
Apply recombination algorithm to all surfaces, ignoring per-surface spec
Default value: 0
Saved in: General.OptionsFileName
Mesh.Recombine3DAll
Apply recombination3D algorithm to all volumes, ignoring per-volume spec
Default value: 0
Saved in: General.OptionsFileName
Mesh.Recombine3DLevel
3d recombination level (0: hex, 1: hex+prisms, 2: hex+prism+pyramids)
Default value: 0
Saved in: General.OptionsFileName
Mesh.Recombine3DConformity
3d recombination conformity type (0: nonconforming, 1: trihedra, 2: pyra-
mids+trihedra, 3:pyramids+hexSplit+trihedra, 4:hexSplit+trihedra)
Default value: 0
Saved in: General.OptionsFileName
Mesh.DoRecombinationTest
Apply recombination algorithm for test
Default value: 0
Saved in: General.OptionsFileName
Mesh.RecombinationTestHorizStart
Depth start
Default value: 1
Saved in: General.OptionsFileName
Mesh.RecombinationTestNoGreedyStrat
No greedy (global) strategies
Default value: 0
Saved in: General.OptionsFileName
Mesh.RemeshAlgorithm
Remeshing algorithm (0=no split, 1=automatic, 2=automatic only with metis)
Default value: 0
Saved in: General.OptionsFileName
Appendix B: Options 199
Mesh.RemeshParametrization
Remeshing using discrete parametrization (0=harmonic circle, 1=confor-
mal spectral, 2=rbf, 3=harmonic plane, 4=convex circle, 5=convex plane,
6=harmonic square, 7=conformal fe
Default value: 4
Saved in: General.OptionsFileName
Mesh.RefineSteps
Number of refinement steps in the MeshAdapt-based 2D algorithms
Default value: 10
Saved in: General.OptionsFileName
Mesh.SaveAll
Ignore Physical definitions and save all elements
Default value: 0
Saved in: -
Mesh.SaveElementTagType
Type of the element tag saved in mesh formats that dont support saving phys-
ical or partition ids (1=elementary, 2=physical, 3=partition)
Default value: 1
Saved in: General.OptionsFileName
Mesh.SaveTopology
Save model topology in MSH2 output files (this is always saved in MSH3)
Default value: 0
Saved in: General.OptionsFileName
Mesh.SaveParametric
Save parametric coordinates of nodes
Default value: 0
Saved in: General.OptionsFileName
Mesh.SaveGroupsOfNodes
Save groups of nodes for each physical line and surface (UNV mesh format only)
Default value: 0
Saved in: General.OptionsFileName
Mesh.ScalingFactor
Global scaling factor applied to the saved mesh
Default value: 1
Saved in: General.OptionsFileName
Mesh.SecondOrderExperimental
Use experimental code to generate second order mesh
Default value: 0
Saved in: General.OptionsFileName
Mesh.SecondOrderIncomplete
Create incomplete second order elements? (8-node quads, 20-node hexas, etc.)
Default value: 0
Saved in: General.OptionsFileName
200 Gmsh 3.0
Mesh.SecondOrderLinear
Should second order vertices simply be created by linear interpolation?
Default value: 0
Saved in: General.OptionsFileName
Mesh.Smoothing
Number of smoothing steps applied to the final mesh
Default value: 1
Saved in: General.OptionsFileName
Mesh.SmoothNormals
Smooth the mesh normals?
Default value: 0
Saved in: General.OptionsFileName
Mesh.SmoothRatio
Ratio between mesh sizes at vertices of a same edeg (used in BAMG)
Default value: 1.8
Saved in: General.OptionsFileName
Mesh.SubdivisionAlgorithm
Mesh subdivision algorithm (0=none, 1=all quadrangles, 2=all hexahedra)
Default value: 0
Saved in: General.OptionsFileName
Mesh.SurfaceEdges
Display edges of surface mesh?
Default value: 1
Saved in: General.OptionsFileName
Mesh.SurfaceFaces
Display faces of surface mesh?
Default value: 0
Saved in: General.OptionsFileName
Mesh.SurfaceNumbers
Display surface mesh element numbers?
Default value: 0
Saved in: General.OptionsFileName
Mesh.SwitchElementTags
Invert elementary and physical tags when reading the mesh
Default value: 0
Saved in: General.OptionsFileName
Mesh.Tangents
Display size of tangent vectors (in pixels)
Default value: 0
Saved in: General.OptionsFileName
Appendix B: Options 201
Mesh.Tetrahedra
Display mesh tetrahedra?
Default value: 1
Saved in: General.OptionsFileName
Mesh.ToleranceEdgeLength
Skip a model edge in mesh generation if its length is less than users defined
tolerance
Default value: 0
Saved in: General.OptionsFileName
Mesh.ToleranceInitialDelaunay
Tolerance for initial 3D Delaunay mesher
Default value: 1e-08
Saved in: General.OptionsFileName
Mesh.Triangles
Display mesh triangles?
Default value: 1
Saved in: General.OptionsFileName
Mesh.VolumeEdges
Display edges of volume mesh?
Default value: 1
Saved in: General.OptionsFileName
Mesh.VolumeFaces
Display faces of volume mesh?
Default value: 0
Saved in: General.OptionsFileName
Mesh.VolumeNumbers
Display volume mesh element numbers?
Default value: 0
Saved in: General.OptionsFileName
Mesh.Voronoi
Display the voronoi diagram
Default value: 0
Saved in: General.OptionsFileName
Mesh.ZoneDefinition
Method for defining a zone (0=single zone, 1=by partition, 2=by physical)
Default value: 0
Saved in: General.OptionsFileName
Mesh.Color.Points
Mesh node color
Default value: {0,0,255}
Saved in: General.OptionsFileName
202 Gmsh 3.0
Mesh.Color.PointsSup
Second order mesh node color
Default value: {255,0,255}
Saved in: General.OptionsFileName
Mesh.Color.Lines
Mesh line color
Default value: {0,0,0}
Saved in: General.OptionsFileName
Mesh.Color.Triangles
Mesh triangle color (if Mesh.ColorCarousel=0)
Default value: {160,150,255}
Saved in: General.OptionsFileName
Mesh.Color.Quadrangles
Mesh quadrangle color (if Mesh.ColorCarousel=0)
Default value: {130,120,225}
Saved in: General.OptionsFileName
Mesh.Color.Tetrahedra
Mesh tetrahedron color (if Mesh.ColorCarousel=0)
Default value: {160,150,255}
Saved in: General.OptionsFileName
Mesh.Color.Hexahedra
Mesh hexahedron color (if Mesh.ColorCarousel=0)
Default value: {130,120,225}
Saved in: General.OptionsFileName
Mesh.Color.Prisms
Mesh prism color (if Mesh.ColorCarousel=0)
Default value: {232,210,23}
Saved in: General.OptionsFileName
Mesh.Color.Pyramids
Mesh pyramid color (if Mesh.ColorCarousel=0)
Default value: {217,113,38}
Saved in: General.OptionsFileName
Mesh.Color.Trihedra
Mesh trihedron color (if Mesh.ColorCarousel=0)
Default value: {20,255,0}
Saved in: General.OptionsFileName
Mesh.Color.Tangents
Tangent mesh vector color
Default value: {255,255,0}
Saved in: General.OptionsFileName
Appendix B: Options 203
Mesh.Color.Normals
Normal mesh vector color
Default value: {255,0,0}
Saved in: General.OptionsFileName
Mesh.Color.Zero
Color 0 in color carousel
Default value: {255,120,0}
Saved in: General.OptionsFileName
Mesh.Color.One
Color 1 in color carousel
Default value: {0,255,132}
Saved in: General.OptionsFileName
Mesh.Color.Two
Color 2 in color carousel
Default value: {255,160,0}
Saved in: General.OptionsFileName
Mesh.Color.Three
Color 3 in color carousel
Default value: {0,255,192}
Saved in: General.OptionsFileName
Mesh.Color.Four
Color 4 in color carousel
Default value: {255,200,0}
Saved in: General.OptionsFileName
Mesh.Color.Five
Color 5 in color carousel
Default value: {0,216,255}
Saved in: General.OptionsFileName
Mesh.Color.Six
Color 6 in color carousel
Default value: {255,240,0}
Saved in: General.OptionsFileName
Mesh.Color.Seven
Color 7 in color carousel
Default value: {0,176,255}
Saved in: General.OptionsFileName
Mesh.Color.Eight
Color 8 in color carousel
Default value: {228,255,0}
Saved in: General.OptionsFileName
204 Gmsh 3.0
Mesh.Color.Nine
Color 9 in color carousel
Default value: {0,116,255}
Saved in: General.OptionsFileName
Mesh.Color.Ten
Color 10 in color carousel
Default value: {188,255,0}
Saved in: General.OptionsFileName
Mesh.Color.Eleven
Color 11 in color carousel
Default value: {0,76,255}
Saved in: General.OptionsFileName
Mesh.Color.Twelve
Color 12 in color carousel
Default value: {148,255,0}
Saved in: General.OptionsFileName
Mesh.Color.Thirteen
Color 13 in color carousel
Default value: {24,0,255}
Saved in: General.OptionsFileName
Mesh.Color.Fourteen
Color 14 in color carousel
Default value: {108,255,0}
Saved in: General.OptionsFileName
Mesh.Color.Fifteen
Color 15 in color carousel
Default value: {84,0,255}
Saved in: General.OptionsFileName
Mesh.Color.Sixteen
Color 16 in color carousel
Default value: {68,255,0}
Saved in: General.OptionsFileName
Mesh.Color.Seventeen
Color 17 in color carousel
Default value: {104,0,255}
Saved in: General.OptionsFileName
Mesh.Color.Eighteen
Color 18 in color carousel
Default value: {0,255,52}
Saved in: General.OptionsFileName
Appendix B: Options 205
Mesh.Color.Nineteen
Color 19 in color carousel
Default value: {184,0,255}
Saved in: General.OptionsFileName
Solver.Executable9
System command to launch solver 9
Default value: ""
Saved in: General.SessionFileName
Solver.Name0
Name of solver 0
Default value: "GetDP"
Saved in: General.SessionFileName
Solver.Name1
Name of solver 1
Default value: ""
Saved in: General.SessionFileName
Solver.Name2
Name of solver 2
Default value: ""
Saved in: General.SessionFileName
Solver.Name3
Name of solver 3
Default value: ""
Saved in: General.SessionFileName
Solver.Name4
Name of solver 4
Default value: ""
Saved in: General.SessionFileName
Solver.Name5
Name of solver 5
Default value: ""
Saved in: General.SessionFileName
Solver.Name6
Name of solver 6
Default value: ""
Saved in: General.SessionFileName
Solver.Name7
Name of solver 7
Default value: ""
Saved in: General.SessionFileName
Solver.Name8
Name of solver 8
Default value: ""
Saved in: General.SessionFileName
Appendix B: Options 207
Solver.Name9
Name of solver 9
Default value: ""
Saved in: General.SessionFileName
Solver.Extension0
File extension for solver 0
Default value: ".pro"
Saved in: General.SessionFileName
Solver.Extension1
File extension for solver 1
Default value: ""
Saved in: General.SessionFileName
Solver.Extension2
File extension for solver 2
Default value: ""
Saved in: General.SessionFileName
Solver.Extension3
File extension for solver 3
Default value: ""
Saved in: General.SessionFileName
Solver.Extension4
File extension for solver 4
Default value: ""
Saved in: General.SessionFileName
Solver.Extension5
File extension for solver 5
Default value: ""
Saved in: General.SessionFileName
Solver.Extension6
File extension for solver 6
Default value: ""
Saved in: General.SessionFileName
Solver.Extension7
File extension for solver 7
Default value: ""
Saved in: General.SessionFileName
Solver.Extension8
File extension for solver 8
Default value: ""
Saved in: General.SessionFileName
208 Gmsh 3.0
Solver.Extension9
File extension for solver 9
Default value: ""
Saved in: General.SessionFileName
Solver.OctaveInterpreter
Name of the Octave interpreter (used to run .m files)
Default value: "octave"
Saved in: General.SessionFileName
Solver.PythonInterpreter
Name of the Python interpreter (used to run .py files if they are not executable)
Default value: "python"
Saved in: General.SessionFileName
Solver.RemoteLogin0
Command to login to a remote host to launch solver 0
Default value: ""
Saved in: General.SessionFileName
Solver.RemoteLogin1
Command to login to a remote host to launch solver 1
Default value: ""
Saved in: General.SessionFileName
Solver.RemoteLogin2
Command to login to a remote host to launch solver 2
Default value: ""
Saved in: General.SessionFileName
Solver.RemoteLogin3
Command to login to a remote host to launch solver 3
Default value: ""
Saved in: General.SessionFileName
Solver.RemoteLogin4
Command to login to a remote host to launch solver 4
Default value: ""
Saved in: General.SessionFileName
Solver.RemoteLogin5
Command to login to a remote host to launch solver 5
Default value: ""
Saved in: General.SessionFileName
Solver.RemoteLogin6
Command to login to a remote host to launch solver 6
Default value: ""
Saved in: General.SessionFileName
Appendix B: Options 209
Solver.RemoteLogin7
Command to login to a remote host to launch solver 7
Default value: ""
Saved in: General.SessionFileName
Solver.RemoteLogin8
Command to login to a remote host to launch solver 8
Default value: ""
Saved in: General.SessionFileName
Solver.RemoteLogin9
Command to login to a remote host to launch solver 9
Default value: ""
Saved in: General.SessionFileName
Solver.SocketName
Base name of socket (UNIX socket if the name does not contain a colon, TCP/IP
otherwise, in the form host:baseport; the actual name/port is constructed by
appending the unique client id. If baseport is 0 or is not provided, the port is
chosen automatically (recommended))
Default value: ".gmshsock"
Saved in: General.OptionsFileName
Solver.AlwaysListen
Always listen to incoming connection requests?
Default value: 0
Saved in: General.OptionsFileName
Solver.AutoArchiveOutputFiles
Automatically archive output files after each computation
Default value: 0
Saved in: General.OptionsFileName
Solver.AutoCheck
Automatically check model every time a parameter is changed
Default value: 1
Saved in: General.OptionsFileName
Solver.AutoLoadDatabase
Automatically load the ONELAB database when launching a solver
Default value: 0
Saved in: General.OptionsFileName
Solver.AutoSaveDatabase
Automatically save the ONELAB database after each computation
Default value: 1
Saved in: General.OptionsFileName
Solver.AutoMesh
Automatically mesh if necesssary (0: never remesh; 1: on startup, use existing
mesh on disk if available; 2: always remesh; -1: the geometry script creates the
mesh)
210 Gmsh 3.0
Default value: 1
Saved in: General.OptionsFileName
Solver.AutoMergeFile
Automatically merge result files
Default value: 1
Saved in: General.OptionsFileName
Solver.AutoShowViews
Automcatically show newly merged results (0: none; 1: all; 2: last one)
Default value: 2
Saved in: General.OptionsFileName
Solver.AutoShowLastStep
Automatically show the last step in newly merged results, if there are more
than 2 steps
Default value: 1
Saved in: General.OptionsFileName
Solver.Plugins
Enable default solver plugins?
Default value: 0
Saved in: General.OptionsFileName
Solver.ShowInvisibleParameters
Show all parameters, even those marked invisible
Default value: 0
Saved in: General.OptionsFileName
Solver.Timeout
Time (in seconds) before closing the socket if no connection is happening
Default value: 5
Saved in: General.OptionsFileName
PostProcessing.AnimationCycle
Cycle through time steps (0) or views (1) for animations
Default value: 0
Saved in: General.OptionsFileName
PostProcessing.AnimationStep
Step increment for animations
Default value: 1
Saved in: General.OptionsFileName
PostProcessing.CombineRemoveOriginal
Remove original views after a Combine operation
Default value: 1
Saved in: General.OptionsFileName
PostProcessing.DoubleClickedGraphPointX
Abscissa of last double-clicked graph point
Default value: 0
Saved in: -
PostProcessing.DoubleClickedGraphPointY
Ordinate of last double-clicked graph point
Default value: 0
Saved in: -
PostProcessing.DoubleClickedView
Index of last double-clicked view
Default value: 0
Saved in: -
PostProcessing.ForceElementData
Try to force saving datasets as ElementData
Default value: 0
Saved in: General.OptionsFileName
PostProcessing.ForceNodeData
Try to force saving datasets as NodeData
Default value: 0
Saved in: General.OptionsFileName
PostProcessing.Format
Default file format for post-processing views (0=ASCII view, 1=binary view,
2=parsed view, 3=STL triangulation, 4=raw text, 5=Gmsh mesh, 6=MED file,
10=automatic)
Default value: 10
Saved in: General.OptionsFileName
PostProcessing.GraphPointX
Synonym for DoubleClickedGraphPointX
Default value: 0
Saved in: -
212 Gmsh 3.0
PostProcessing.GraphPointY
Synonym for DoubleClickedGraphPointY
Default value: 0
Saved in: -
PostProcessing.HorizontalScales
Display value scales horizontally
Default value: 1
Saved in: General.OptionsFileName
PostProcessing.Link
Post-processing view links (0=apply next option changes to selected views,
1=force same options for all selected views)
Default value: 0
Saved in: General.OptionsFileName
PostProcessing.NbViews
Current number of views merged (read-only)
Default value: 0
Saved in: -
PostProcessing.Plugins
Enable default post-processing plugins?
Default value: 1
Saved in: General.OptionsFileName
PostProcessing.Smoothing
Apply (non-reversible) smoothing to post-processing view when merged
Default value: 0
Saved in: General.OptionsFileName
View.Attributes
Optional string attributes
Default value: ""
Saved in: General.OptionsFileName
View.AxesFormatX
Number format for X-axis (in standard C form)
Default value: "%.3g"
Saved in: General.OptionsFileName
View.AxesFormatY
Number format for Y-axis (in standard C form)
Default value: "%.3g"
Saved in: General.OptionsFileName
View.AxesFormatZ
Number format for Z-axis (in standard C form)
Default value: "%.3g"
Saved in: General.OptionsFileName
Appendix B: Options 213
View.AxesLabelX
X-axis label
Default value: ""
Saved in: General.OptionsFileName
View.AxesLabelY
Y-axis label
Default value: ""
Saved in: General.OptionsFileName
View.AxesLabelZ
Z-axis label
Default value: ""
Saved in: General.OptionsFileName
View.DoubleClickedCommand
Command parsed when double-clicking on the view
Default value: ""
Saved in: General.OptionsFileName
View.FileName
Default post-processing view file name
Default value: ""
Saved in: -
View.Format
Number format (in standard C form)
Default value: "%.3g"
Saved in: General.OptionsFileName
View.GeneralizedRaiseX
Generalized elevation of the view along X-axis (in model coordinates, using
formula possibly containing x, y, z, s[tep], t[ime], v0, ... v8)
Default value: "v0"
Saved in: General.OptionsFileName
View.GeneralizedRaiseY
Generalized elevation of the view along Y-axis (in model coordinates, using
formula possibly containing x, y, z, s[tep], t[ime], v0, ... v8)
Default value: "v1"
Saved in: General.OptionsFileName
View.GeneralizedRaiseZ
Generalized elevation of the view along Z-axis (in model coordinates, using
formula possibly containing x, y, z, s[tep], t[ime], v0, ... v8)
Default value: "v2"
Saved in: General.OptionsFileName
View.Group
Group to which this view belongs
Default value: ""
Saved in: General.OptionsFileName
214 Gmsh 3.0
View.Name
Default post-processing view name
Default value: ""
Saved in: -
View.Stipple0
First stippling pattern
Default value: "1*0x1F1F"
Saved in: General.OptionsFileName
View.Stipple1
Second stippling pattern
Default value: "1*0x3333"
Saved in: General.OptionsFileName
View.Stipple2
Third stippling pattern
Default value: "1*0x087F"
Saved in: General.OptionsFileName
View.Stipple3
Fourth stippling pattern
Default value: "1*0xCCCF"
Saved in: General.OptionsFileName
View.Stipple4
Fifth stippling pattern
Default value: "2*0x1111"
Saved in: General.OptionsFileName
View.Stipple5
Sixth stippling pattern
Default value: "2*0x0F0F"
Saved in: General.OptionsFileName
View.Stipple6
Seventh stippling pattern
Default value: "1*0xCFFF"
Saved in: General.OptionsFileName
View.Stipple7
Eighth stippling pattern
Default value: "2*0x0202"
Saved in: General.OptionsFileName
View.Stipple8
Ninth stippling pattern
Default value: "2*0x087F"
Saved in: General.OptionsFileName
Appendix B: Options 215
View.Stipple9
Tenth stippling pattern
Default value: "1*0xFFFF"
Saved in: General.OptionsFileName
View.AbscissaRangeType
Ascissa scale range type (1=default, 2=custom)
Default value: 1
Saved in: General.OptionsFileName
View.AdaptVisualizationGrid
Use adaptive visualization grid (for high-order elements)?
Default value: 0
Saved in: General.OptionsFileName
View.AngleSmoothNormals
Threshold angle below which normals are not smoothed
Default value: 30
Saved in: General.OptionsFileName
View.ArrowSizeMax
Maximum display size of arrows (in pixels)
Default value: 60
Saved in: General.OptionsFileName
View.ArrowSizeMin
Minimum display size of arrows (in pixels)
Default value: 0
Saved in: General.OptionsFileName
View.AutoPosition
Position the scale or 2D plot automatically (0: manual, 1: automatic, 2: top
left, 3: top right, 4: bottom left, 5: bottom right, 6: top, 7: bottom, 8: left, 9:
right, 10: full, 11: top third, 12: in model coordinates)
Default value: 1
Saved in: General.OptionsFileName
View.Axes
Axes (0=none, 1=simple axes, 2=box, 3=full grid, 4=open grid, 5=ruler)
Default value: 0
Saved in: General.OptionsFileName
View.AxesMikado
Mikado axes style
Default value: 0
Saved in: General.OptionsFileName
View.AxesAutoPosition
Position the axes automatically
Default value: 1
Saved in: General.OptionsFileName
216 Gmsh 3.0
View.AxesMaxX
Maximum X-axis coordinate
Default value: 1
Saved in: General.OptionsFileName
View.AxesMaxY
Maximum Y-axis coordinate
Default value: 1
Saved in: General.OptionsFileName
View.AxesMaxZ
Maximum Z-axis coordinate
Default value: 1
Saved in: General.OptionsFileName
View.AxesMinX
Minimum X-axis coordinate
Default value: 0
Saved in: General.OptionsFileName
View.AxesMinY
Minimum Y-axis coordinate
Default value: 0
Saved in: General.OptionsFileName
View.AxesMinZ
Minimum Z-axis coordinate
Default value: 0
Saved in: General.OptionsFileName
View.AxesTicsX
Number of tics on the X-axis
Default value: 5
Saved in: General.OptionsFileName
View.AxesTicsY
Number of tics on the Y-axis
Default value: 5
Saved in: General.OptionsFileName
View.AxesTicsZ
Number of tics on the Z-axis
Default value: 5
Saved in: General.OptionsFileName
View.Boundary
Draw the N minus b-dimensional boundary of the element (N=element dimen-
sion, b=option value)
Default value: 0
Saved in: General.OptionsFileName
Appendix B: Options 217
View.CenterGlyphs
Center glyphs (arrows, numbers, etc.)? (0=left, 1=centered, 2=right)
Default value: 0
Saved in: General.OptionsFileName
View.Clip
Enable clipping planes? (Plane[i]=2^i, i=0,...,5)
Default value: 0
Saved in: -
View.Closed
Close the subtree containing this view
Default value: 0
Saved in: General.OptionsFileName
View.ColormapAlpha
Colormap alpha channel value (used only if != 1)
Default value: 1
Saved in: General.OptionsFileName
View.ColormapAlphaPower
Colormap alpha channel power
Default value: 0
Saved in: General.OptionsFileName
View.ColormapBeta
Colormap beta parameter (gamma = 1-beta)
Default value: 0
Saved in: General.OptionsFileName
View.ColormapBias
Colormap bias
Default value: 0
Saved in: General.OptionsFileName
View.ColormapCurvature
Colormap curvature or slope coefficient
Default value: 0
Saved in: General.OptionsFileName
View.ColormapInvert
Invert the color values, i.e., replace x with (255-x) in the colormap?
Default value: 0
Saved in: General.OptionsFileName
View.ColormapNumber
Default colormap number (0: black, 1: vis5d, 2: jet, 3: lucie, 4: rainbow, 5:
emc2000, 6: incadescent, 7: hot, 8: pink, 9: grayscale, 10: french, 11: hsv, 12:
spectrum, 13: bone, 14: spring, 15: summer, 16: autumm, 17: winter, 18: cool,
19: copper, 20: magma, 21: inferno, 22: plasma, 23: viridis)
Default value: 2
Saved in: General.OptionsFileName
218 Gmsh 3.0
View.ColormapRotation
Incremental colormap rotation
Default value: 0
Saved in: General.OptionsFileName
View.ColormapSwap
Swap the min/max values in the colormap?
Default value: 0
Saved in: General.OptionsFileName
View.ComponentMap0
Forced component 0 (if View.ForceComponents > 0)
Default value: 0
Saved in: General.OptionsFileName
View.ComponentMap1
Forced component 1 (if View.ForceComponents > 0)
Default value: 1
Saved in: General.OptionsFileName
View.ComponentMap2
Forced component 2 (if View.ForceComponents > 0)
Default value: 2
Saved in: General.OptionsFileName
View.ComponentMap3
Forced component 3 (if View.ForceComponents > 0)
Default value: 3
Saved in: General.OptionsFileName
View.ComponentMap4
Forced component 4 (if View.ForceComponents > 0)
Default value: 4
Saved in: General.OptionsFileName
View.ComponentMap5
Forced component 5 (if View.ForceComponents > 0)
Default value: 5
Saved in: General.OptionsFileName
View.ComponentMap6
Forced component 6 (if View.ForceComponents > 0)
Default value: 6
Saved in: General.OptionsFileName
View.ComponentMap7
Forced component 7 (if View.ForceComponents > 0)
Default value: 7
Saved in: General.OptionsFileName
Appendix B: Options 219
View.ComponentMap8
Forced component 8 (if View.ForceComponents > 0)
Default value: 8
Saved in: General.OptionsFileName
View.CustomAbscissaMax
User-defined maximum abscissa value
Default value: 0
Saved in: -
View.CustomAbscissaMin
User-defined minimum abscissa value
Default value: 0
Saved in: -
View.CustomMax
User-defined maximum value to be displayed
Default value: 0
Saved in: -
View.CustomMin
User-defined minimum value to be displayed
Default value: 0
Saved in: -
View.DisplacementFactor
Displacement amplification
Default value: 1
Saved in: General.OptionsFileName
View.DrawHexahedra
Display post-processing hexahedra?
Default value: 1
Saved in: General.OptionsFileName
View.DrawLines
Display post-processing lines?
Default value: 1
Saved in: General.OptionsFileName
View.DrawPoints
Display post-processing points?
Default value: 1
Saved in: General.OptionsFileName
View.DrawPrisms
Display post-processing prisms?
Default value: 1
Saved in: General.OptionsFileName
220 Gmsh 3.0
View.DrawPyramids
Display post-processing pyramids?
Default value: 1
Saved in: General.OptionsFileName
View.DrawTrihedra
Display post-processing trihedra?
Default value: 1
Saved in: General.OptionsFileName
View.DrawQuadrangles
Display post-processing quadrangles?
Default value: 1
Saved in: General.OptionsFileName
View.DrawScalars
Display scalar values?
Default value: 1
Saved in: General.OptionsFileName
View.DrawSkinOnly
Draw only the skin of 3D scalar views?
Default value: 0
Saved in: General.OptionsFileName
View.DrawStrings
Display post-processing annotation strings?
Default value: 1
Saved in: General.OptionsFileName
View.DrawTensors
Display tensor values?
Default value: 1
Saved in: General.OptionsFileName
View.DrawTetrahedra
Display post-processing tetrahedra?
Default value: 1
Saved in: General.OptionsFileName
View.DrawTriangles
Display post-processing triangles?
Default value: 1
Saved in: General.OptionsFileName
View.DrawVectors
Display vector values?
Default value: 1
Saved in: General.OptionsFileName
Appendix B: Options 221
View.Explode
Element shrinking factor (between 0 and 1)
Default value: 1
Saved in: General.OptionsFileName
View.ExternalView
Index of the view used to color vector fields (-1=self)
Default value: -1
Saved in: General.OptionsFileName
View.FakeTransparency
Use fake transparency (cheaper than the real thing, but incorrect)
Default value: 0
Saved in: General.OptionsFileName
View.ForceNumComponents
Force number of components to display (see View.ComponentMapN for map-
ping)
Default value: 0
Saved in: General.OptionsFileName
View.GeneralizedRaiseFactor
Generalized raise amplification factor
Default value: 1
Saved in: General.OptionsFileName
View.GeneralizedRaiseView
Index of the view used for generalized raise (-1=self)
Default value: -1
Saved in: General.OptionsFileName
View.GlyphLocation
Glyph (arrow, number, etc.) location (1=center of gravity, 2=node)
Default value: 1
Saved in: General.OptionsFileName
View.Height
Height (in pixels) of the scale or 2D plot
Default value: 200
Saved in: General.OptionsFileName
View.IntervalsType
Type of interval display (1=iso, 2=continuous, 3=discrete, 4=numeric)
Default value: 2
Saved in: General.OptionsFileName
View.Light
Enable lighting for the view
Default value: 1
Saved in: General.OptionsFileName
222 Gmsh 3.0
View.LightLines
Light element edges
Default value: 1
Saved in: General.OptionsFileName
View.LightTwoSide
Light both sides of surfaces (leads to slower rendering)
Default value: 0
Saved in: General.OptionsFileName
View.LineType
Display lines as solid color segments (0) or 3D cylinders (1)
Default value: 0
Saved in: General.OptionsFileName
View.LineWidth
Display width of lines (in pixels)
Default value: 1
Saved in: General.OptionsFileName
View.MaxRecursionLevel
Maximum recursion level for adaptive views
Default value: 0
Saved in: General.OptionsFileName
View.Max Maximum value in the view (read-only)
Default value: 0
Saved in: -
View.MaxVisible
Maximum value in the visible parts of the view (read-only)
Default value: 0
Saved in: -
View.MaxX
Maximum view coordinate along the X-axis (read-only)
Default value: 0
Saved in: -
View.MaxY
Maximum view coordinate along the Y-axis (read-only)
Default value: 0
Saved in: -
View.MaxZ
Maximum view coordinate along the Z-axis (read-only)
Default value: 0
Saved in: -
View.Min Minimum value in the view (read-only)
Default value: 0
Saved in: -
Appendix B: Options 223
View.MinVisible
Minimum value in the visible parts of the view (read-only)
Default value: 0
Saved in: -
View.MinX
Minimum view coordinate along the X-axis (read-only)
Default value: 0
Saved in: -
View.MinY
Minimum view coordinate along the Y-axis (read-only)
Default value: 0
Saved in: -
View.MinZ
Minimum view coordinate along the Z-axis (read-only)
Default value: 0
Saved in: -
View.NbIso
Number of intervals
Default value: 10
Saved in: General.OptionsFileName
View.NbTimeStep
Number of time steps in the view (do not change this!)
Default value: 1
Saved in: -
View.NormalRaise
Elevation of the view along the normal (in model coordinates)
Default value: 0
Saved in: -
View.Normals
Display size of normal vectors (in pixels)
Default value: 0
Saved in: General.OptionsFileName
View.OffsetX
Translation of the view along X-axis (in model coordinates)
Default value: 0
Saved in: -
View.OffsetY
Translation of the view along Y-axis (in model coordinates)
Default value: 0
Saved in: -
224 Gmsh 3.0
View.OffsetZ
Translation of the view along Z-axis (in model coordinates)
Default value: 0
Saved in: -
View.PointSize
Display size of points (in pixels)
Default value: 3
Saved in: General.OptionsFileName
View.PointType
Display points as solid color dots (0), 3D spheres (1), scaled dots (2) or scaled
spheres (3)
Default value: 0
Saved in: General.OptionsFileName
View.PositionX
X position (in pixels) of the scale or 2D plot (< 0: measure from right edge; >=
1e5: centered)
Default value: 100
Saved in: General.OptionsFileName
View.PositionY
Y position (in pixels) of the scale or 2D plot (< 0: measure from bottom edge;
>= 1e5: centered)
Default value: 50
Saved in: General.OptionsFileName
View.RaiseX
Elevation of the view along X-axis (in model coordinates)
Default value: 0
Saved in: -
View.RaiseY
Elevation of the view along Y-axis (in model coordinates)
Default value: 0
Saved in: -
View.RaiseZ
Elevation of the view along Z-axis (in model coordinates)
Default value: 0
Saved in: -
View.RangeType
Value scale range type (1=default, 2=custom, 3=per time step)
Default value: 1
Saved in: General.OptionsFileName
View.Sampling
Element sampling rate (draw one out every Sampling elements)
Default value: 1
Saved in: General.OptionsFileName
Appendix B: Options 225
View.SaturateValues
Saturate the view values to custom min and max (1=true, 0=false)
Default value: 0
Saved in: General.OptionsFileName
View.ScaleType
Value scale type (1=linear, 2=logarithmic, 3=double logarithmic)
Default value: 1
Saved in: General.OptionsFileName
View.ShowElement
Show element boundaries?
Default value: 0
Saved in: General.OptionsFileName
View.ShowScale
Show value scale?
Default value: 1
Saved in: General.OptionsFileName
View.ShowTime
Time display mode (0=none, 1=time series, 2=harmonic data, 3=automatic,
4=step data, 5=multi-step data, 6=real eigenvalues, 7=complex eigenvalues)
Default value: 3
Saved in: General.OptionsFileName
View.SmoothNormals
Smooth the normals?
Default value: 0
Saved in: General.OptionsFileName
View.Stipple
Stipple curves in 2D plots?
Default value: 0
Saved in: General.OptionsFileName
View.Tangents
Display size of tangent vectors (in pixels)
Default value: 0
Saved in: General.OptionsFileName
View.TargetError
Target representation error for adaptive views
Default value: 0.01
Saved in: General.OptionsFileName
View.TensorType
Tensor Visualization Type
Default value: 1
Saved in: General.OptionsFileName
226 Gmsh 3.0
View.TimeStep
Current time step displayed
Default value: 0
Saved in: -
View.Time
Current time displayed (if positive, sets the time step corresponding the given
time value)
Default value: 0
Saved in: -
View.TransformXX
Element (1,1) of the 3x3 coordinate transformation matrix
Default value: 1
Saved in: -
View.TransformXY
Element (1,2) of the 3x3 coordinate transformation matrix
Default value: 0
Saved in: -
View.TransformXZ
Element (1,3) of the 3x3 coordinate transformation matrix
Default value: 0
Saved in: -
View.TransformYX
Element (2,1) of the 3x3 coordinate transformation matrix
Default value: 0
Saved in: -
View.TransformYY
Element (2,2) of the 3x3 coordinate transformation matrix
Default value: 1
Saved in: -
View.TransformYZ
Element (2,3) of the 3x3 coordinate transformation matrix
Default value: 0
Saved in: -
View.TransformZX
Element (3,1) of the 3x3 coordinate transformation matrix
Default value: 0
Saved in: -
View.TransformZY
Element (3,2) of the 3x3 coordinate transformation matrix
Default value: 0
Saved in: -
Appendix B: Options 227
View.TransformZZ
Element (3,3) of the 3x3 coordinate transformation matrix
Default value: 1
Saved in: -
View.Type
Type of plot (1=3D, 2=2D space, 3=2D time, 4=2D)
Default value: 1
Saved in: -
View.UseGeneralizedRaise
Use generalized raise?
Default value: 0
Saved in: General.OptionsFileName
View.VectorType
Vector display type (1=segment, 2=arrow, 3=pyramid, 4=3D arrow, 5=dis-
placement, 6=comet)
Default value: 4
Saved in: General.OptionsFileName
View.Visible
Is the view visible?
Default value: 1
Saved in: -
View.Width
Width (in pixels) of the scale or 2D plot
Default value: 300
Saved in: General.OptionsFileName
View.Color.Points
Point color
Default value: {0,0,0}
Saved in: General.OptionsFileName
View.Color.Lines
Line color
Default value: {0,0,0}
Saved in: General.OptionsFileName
View.Color.Triangles
Triangle color
Default value: {0,0,0}
Saved in: General.OptionsFileName
View.Color.Quadrangles
Quadrangle color
Default value: {0,0,0}
Saved in: General.OptionsFileName
228 Gmsh 3.0
View.Color.Tetrahedra
Tetrahedron color
Default value: {0,0,0}
Saved in: General.OptionsFileName
View.Color.Hexahedra
Hexahedron color
Default value: {0,0,0}
Saved in: General.OptionsFileName
View.Color.Prisms
Prism color
Default value: {0,0,0}
Saved in: General.OptionsFileName
View.Color.Pyramids
Pyramid color
Default value: {0,0,0}
Saved in: General.OptionsFileName
View.Color.Trihedra
Trihedron color
Default value: {0,0,0}
Saved in: General.OptionsFileName
View.Color.Tangents
Tangent vector color
Default value: {255,255,0}
Saved in: General.OptionsFileName
View.Color.Normals
Normal vector color
Default value: {255,0,0}
Saved in: General.OptionsFileName
View.Color.Text2D
2D text color
Default value: {0,0,0}
Saved in: General.OptionsFileName
View.Color.Text3D
3D text color
Default value: {0,0,0}
Saved in: General.OptionsFileName
View.Color.Axes
Axes color
Default value: {0,0,0}
Saved in: General.OptionsFileName
Appendix B: Options 229
View.Color.Background2D
Bacground color for 2D plots
Default value: {255,255,255}
Saved in: General.OptionsFileName
View.ColorTable
Color table used to draw the view
Saved in: General.OptionsFileName
Appendix C: Compiling the source code 231
ENABLE_CAIRO
Enable Cairo to render fonts (experimental) (default: ON)
ENABLE_CHACO
Enable Chaco mesh partitioner (alternative to Metis) (default: ON)
ENABLE_COMPRESSED_IO
Enable compressed (gzip) input/output using zlib (default: OFF)
ENABLE_DINTEGRATION
Enable discrete integration (needed for levelsets) (default: ON)
ENABLE_FLTK
Enable FLTK graphical user interface (requires mesh/post) (default: ON)
ENABLE_FOURIER_MODEL
Enable Fourier geometrical models (experimental) (default: OFF)
ENABLE_GETDP
Enable GetDP solver (as a directly linked library) (default: ON)
ENABLE_GMM
Enable GMM linear solvers (simple alternative to PETSc) (default: ON)
ENABLE_GMP
Enable GMP for Kbipack (advanced) (default: ON)
ENABLE_GRAPHICS
Enable building graphics lib even without GUI (advanced) (default: OFF)
ENABLE_KBIPACK
Enable Kbipack (neeeded by homology solver) (default: ON)
ENABLE_MATHEX
Enable math expression parser (used by plugins and options) (default: ON)
ENABLE_MED
Enable MED mesh and post file formats (default: ON)
ENABLE_MESH
Enable mesh module (required by GUI) (default: ON)
ENABLE_METIS
Enable Metis mesh partitioner (default: ON)
ENABLE_MMG3D
Enable MMG3D 3D anisotropic mesh refinement (default: ON)
ENABLE_MPEG_ENCODE
Enable built-in MPEG movie encoder (default: ON)
ENABLE_MPI
Enable MPI (mostly for parser and solver - mesh generation is sequential) (de-
fault: OFF)
ENABLE_MSVC_STATIC_RUNTIME
Enable static Visual C++ runtime (default: OFF)
Appendix C: Compiling the source code 233
ENABLE_MUMPS
Enable MUMPS sparse direct linear solver (default: OFF)
ENABLE_NATIVE_FILE_CHOOSER
Enable native file chooser in GUI (default: ON)
ENABLE_NETGEN
Enable Netgen 3D frontal mesh generator (default: ON)
ENABLE_NUMPY
Enable conversion between fullMatrix and numpy array (requires SWIG) (de-
fault: OFF)
ENABLE_PETSC4PY
Enable petsc4py wrappers for petsc matrices (default: ON)
ENABLE_OCC
Enable Open CASCADE geometrical models (default: ON)
ENABLE_ONELAB
Enable ONELAB solver interface (default: ON)
ENABLE_ONELAB_METAMODEL
Enable ONELAB metamodels (experimental) (default: ON)
ENABLE_OPENMP
Enable OpenMP (experimental) (default: OFF)
ENABLE_OPTHOM
Enable high-order mesh optimization tools (default: ON)
ENABLE_OS_SPECIFIC_INSTALL
Enable OS-specific (e.g. app bundle) installation (default: ON)
ENABLE_OSMESA
Enable OSMesa for offscreen rendering (experimental) (default: OFF)
ENABLE_PARSER
Enable GEO file parser (required for .geo/.pos files) (default: ON)
ENABLE_PETSC
Enable PETSc linear solvers (required for SLEPc) (default: ON)
ENABLE_PLUGINS
Enable post-processing plugins (default: ON)
ENABLE_POST
Enable post-processing module (required by GUI) (default: ON)
ENABLE_POPPLER
Enable Poppler for displaying PDF documents (experimental) (default: OFF)
ENABLE_QT
Enable dummy QT graphical interface proof-of-concept (experimental) (default:
OFF)
ENABLE_REVOROPT
Enable Revoropt (used for CVT remeshing) (default: OFF)
234 Gmsh 3.0
ENABLE_SALOME
Enable Salome routines for CAD healing (default: ON)
ENABLE_SGEOM
Enable SGEOM interface to OCC (experimental) (default: OFF)
ENABLE_SLEPC
Enable SLEPc eigensolvers (required for conformal compounds) (default: ON)
ENABLE_SOLVER
Enable built-in finite element solvers (required for compounds) (default: ON)
ENABLE_TAUCS
Enable Taucs linear solver (default: ON)
ENABLE_TCMALLOC
Enable libtcmalloc, a fast malloc implementation but that does not release
memory (default: OFF)
ENABLE_TETGEN
Enable Tetgen 3D initial mesh generator (default: ON)
ENABLE_VORO3D
Enable Voro3D (for hex meshing, experimental) (default: ON)
ENABLE_WRAP_JAVA
Enable generation of Java wrappers (experimental) (default: OFF)
ENABLE_WRAP_PYTHON
Enable generation of Python wrappers (default: OFF)
ENABLE_ZIPPER
Enable Zip file compression/decompression (default: OFF)
Appendix D: Information for developers 235
2. Gmsh is very slow when I use many transformations (Translate, Rotate, Symmetry,
Extrude, etc. ). Whats wrong?
The default behavior of Gmsh is to check and suppress all duplicate entities (points,
lines and surfaces) each time a transformation command is issued. This can slow down
things a lot if many transformations are performed. There are two solutions to this
problem:
you may save the unrolled geometry in another file (e.g. with gmsh file.geo -0),
and use this new file for subsequent computations;
or you may set the Geometry.AutoCoherence option to 0. This will prevent any
automatic duplicate check/replacement. If you still need to remove the duplicates
entities, simply add Coherence; at strategic locations in your geo files (e.g. before
the creation of line loops, etc.).
3. How can I display only selected parts of my model?
Use Tools->Visibility. This allows you to select elementary entities and physical
groups, as well as mesh elements, in a variety of ways (in a list or tree browser, by
identification number, interactively, or per window).
4. Can I edit STEP/IGES/BRep models?
Not yet. At the moment you can only change mesh element sizes, define volumes and
physical groups, or delete entities. The easiest way to do this is to merge the model in
a .geo file using Merge "file.step"; and add the relevant scripting command after
that. We plan to add more advanced editing features in the future (to delete entities,
to create mixed surfaces and volumes, to export in .geo format, etc.).
5. How can I build modular geometries?
Define common geometrical objects and options in separate files, reusable in all your
problem definition structures. Then Include the files in your main project file.
The best solution is to not use IGES and use STEP instead. If you really have to use
IGES, check that you dont have duplicate curves (e.g. by displaying their numbers
in the GUI with Tools->Options->Geometry->Visibility->Line numbers). If there are
duplicates, try to change the geometrical tolerance and sew the faces (see options in
Tools->Options->Geometry->General).
4. The quality of the elements generated by the 3D algorithm is very bad.
Use Optimize quality in the mesh menu.
5. Non-recombined 3D extruded meshes sometimes fail.
The swapping algorithm is not very clever at the moment. Try to change the sur-
face mesh a bit, or recombine your mesh to generate prisms or hexahedra instead of
tetrahedra.
6. Does Gmsh automatically couple unstructured tetrahedral meshes and structured hex-
ahedral meshed using pyramids?
Only in simple geometrical cases. We need your help to improve this.
7. Can I explicitly assign region numbers to extruded layers?
No, this feature has been removed in Gmsh 2.0. You must use the standard entity
number instead.
8. Did you remove the elliptic mesh generator in Gmsh 2.0?
Yes. You can achieve the same result by using the transfinite algorithm with smoothing
(e.g., with Mesh.Smoothing = 10).
9. Does Gmsh support curved elements?
Yes, Gmsh can generate both 1st order and 2nd order elements. To generate second
order elements, click on High order in the mesh menu after the mesh is completed.
To always generate 2nd order elements, select Generate second order elements in the
mesh option panel. From the command line, you can also use -order 2.
10. Can I import an existing surface mesh in Gmsh and use it to build a 3D mesh?
Yes, you can import a surface mesh in any one of the supported mesh file formats,
define a volume, and mesh it. For an example see demos/sphere-discrete.geo.
11. How do I define boundary conditions or material properties in Gmsh?
By design, Gmsh does not try to incorporate every possible definition of boundary
conditions or material propertiesthis is a job best left to the solver. Instead, Gmsh
provides a simple mechanism to tag groups of elements, and it is up to the solver
to interpret these tags as boundary conditions, materials, etc. Associating tags with
elements in Gmsh is done by defining Physical entities (Physical Points, Physical Lines,
Physical Surfaces and Physical Volumes). See the reference manual as well as the
tutorials (in particular Section A.1 [t1.geo], page 121) for a detailed description and
some examples.
12. How can I display only the mesh associated with selected geometrical entities?
See How can I display only selected parts of my model?.
13. How can I explore a mesh (for example, to see inside a complex structure)?
You can use Tools->Clipping Planes to clip the region of interest. You can define up
to 6 clipping planes in Gmsh (i.e., enough to define a cube inside your model) and
Appendix E: Frequently asked questions 241
each plane can clip either the geometry, the mesh, the post-processing views, or any
combination of the above. The clipping planes are defined using the four coefficients
A,B,C,D of the equation A*x+B*y+C*y+D=0, which can be adjusted interactively by
dragging the mouse in the input fields.
14. What is the signification of Rho, Eta and Gamma in Tools->Statistics?
They measure the quality of the tetrahedra in a mesh:
Gamma ~ inscribed radius / circumscribed radius Eta ~ volume^(2/3) /
sum edge length^2 Rho ~ min edge length / max edge length
For the exact definitions, see Geo/MElement.cpp. The graphs plot the the number of
elements vs. the quality measure.
15. Why dont the vertex and/or elememt numbers on the screen match the numbers in
the mesh file?
Gmsh reindexes the mesh vertices and elements so that they are numbered in a continu-
ous sequence in the output files. The numbers displayed on screen after mesh generation
thus usually differ from the ones saved in the mesh files. To check the actual numbers
saved in the output file just load the mesh file back using File->Open.
3.0.1 (April 14, 2017): fixed OpenCASCADE plane surfaces with holes.
3.0.0 (April 13, 2017): new constructive solid geometry features and boolean
operations using OpenCASCADE; improved graphical user interface for interactive,
parametric geometry construction; new or modified commands in .geo files:
SetFactory, Circle, Ellipse, Wire, Surface, Sphere, Block, Torus, Rectangle,
Disk, Cylinder, Cone, Wedge, ThickSolid, ThruSections, Ruled ThruSections,
Fillet, Extrude, BooleanUnion, BooleanIntersection, BooleanDifference,
BooleanFragments, ShapeFromFile, Recursive Delete, Unique; "Surface" replaces
the deprecated "Ruled Surface" command; faster 3D tetrahedral mesh optimization
enabled by default; major code refactoring and numerous bug fixes.
2.16.0 (January 3, 2017): small improvements (list functions, second order hexes
for MED, GUI) and bug fixes.
2.14.1 (October 30, 2016): fixed regression in periodic meshes; small bug fixes
and code cleanups.
2.14.0 (October 9, 2016): new Tochnog file format export; added ability to
remove last command in scripts generated interactively; ONELAB 1.3 with
usability and performance improvements; faster "Coherence Mesh".
2.13.2 (August 18, 2016)): small improvements (scale labels, periodic and
high-order meshes) and bug fixes.
2.13.0 (July 11, 2016): new ONELAB 1.2 protocol with native support for lists;
new experimental 3D boundary recovery code and 3D refinement algorithm; better
adaptive visualization of quads and hexahedra; fixed several regressions
introduced in 2.12.
2.10.0 (July 21, 2015): improved periodic meshing constraints; new Physical
specification with both label and numeric id; images can now be used as glyphs
in post-processing views, using text annotations with the file:// prefix;
Views can be grouped and organized in subtrees; improved visibility browser
navigation; geometrical entities and post-processing views can now react to
double-clicks, via new generic DoubleClicked options; new Get/SetNumber and
Get/SetString for direct access to ONELAB variables; small bug fixes and code
cleanups.
2.9.2 (March 31, 2015): added support for extrusion of embedded points/curves;
improved hex-dominant algorithm; fixed crashes in quad algorithm; fix regression
in MED reader introduced in 2.9.0; new dark interface mode.
2.9.0 (March 12, 2015): improved robustness of spatial searches (extruded meshes,
geometry coherence); improved reproductibility of 2D and 3D meshes; added
support for high resolution ("retina") graphics; interactive graph point
commands; on-the-fly creation of onelab clients in scripts; general periodic
meshes using afine transforms; scripted selection of entities in bounding boxes;
extended string and list handling functions; many small improvements and bug
fixes.
2.8.5 (Jul 9, 2014): improved stability and error handling, better Coherence
function, updated onelab API version and inline parameter definitions, new
background image modes, more robust Triangulate/Tetrahedralize plugins, new PGF
output, improved support for string~index variable names in parser, small
improvements and bug fixes all over the place.
2.8.3 (Sep 27, 2013): new quick access menu and multiple view selection in GUI;
enhanced animation creation; many small enhancements and bug fixes.
Appendix F: Version history 247
2.8.2 (Jul 16, 2013): improved high order tools interface; minor bug fixes.
2.8.1 (Jul 11, 2013): improved compound surfaces and transfinite arrangements.
2.8.0 (Jul 8, 2013): improved Delaunay point insertion; fixed mesh orientation
of plane surfaces; fixed mesh size prescribed at embedded points; improved
display of vectors at COG; new experimental text string display engines;
improved fullscreen mode; access time/step in transformations; new experimental
features: AdaptMesh and Surface In Volume; accept unicode file paths on Windows;
compilation and bug fixes.
2.7.1 (May 11, 2013): improved Delaunay point insertion; updated onelab; better
Abaqus and UNV export; small bug and compilation fixes.
2.6.0 (Jun 19, 2012): new quadrilateral meshing algorithms (Blossom and
DelQuad); new solver module based on ONELAB project (requires FLTK 1.3); new
tensor field visualization modes (eigenvectors, ellipsoid, etc.); added support
for interpolation schemes in .msh file; added support for MED3 format; rescale
viewport around visible entities (shift+1:1 in GUI); unified post-processing
field export; new experimental stereo+camera visualization mode; added
experimental BAMG & MMG3D support for anisotropic mesh generation; new OCC cut &
merge algorithm imported from Salome; new ability to connect extruded meshes to
tetrahedral grids using pyramids; new homology solver; Abaqus (INP) mesh export;
new Python and Java wrappers; bug fixes and small improvements all over the
place.
2.5.0 (Oct 15, 2010): new compound geometrical entities (for remeshing and/or
trans-patch meshing); improved mesh reclassification tool; new client/server
visualization mode; new ability to watch a pattern of files to merge; new
integrated MPEG export; new option to force the type of views dynamically;
bumped mesh version format to 2.2 (small change in the meaning of the partition
tags; this only affects partitioned (i.e. parallel) meshes); renamed several
post-processing plugins (as well as plugin options) to make them easier to
understand; many bug fixes and usability improvements all over the place.
2.4.2 (Sep 21, 2009): solver code refactoring + better IDE integration.
2.4.1 (Sep 1, 2009): fixed surface mesh orientation bug introduced in 2.4.0;
mesh and graphics code refactoring, small usability enhancements and bug fixes.
248 Gmsh 3.0
2.4.0 (Aug 22, 2009): switched build system to CMake; optionally copy
transfinite mesh contraints during geometry transformations; bumped mesh version
format to 2.1 (small change in the $PhysicalNames section, where the group
dimension is now required); ported most plugins to the new post-processing API;
switched from MathEval to MathEx and Flu_Tree_Browser to Fl_Tree; small bug
fixes and improvements all over the place.
2.3.1 (Mar 18, 2009): removed GSL dependency (Gmsh now simply uses Blas and
Lapack); new per-window visibility; added support for composite window printing
and background images; fixed string option affectation in parser; fixed surface
mesh orientation for OpenCASCADE models; fixed random triangle orientations in
Delaunay and Frontal algorithms.
2.3.0 (Jan 23, 2009): major graphics and GUI code refactoring; new
full-quad/hexa subdivision algorithm; improved automatic transfinite corner
selection (now also for volumes); improved visibility browser; new automatic
adaptive visualization for high-order simplices; modified arrow size, clipping
planes and transform options; many improvements and bug fixes all over the
place.
2.2.6 (Nov 21, 2008): better transfinite smoothing and automatic corner
selection; fixed high order meshing crashes on Windows and Linux; new uniform
mesh refinement (thanks Brian!); fixed various other small bugs.
2.2.5 (Oct 25, 2008): Gmsh now requires FLTK 1.1.7 or above; various small
improvements (STL and VTK mesh IO, Netgen upgrade, Visual C++ support, Fields,
Mesh.{Msh,Stl,...}Binary changed to Mesh.Bindary) and bug fixes (pyramid
interpolation, Chaco crashes).
2.2.4 (Aug 14, 2008): integrated Metis and Chaco mesh partitioners; variables
can now be deleted in geo files; added support for point datasets in model-based
postprocessing views; small bug fixes.
2.2.3 (Jul 14, 2008): enhanced clipping interface; API cleanup; fixed various
bugs (Plugin(Integrate), high order meshes, surface info crash).
2.2.2 (Jun 20, 2008): added geometrical transformations on volumes; fixed bug in
high order mesh generation.
2.2.1 (Jun 15, 2008): various small improvements (adaptive views, GUI, code
cleanup) and bug fixes (high order meshes, Netgen interface).
2.2.0 (Apr 19, 2008): new model-based post-processing backend; added MED I/O for
mesh and post-processing; fixed BDF vertex ordering for 2nd order elements;
replaced Mesh.ConstrainedBackgroundMesh with
Mesh.CharacteristicLength{FromPoints,ExtendFromBoundary}; new Fields interface;
control windows are now non-modal by default; new experimental 2D frontal
Appendix F: Version history 249
2.1.1 (Mar 1, 2008): small bug fixes (second order meshes, combine views, divide
and conquer crash, ...).
2.0.8 (Jul 13, 2007): unused vertices are not saved in mesh files anymore; new
plugin GUI; automatic GUI font size selection; renamed
Plugin(DecomposeInSimplex) into Plugin(MakeSimplex); reintroduced enhanced
Plugin(SphericalRaise); clarified meshing algo names; new option to save groups
of nodes in UNV meshes; new background mesh infrastructure; many small
improvements and small bug fixes.
2.0.7 (Apr 3, 2007): volumes can now be defined from external CAD surfaces;
Delaunay/Tetgen algorithm is now used by default when available; re-added
support for Plot3D structured mesh format; added ability to export external CAD
models as GEO files (this only works for the limited set of geometrical
primitives available in the GEO language, of course--so trying to convert e.g. a
trimmed NURBS from a STEP file into a GEO file will fail); "lateral" entities
are now added at the end of the list returned by extrusion commands; fixed
various bugs.
2.0.0 (Feb 5, 2007): new geometry and mesh databases, with support for STEP and
IGES import via OpenCASCADE; complete rewrite of geometry and mesh drawing
code; complete rewrite of mesh I/O layer (with new native binary MSH format and
support for import/export of I-deas UNV, Nastran BDF, STL, Medit MESH and VRML
1.0 files); added support for incomplete second order elements; new 2D and 3D
meshing algorithms; improved integration of Netgen and TetGen algorithms;
removed anisotropic meshing algorithm (as well as attractors); removed explicit
region number specification in extrusions; option changes in the graphical
interface are now applied instantaneously; added support for offscreen rendering
using OSMesa; added support for SVG output; added string labels for Physical
entities; lots of other improvements all over the place.
1.65 (May 15, 2006): new Plugin(ExtractEdges); fixed compilation errors with
gcc4.1; replaced Plugin(DisplacementRaise) and Plugin(SphericalRaise) with the
more flexible Plugin(Warp); better handling of discrete curves; new Status
command in parser; added option to renumber nodes in .msh files (to avoid holes
in the numbering sequence); fixed 2 special cases in quad->prism extrusion;
fixed saving of 2nd order hexas with negative volume; small bug fixes and
cleanups.
250 Gmsh 3.0
1.64 (Mar 18, 2006): Windows versions do no depend on Cygwin anymore; various
bug fixes and cleanups.
1.63 (Feb 01, 2006): post-processing views can now be exported as meshes;
improved background mesh handling (a lot faster, and more accurate); improved
support for input images; new Plugin(ExtractElements); small bug fixes and
enhancements.
1.62 (Jan 15, 2006): new option to draw color gradients in the background;
enhanced perspective projection mode; new "lasso" selection mode (same as
"lasso" zoom, but in selection mode); new "invert selection" button in the
visibility browser; new snapping grid when adding points in the GUI; nicer
normal smoothing; new extrude syntax (old syntax still available, but
deprecated); various small bug fixes and enhancements.
1.61 (Nov 29, 2005): added support for second order (curved) elements in
post-processor; new version (1.4) of post-processing file formats; new stippling
options for 2D plots; removed limit on allowed number of files on command line;
all "Combine" operations are now available in the parser; changed
View.ArrowLocation into View.GlyphLocation; optimized memory usage when loading
many (>1000) views; optimized loading and drawing of line meshes and 2D iso
views; optimized handling of meshes with large number of physical entities;
optimized vertex array creation for large post-processing views on
Windows/Cygwin; removed Discrete Line and Discrete Surface commands (the same
functionality can now be obtained by simply loading a mesh in .msh format);
fixed coloring by mesh partition; added option to light wireframe meshes and
views; new "mesh statistics" export format; new full-quad recombine option; new
Plugin(ModulusPhase); hexas and prisms are now always saved with positive
volume; improved interactive entity selection; new experimental Tetgen
integration; new experimental STL remeshing algorithm; various small bug fixes
and improvements.
1.60 (Mar 15, 2005): added support for discrete curves; new Window menu on Mac
OS X; generalized all octree-based plugins (CutGrid, StreamLines, Probe, etc.)
to handle all element types (and not only scalar and vector
triangles+tetrahedra); generalized Plugin(Evaluate), Plugin(Extract) and
Plugin(Annotate); enhanced clipping plane interface; new grid/axes/rulers for 3D
post-processing views (renamed the AbscissaName, NbAbscissa and AbscissaFormat
options to more general names in the process); better automatic positioning of
2D graphs; new manipulator dialog to specify rotations, translations and
scalings "by hand"; various small enhancements and bug fixes.
1.59 (Feb 06, 2005): added support for discrete (triangulated) surfaces, either
in STL format or with the new "Discrete Surface" command; added STL and Text
output format for post-processing views and STL output format for surface
meshes; all levelset-based plugins can now also compute isovolumes; generalized
Plugin(Evaluate) to handle external view data (based on the same or on a
Appendix F: Version history 251
1.58 (Jan 01, 2005): fixed UNIX socket interface on Windows (broken by the TCP
solver patch in 1.57); bumped version number of default post-processing file
formats to 1.3 (the only small modification is the handling of the end-of-string
character for text2d and text3d objects in the ASCII format); new File->Rename
menu; new colormaps+improved colormap handling; new color+min/max options in
views; new GetValue() function to ask for values interactively in scripts;
generalized For/EndFor loops in parser; new plugins (Annotate, Remove, Probe);
new text attributes in views; renamed some shortcuts; fixed TeX output for large
scenes; new option dialogs for various output formats; fixed many small memory
leaks in parser; many small enhancements to polish the graphics and the user
interface.
1.57 (Dec 23, 2004): generalized displacement maps to display arbitrary view
types; the arrows representing a vector field can now also be colored by the
values from other scalar, vector or tensor fields; new adaptive high order
visualization mode; new options (Solver.SocketCommand, Solver.NameCommand,
View.ArrowSizeProportional, View.Normals, View.Tangents and General.ClipFactor);
fixed display of undesired solver plugin popups; enhanced interactive plugin
behavior; new plugins (HarmonicToTime, Integrate, Eigenvectors); tetrahedral
mesh file reading speedup (50% faster on large meshes); large memory footprint
reduction (up to 50%) for the visualization of triangular/tetrahedral meshes;
the solver interface now supports TCP/IP connections; new generalized raise mode
(allows to use complex expressions to offset post-processing maps); upgraded
Netgen kernel to version 4.4; new optional TIME list in parsed views to specify
the values of the time steps; several bug fixes in the Elliptic mesh algorithm;
various other small bug fixes and enhancements.
1.56 (Oct 17, 2004): new post-processing option to draw a scalar view raised by
a displacement view without using Plugin(DisplacementRaise) (makes drawing
arbitrary scalar fields on deformed meshes much easier); better post-processing
menu (arbitrary number of views+scrollable+show view number); improved
view->combine; new horizontal post-processing scales; new option to draw the
mesh nodes per element; views can now also be saved in "parsed" format; fixed
various path problems on Windows; small bug fixes.
1.55 (Aug 21, 2004): added background mesh support for Triangle; meshes can now
be displayed using "smoothed" normals (like post-processing views); added GUI
252 Gmsh 3.0
1.54 (Jul 03, 2004): integrated Netgen (3D mesh quality optimization +
alternative 3D algorithm); Extrude Surface now always automatically creates a
new volume (in the same way Extrude Point or Extrude Line create new lines and
surfaces, respectively); fixed UNV output; made the "Layers" region numbering
consistent between lines, surfaces and volumes; fixed home directory problem on
Win98; new Plugin(CutParametric); the default project file is now created in the
home directory if no current directory is defined (e.g., when double-clicking on
the icon on Windows/Mac); fixed the discrepancy between the orientation of
geometrical surfaces and the associated surface meshes; added automatic
orientation of surfaces in surface loops; generalized Plugin(Triangulate) to
handle vector and tensor views; much nicer display of discrete iso-surfaces and
custom ranges using smooth normals; small bug fixes and cleanups.
1.53 (Jun 04, 2004): completed support for second order elements in the mesh
module (line, triangles, quadrangles, tetrahedra, hexahedra, prisms and
pyramids); various background mesh fixes and enhancements; major performance
improvements in mesh and post-processing drawing routines (OpenGL vertex arrays
for tri/quads); new Plugin(Evaluate) to evaluate arbitrary expressions on
post-processing views; generalized Plugin(Extract) to handle any combination of
components; generalized "Coherence" to handle transfinite surface/volume
attributes; plugin options can now be set in the option file (like all other
options); added "undo" capability during geometry creation; rewrote the contour
guessing routines so that entities can be selected in an arbitrary order; Mac
users can now double click on geo/msh/pos files in the Finder to launch Gmsh;
removed support for FLTK 1.0; rewrote most of the code related to quadrangles;
fixed 2d elliptic algorithm; removed all OpenGL display list code and options;
fixed light positioning; new BoundingBox command to set the bounding box
explicitly; added support for inexpensive "fake" transparency mode; many code
cleanups.
1.52 (May 06, 2004): new raster ("bitmap") PostScript/EPS/PDF output formats;
new Plugin(Extract) to extract a given component from a post-processing view;
new Plugin(CutGrid) and Plugin(StreamLines); improved mesh projection on
non-planar surfaces; added support for second order tetrahedral elements; added
interactive control of element order; refined mesh entity drawing selection (and
renamed most of the corresponding options); enhanced log scale in
post-processing; better font selection; simplified View.Raise{X,Y,Z} by removing
the scaling; various bug fixes (default postscript printing mode, drawing of 3D
arrows/cylinders on Linux, default home directory on Windows, default initial
file browser directory, extrusion of points with non-normalized axes of
rotation, computation of the scene bounding box in scripts, + the usual
documentation updates).
Appendix F: Version history 253
1.51 (Feb 29, 2004): initial support for visualizing mesh partitions; integrated
version 2.0 of the MSH mesh file format; new option to compute post-processing
ranges (min/max) per time step; Multiple views can now be combined into multi
time step ones (e.g. for programs that generate data one time step at a time);
new syntax: #var[] returns the size of the list var[]; enhanced "gmsh -convert";
temporary and error files are now created in the home directory to avoid file
permission issues; new 3D arrows; better lighting support; STL facets can now be
converted into individual geometrical surfaces; many other small improvements
and bug fixes (multi timestep tensors, color by physical entity, parser cleanup,
etc.).
1.50 (Dec 06, 2003): small changes to the visibility browser + made visibility
scriptable (new Show/Hide commands); fixed (rare) crash when deleting views;
split File->Open into File->Open and File->New to behave like most other
programs; Mac versions now use the system menu bar by default (if possible);
fixed bug leading to degenerate and/or duplicate tetrahedra in extruded meshes;
fixed crash when reloading sms meshes.
1.49 (Nov 30, 2003): made Merge, Save and Print behave like Include (i.e., open
files in the same directory as the main project file if the path is relative);
new Plugin(DecomposeInSimplex); new option View.AlphaChannel to set the
transparency factor globally for a post-processing view; new "Combine Views"
command; various bug fixes and cleanups.
1.48 (Nov 23, 2003): new DisplacementRaise plugin to plot arbitrary fields on
deformed meshes; generalized CutMap, CutPlane, CutSphere and Skin plugins to
handle all kinds of elements and fields; new "Save View[n]" command to save
views from a script; many small bug fixes (configure tests for libpng, handling
of erroneous options, multi time step scalar prism drawings, copy of surface
mesh attributes, etc.).
1.47 (Nov 12, 2003): fixed extrusion of surfaces defined by only two curves; new
syntax to retrieve point coordinates and indices of entities created through
geometrical transformations; new PDF and compressed PostScript output formats;
fixed numbering of elements created with "Extrude Point/Line"; use $GMSH_HOME as
home directory if defined.
1.46 (Aug 23, 2003): fixed crash for very long command lines; new options for
setting the displacement factor and Triangles parameters + renamed a couple of
options to more sensible names (View.VectorType, View.ArrowSize); various small
bug fixes; documentation update.
1.45 (Jun 14, 2003): small bug fixes (min/max computation for tensor views,
missing physical points in read mesh, "jumping" geometry during interactive
manipulation of large models, etc.); variable definition speedup; restored
support for second order elements in one- and two-dimensional meshes;
documentation updates.
254 Gmsh 3.0
1.44 (Apr 21, 2003): new reference manual; added support for PNG output; fixed
small configure script bugs.
1.43 (Mar 28, 2003): fixed solver interface problem on Mac OS X; new option to
specify the interactive rotation center (default is now the pseudo "center of
gravity" of the object, instead of (0,0,0)).
1.42 (Mar 19, 2003): suppressed the automatic addition of a ".geo" extension if
the file given on the command line is not recognized; added missing Layer option
for Extrude Point; fixed various small bugs.
1.41 (Mar 04, 2003): Gmsh is now licensed under the GNU General Public License;
general code cleanup (indent).
1.40 (Feb 26, 2003): various small bug fixes (mainly GSL-related).
1.39 (Feb 23, 2003): removed all non-free routines; more build system work;
implemented Von-Mises tensor display for all element types; fixed small GUI
bugs.
1.38 (Feb 17, 2003): fixed custom range selection for 3D iso graphs; new build
system based on autoconf; new image reading code to import bitmaps as
post-processing views.
1.37 (Jan 25, 2003): generalized smoothing and cuts of post-processing views;
better Windows integration (solvers, external editors, etc.); small bug fixes.
1.36 (Nov 20, 2002): enhanced view duplication (one can now use "Duplicata
View[num]" in the input file); merged all option dialogs in a new general option
window; enhanced discoverability of the view option menus; new 3D point and line
display; many small bug fixes and enhancements ("Print" format in parser,
post-processing statistics, smooth normals, save window positions, restore
default options, etc.).
1.35 (Sep 11, 2002): graphical user interface upgraded to FLTK 1.1 (tooltips,
new file chooser with multiple selection, full keyboard navigation, cut/paste of
messages, etc.); colors can be now be directly assigned to mesh entities;
initial tensor visualization; new keyboard animation (right/left arrow for time
steps; up/down arrow for view cycling); new VRML output format for surface
meshes; new plugin for spherical elevation plots; new post-processing file
format (version 1.2) supporting quadrangles, hexahedra, prisms and pyramids;
transparency is now enabled by default for post-processing plots; many small bug
fixes (read mesh, ...).
1.34 (Feb 18, 2002): improved surface mesh of non-plane surfaces; fixed
orientation of elements in 2D anisotropic algorithm; minor user interface polish
Appendix F: Version history 255
1.32 (Oct 04, 2001): new visibility browser; better floating point exception
checks; fixed infinite looping when merging meshes in project files; various
small clean ups (degenerate 2D extrusion, view->reload, ...).
1.31 (Nov 30, 2001): corrected ellipses; PostScript output update (better
shading, new combined PS/LaTeX output format); more interface polish; fixed
extra memory allocation in 2D meshes; Physical Volume handling in unv format;
various small fixes.
1.30 (Nov 16, 2001): interface polish; fix crash when extruding quadrangles.
1.29 (Nov 12, 2001): translations and rotations can now be combined in
extrusions; fixed coherence bug in Extrude Line; various small bug fixes and
additions.
1.28 (Oct 30, 2001): corrected the Using Progression attribute for tranfinite
meshes to actually match a real geometric progression; new Triangulate plugin;
new 2D graphs (space+time charts); better performance of geometrical
transformations (warning: the numbering of some automatically created entities
has changed); new text primitives in post-processing views (file format updated
to version 1.1); more robust mean plane computation and error checks; various
other small additions and clean-ups.
1.27 (Oct 05, 2001): added ability to extrude curves with Layers/Recombine
attributes; new PointSize/LineWidth options; fixed For/EndFor loops in included
files; fixed error messages (line numbers+file names) in loops and functions;
made the automatic removal of duplicate geometrical entities optional
(Geometry.AutoCoherence=0); various other small bug fixes and clean-ups.
1.25 (Sep 01, 2001): fixed bug with mixed recombined/non-recombined extruded
meshes; Linux versions are now build with no optimization, due to bugs in gcc
2.95.X.
1.24 (Aug 30, 2001): fixed characteristic length interpolation for Splines;
fixed edge swapping bug in 3D initial mesh; fixed degenerated case in
geometrical extrusion (ruled surface with 3 borders); fixed generation of
256 Gmsh 3.0
1.22 (Aug 03, 2001): fixed (yet another) bug for 2D mesh in the mean plane;
fixed surface coherence bug in extruded meshes; new double logarithmic scale,
saturate value and smoothed normals option for post-processing views; plugins
are now enabled by default; three new experimental statically linked plugins:
CutMap (extracts a given iso surface from a 3D scalar map), CutPlane (cuts a 3D
scalar map with a plane section), CutSphere (cuts a 3D scalar map with a
sphere); various other bug fixes, additions and clean-ups.
1.21 (Jul 25, 2001): fixed more memory leaks; added -opt command line option to
parse definitions directly from the command line; fixed missing screen refreshes
during contour/surface/volume selection; enhanced string manipulation functions
(Sprintf, StrCat, StrPrefix); many other small fixes and clean-ups.
1.20 (Jun 14, 2001): fixed various bugs (memory leaks, functions in included
files, solver command selection, ColorTable option, duplicate nodes in extruded
meshes (not finished yet), infinite loop on empty views, orientation of
recombined quadrangles, ...); reorganized the interface menus; added constrained
background mesh and mesh visibility options; added mesh quality histograms;
changed default mesh colors; reintegrated the old command-line extrusion mesh
generator.
1.19 (May 07, 2001): fixed seg. fault for scalar simplex post-processing; new
Solver menu; interface for GetDP solver through sockets; fixed multiple scale
alignment; added some options + full option descriptions.
1.18 (Apr 26, 2001): fixed many small bugs and incoherences in post-processing;
fixed broken background mesh in 1D mesh generation.
1.17 (Apr 17, 2001): corrected physical points saving; fixed parsing of DOS
files (carriage return problems); easier geometrical selections (cursor change);
plugin manager; enhanced variable arrays (sublist selection and affectation);
line loop check; New arrow display; reduced number of fatal errors + better
handling in interactive mode; fixed bug when opening meshes; enhanced File->Open
behavior for meshes and post-processing views.
Appendix F: Version history 257
1.16 (Feb 26, 2001): added single/double buffer selection (only useful for Unix
versions of Gmsh run from remote hosts without GLX); fixed a bug for recent
versions of the opengl32.dll on Windows, which caused OpenGL fonts not to show
up.
1.15 (Feb 23, 2001): added automatic visibility setting during entity selection;
corrected geometrical extrusion bug.
1.14 (Feb 17, 2001): corrected a few bugs in the GUI (most of them were
introduced in 1.13); added interactive color selection; made the option database
bidirectional (i.e. scripts now correctly update the GUI); default options can
now be saved and automatically reloaded at startup; made some changes to the
scripting syntax (PostProcessing.View[n] becomes View[n]; Offset0 becomes
OffsetX, etc.); corrected the handling of simple triangular surfaces with large
characteristic lengths in the 2D isotropic algorithm; added an ASCII to binary
post-processing view converter.
1.13 (Feb 09, 2001): added support for JPEG output on Windows.
1.10 (Feb 04, 2001): switched from Motif to FLTK for the GUI. Many small tweaks.
1.00 (Jan 15, 2001): 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.
0.999 (Dec 20, 2000): 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.
0.998 (Dec 19, 2000): corrected bug introduced in 0.997 in the generation of the
initial 3D mesh.
0.995 (Dec 11, 2000): 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: thats exciting ;-). And many, many bug fixes and
cleanups.
0.992 (Nov 13, 2000): corrected recombined extrusion; corrected ellipses; added
simple automatic animation of post-processing maps; fixed various bugs.
0.991 (Oct 24, 2000): fixed a serious allocation bug in 2D algorithm, which
caused random crashes. All users should upgrade to 0.991.
0.989 (Sep 01, 2000): added ability to reload previously saved meshes; some new
command line options; reorganization of the scale menu; GIF output.
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.
0.986: fixed overlay problems; SGI version should now also run on 32 bits
machines; fixed small 3d mesh bug.
0.985: corrected colormap bug on HP, SUN, SGI and IBM versions; corrected small
initialization bug in postscript output.
0.982: lighting for mesh and post-processing; corrected 2nd order mesh on non
plane surfaces; added example 13.
Appendix G: Copyright and credits 261
Christophe Geuzaine
<cgeuzaine at ulg.ac.be>
and
Jean-Francois Remacle
<jean-francois.remacle at uclouvain.be>
The TetGen/BR code (Mesh/tetgenBR.{cpp,h}) is copyright (c) 2016 Hang Si, Weierstrass
Institute for Applied Analysis and Stochatics.
The AVL tree code (Common/avl.{cpp,h}) and the YUV image code
(Graphics/gl2yuv.{cpp,h}) are copyright (C) 1988-1993, 1995 The Regents of the
University of California. Permission to use, copy, modify, and distribute this
software and its documentation for any purpose and without fee is hereby
granted, provided that the above copyright notice appear in all copies and that
both that copyright notice and this permission notice appear in supporting
documentation, and that the name of the University of California not be used in
advertising or publicity pertaining to distribution of the software without
specific, written prior permission. The University of California makes no
representations about the suitability of this software for any purpose. It is
provided "as is" without express or implied warranty.
Copyright 2011-2014 Kazuho Oku, All rights reserved. Redistribution and use in
source and binary forms, with or without modification, are permitted provided
that the following conditions are met: 1. Redistributions of source code must
retain the above copyright notice, this list of conditions and the following
disclaimer. 2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution. THIS
SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
The GIF and PPM routines (Graphics/gl2gif.cpp) are based on code copyright (C)
1989, 1991, Jef Poskanzer. Permission to use, copy, modify, and distribute this
software and its documentation for any purpose and without fee is hereby
granted, provided that the above copyright notice appear in all copies and that
both that copyright notice and this permission notice appear in supporting
documentation. This software is provided "as is" without express or implied
warranty.
In addition, this this version of Gmsh may contain the following contributed
codes in the contrib/ directory, each governed by their own license:
* contrib/ANN copyright (C) 1997-2005 University of Maryland and Sunil Arya and
David Mount;
* contrib/MathEx based in part on the work of the SSCILIB Library, copyright (C)
2000-2003 Sadao Massago;
Special thanks to Bill Spitzak, Michael Sweet, Matthias Melcher, Greg Ercolano
and others for the Fast Light Tool Kit on which Gmshs GUI is based. See
http://www.fltk.org for more info on this excellent object-oriented,
264 Gmsh 3.0
cross-platform toolkit.
Special thanks also to EDF for funding the original OpenCASCADE and MED
integration in 2006-2007.
Thanks to the following folks who have contributed by providing fresh ideas on
theoretical or programming topics, who have sent patches, requests for changes
or improvements, or who gave us access to exotic machines for testing Gmsh: Juan
Abanto, Olivier Adam, Guillaume Alleon, Laurent Champaney, Pascal Dupuis,
Patrick Dular, Philippe Geuzaine, Johan Gyselinck, Francois Henrotte, Benoit
Meys, Nicolas Moes, Osamu Nakamura, Chad Schmutzer, Jean-Luc Flejou, Xavier
Dardenne, Christophe Prudhomme, Sebastien Clerc, Jose Miguel Pasini, Philippe
Lussou, Jacques Kools, Bayram Yenikaya, Peter Hornby, Krishna Mohan Gundu,
Christopher Stott, Timmy Schumacher, Carl Osterwisch, Bruno Frackowiak, Philip
Kelleners, Romuald Conty, Renaud Sizaire, Michel Benhamou, Tom De Vuyst, Kris
Van den Abeele, Simon Vun, Simon Corbin, Thomas De-Soza, Marcus Drosson, Antoine
Dechaume, Jose Paulo Moitinho de Almeida, Thomas Pinchard, Corrado Chisari, Axel
Hackbarth, Peter Wainwright, Jiri Hnidek, Thierry Thomas, Konstantinos Poulios,
Laurent Van Miegroet, Shahrokh Ghavamian, Geordie McBain, Jose Paulo Moitinho de
Almeida, Guillaume Demesy, Wendy Merks-Swolfs, Cosmin Stefan Deaconu, Nigel
Nunn, Serban Georgescu, Julien Troufflard, Michele Mocciola, Matthijs Sypkens
Smit, Sauli Ruuska.
Appendix H: License 265
Appendix H License
Gmsh is provided under the terms of the GNU General Public License
(GPL), Version 2 or later, with the following exception:
Note that people who make modified versions of Gmsh are not
obligated to grant this special exception for their modified
versions; it is their choice whether to do so. The GNU General
Public License gives permission to release a modified version
without this exception; this exception also makes it possible to
release a modified version which carries forward this exception.
End of exception.
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
License is intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users. This
General Public License applies to most of the Free Software
Foundations software and to any other program whose authors commit to
using it. (Some other Free Software Foundation software is covered by
the GNU Library General Public License instead.) You can apply it to
your programs, too.
have the freedom to distribute copies of free software (and charge for
this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it
in new free programs; and that you know you can do these things.
We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.
Also, for each authors protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software. If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors reputations.
You may charge a fee for the physical act of transferring a copy, and
you may at your option offer warranty protection in exchange for a fee.
2. You may modify your copy or copies of the Program or any portion
of it, thus forming a work based on the Program, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
b) You must cause any work that you distribute or publish, that in
whole or in part contains or is derived from the Program or any
part thereof, to be licensed as a whole at no charge to all third
parties under the terms of this License.
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Program, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote it.
3. You may copy and distribute the Program (or a work based on it,
under Section 2) in object code or executable form under the terms of
Sections 1 and 2 above provided that you also do one of the following:
The source code for a work means the preferred form of the work for
making modifications to it. For an executable work, complete source
code means all the source code for all modules it contains, plus any
associated interface definition files, plus the scripts used to
control compilation and installation of the executable. However, as a
special exception, the source code distributed need not include
anything that is normally distributed (in either source or binary
form) with the major components (compiler, kernel, and so on) of the
operating system on which the executable runs, unless that component
Appendix H: License 269
5. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Program or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Program (or any work based on the
Program), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Program or works based on it.
6. Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the
original licensor to copy, distribute or modify the Program subject to
these terms and conditions. You may not impose any further
restrictions on the recipients exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.
9. The Free Software Foundation may publish revised and/or new versions
of the General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
10. If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, write to the author
to ask for permission. For software which is copyrighted by the Free
Software Foundation, write to the Free Software Foundation; we sometimes
make exceptions for this. Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.
Appendix H: License 271
NO WARRANTY
<one line to give the programs name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Also add information on how to contact you by electronic and paper mail.
The hypothetical commands show w and show c should show the appropriate
parts of the General Public License. Of course, the commands you use may
be called something other than show w and show c; they could even be
mouse-clicks or menu items--whatever suits your program.
You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the program, if
necessary. Here is a sample; alter the names:
This General Public License does not permit incorporating your program into
proprietary programs. If your program is a subroutine library, you may
consider it more useful to permit linking proprietary applications with the
library. If this is what you want to do, use the GNU Library General
Public License instead of this License.
Concept index 273
Concept index
2 Evaluation order . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
2D plots . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71 Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121
Expressions, affectation . . . . . . . . . . . . . . . . . . . . . . . . 29
Expressions, character . . . . . . . . . . . . . . . . . . . . . . . . . 23
3 Expressions, color . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
Expressions, definition . . . . . . . . . . . . . . . . . . . . . . . . . 21
3D plots . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
Expressions, floating point . . . . . . . . . . . . . . . . . . . . . 21
Expressions, identifiers . . . . . . . . . . . . . . . . . . . . . . . . . 29
A Expressions, lists . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
Extrusion, geometry . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . . . . . . 261 Extrusion, mesh . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
Authors, e-mail . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
F
B FAQ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 237
Background mesh. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47 File format, mesh . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103
Binary operators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 File formats . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103
Bindings, keyboard . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 File, comments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
Bindings, mouse . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 Floating point numbers . . . . . . . . . . . . . . . . . . . . . . . . 21
Boolean operations, geometry . . . . . . . . . . . . . . . . . . 41 Frequently asked questions . . . . . . . . . . . . . . . . . . . 237
Bugs, reporting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 Functions, built-in . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
C G
Changelog . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 245 General commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
Characteristic lengths. . . . . . . . . . . . . . . . . . . . . . . . . . 47 Geometry commands . . . . . . . . . . . . . . . . . . . . . . . . . . 35
Colors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 Geometry, boolean operations . . . . . . . . . . . . . . . . . . 41
Command-line options . . . . . . . . . . . . . . . . . . . . . . . . . 12 Geometry, difference . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
Commands, general . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 Geometry, extrusion . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
Commands, geometry . . . . . . . . . . . . . . . . . . . . . . . . . . 35 Geometry, fragments. . . . . . . . . . . . . . . . . . . . . . . . . . . 41
Commands, mesh . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47 Geometry, intersection . . . . . . . . . . . . . . . . . . . . . . . . . 41
Commands, post-processing . . . . . . . . . . . . . . . . . . . . 72 Geometry, module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
Comments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 Geometry, options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
Concepts, index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 273 Geometry, transformations . . . . . . . . . . . . . . . . . . . . . 42
Conditionals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 Geometry, union . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
Constants . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 Graphs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
Contact information . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
Contributors, list . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 261
Copyright . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3, 261 H
Credits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 261 History, versions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 245
D I
Developer, information . . . . . . . . . . . . . . . . . . . . . . . 235
Index, concepts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 273
Document syntax . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
Index, syntax . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 275
Download . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
Interactive mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
Internet address . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
E Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
E-mail, authors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
Elementary lines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36 K
Elementary points . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
Keyboard, shortcuts . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
Elementary surfaces . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
Keywords, index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 275
Elementary volumes . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
274 Gmsh 3.0
L Post-processing plugins . . . . . . . . . . . . . . . . . . . . . . . . 76
License . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3, 265 Post-processing, module . . . . . . . . . . . . . . . . . . . . . . . 71
Lines, elementary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36 Post-processing, options . . . . . . . . . . . . . . . . . . . . . . 102
Lines, physical . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36 Precedence, operators. . . . . . . . . . . . . . . . . . . . . . . . . . 26
Loops . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 Programming, notes . . . . . . . . . . . . . . . . . . . . . . . . . . 235
M Q
Macros, user-defined . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 Questions, frequently asked . . . . . . . . . . . . . . . . . . . 237
Mailing list . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
Mesh commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
Mesh, background . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
R
Mesh, element size . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47 Real numbers. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
Mesh, extrusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63 Reporting bugs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
Mesh, file format . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103 Rotation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
Mesh, module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45 Rules, syntactic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
Mesh, options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68 Running Gmsh . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
Mesh, transfinite . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
Module, geometry . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
Module, Mesh . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45 S
Module, Post-processing . . . . . . . . . . . . . . . . . . . . . . . 71 Scale . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
Module, Solver . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69 Shortcuts, keyboard . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
Mouse, actions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 Size, elements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
MSH file . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103 Solver commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
Solver, module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
Strings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
N Surfaces, elementary . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
Nodes, ordering . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110 Surfaces, physical . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
Non-interactive mode . . . . . . . . . . . . . . . . . . . . . . . . . . 12 Symmetry . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
Numbers, real . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 Syntax, index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 275
Syntax, rules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
O
Operating system . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
T
Operator precedence . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 Ternary operators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
Operators, definition . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 Transfinite, mesh . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
Options, command-line . . . . . . . . . . . . . . . . . . . . . . . . 12 Transformations, geometry . . . . . . . . . . . . . . . . . . . . . 42
Options, geometry . . . . . . . . . . . . . . . . . . . . . . . . . 44, 69 Translation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
Options, mesh . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68 Tutorial . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121
Options, post-processing . . . . . . . . . . . . . . . . . . . . . . 102
Order, evaluation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 U
Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
Unary operators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
P
Physical lines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
V
Physical points . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 Versions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 245
Physical surfaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37 Views . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
Physical volumes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 Volumes, elementary . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
Plots . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71 Volumes, physical. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
Plugins, post-processing . . . . . . . . . . . . . . . . . . . . . . . 76
Points, elementary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
Points, physical . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 W
Post-processing commands . . . . . . . . . . . . . . . . . . . . . 72 Web site . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
Syntax index 275
Syntax index
! -gamepad . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
! . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 -help . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
!= . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 -ho_[min,max,nlayers] . . . . . . . . . . . . . . . . . . . . . . . 13
-ignorePartBound . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
-info . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
% -link int . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
% . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 -listen . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
-match . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
-merge . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
& -minterpreter string . . . . . . . . . . . . . . . . . . . . . . . . 14
&& . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 -n . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
-new . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
-nodb . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
( -nopopup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 -numsubedges . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
-o file . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
-open . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
* -optimize[_netgen] . . . . . . . . . . . . . . . . . . . . . . . . . . 13
* . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 -optimize_ho . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
*= . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 -optimize_lloyd . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
-optimize_threshold . . . . . . . . . . . . . . . . . . . . . . . . . 13
-option file . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
+ -order int . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
+ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 -part int . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
++ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 -partWeight tri|quad|tet|prism|hex int . . . . 13
+= . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 -pid . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
-pyinterpreter string . . . . . . . . . . . . . . . . . . . . . . . 14
-rand float . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
- -refine . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
-.............................................. 25 -run . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
-, -parse_and_exit . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 -save_all . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
-- . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 -save_parametric . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
-= . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 -save_topology . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
-0 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 -setnumber name value . . . . . . . . . . . . . . . . . . . . . . . . 15
-1, -2, -3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 -setstring name value . . . . . . . . . . . . . . . . . . . . . . . . 15
-a, -g, -m, -s, -p . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 -smooth int . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
-algo string . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 -smoothRatio float . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
-anisoMax float . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 -stereo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
-bg file . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 -string "string" . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
-bgm file . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 -swapangle. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
-bin . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 -theme string. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
-camera . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 -tol float . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
-check . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 -v int. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
-clcurv . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 -version . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
-clmax float . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 -watch pattern . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
-clmin float . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
-clscale float . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
-combine . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
-convert files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
/
-cpu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 /.............................................. 25
-display string . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 /*, */. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
-epslc1d . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 // . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
-fontsize int. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 /= . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
-format string . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
276 Gmsh 3.0
: Ball . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 Bezier ( expression ) = { expression-list };
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
Block ( expression ) = { expression-list };
< . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
< . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 boolean . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
< Recursive > Color color-expression { Point | BooleanDifference { boolean-list } {
Line | Surface | Volume { expression-list boolean-list } . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
}; ... } . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67 BooleanFragments { boolean-list } {
< Recursive > Delete { Point | Line | Surface | boolean-list } . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
Volume { expression-list }; ... } . . . . . . 44 BooleanIntersection ( expression ) = {
< Recursive > Hide { Point | Line | Surface | boolean-list } { boolean-list }; . . . . . . . 42
Volume { expression-list }; ... } . . . 44, 67 BooleanIntersection { boolean-list } {
< Recursive > Show { Point | Line | Surface | boolean-list } . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
Volume { expression-list }; ... } . . . 44, 67 BooleanUnion { boolean-list } { boolean-list
<= . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 } . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
Boundary { transform-list } . . . . . . . . . . . . . . . . . 43
BoundaryLayer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
= BoundingBox { expression, expression,
= . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 expression, expression, expression,
== . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 expression }; . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
BoundingBox; . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
Box . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
> BSpline ( expression ) = { expression-list };
> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
>= . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 build-in-function . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
? C
? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 Call string | char-expression ;. . . . . . . . . . . . . 28
Ceil ( expression ) . . . . . . . . . . . . . . . . . . . . . . . . . . 27
char-option = char-expression ; . . . . . . . . . . . . . 32
^ Characteristic Length { expression-list } =
^ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 expression ; . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
Circle ( expression ) = { expression,
expression, expression <, ...> }; . . . . . . 36
| Coherence Mesh; . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
|| . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 Coherence;. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
Cohomology ( { expression-list } ) { {
expression-list } , { expression-list }
A }; . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
Abort; . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 color-option = color-expression ;. . . . . . . . . . . 32
Acos ( expression ) . . . . . . . . . . . . . . . . . . . . . . . . . . 27 Combine ElementsByViewName; . . . . . . . . . . . . . . . . 72
AdaptMesh { expression-list } { Combine ElementsFromAllViews | Combine Views;
expression-list } { { expression-list < , . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72
... > } }; . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66 Combine ElementsFromVisibleViews;. . . . . . . . . . 72
Alias View[expression ]; . . . . . . . . . . . . . . . . . . . . . 72 Combine TimeStepsByViewName | Combine
AliasWithOptions View[expression ]; . . . . . . . . 72 TimeSteps; . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72
Asin ( expression ) . . . . . . . . . . . . . . . . . . . . . . . . . . 27 Combine TimeStepsFromAllViews; . . . . . . . . . . . . . 72
Atan ( expression ) . . . . . . . . . . . . . . . . . . . . . . . . . . 27 Combine TimeStepsFromVisibleViews; . . . . . . . . 72
Atan2 ( expression, expression ) . . . . . . . . . . . . 27 CombinedBoundary { transform-list } . . . . . . . . 43
Attractor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48 Compound Line ( expression ) = {
AttractorAnisoCurve . . . . . . . . . . . . . . . . . . . . . . . . . 49 expression-list }; . . . . . . . . . . . . . . . . . . . . . . 37
Compound Surface ( expression ) = {
expression-list } < Boundary { {
B expression-list }, { expression-list }, {
Background Field = expression ;. . . . . . . . . . . . . . 48 expression-list }, { expression-list } }
Background Mesh View[expression ]; . . . . . . . . . . 73 > ; . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
Syntax index 277