Sei sulla pagina 1di 462

GetDP

GetDP Reference Manual


The documentation for GetDP 2.11
A General environment for the treatment of Discrete Problems

5 November 2017

Patrick Dular
Christophe Geuzaine
Copyright
c 1997-2017 P. Dular and C. Geuzaine, University of Liege

University of Liège
Department of Electrical Engineering
Institut d’Électricité Montefiore
Sart Tilman Campus, Building B28
B-4000 Liège
BELGIUM

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 GetDP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
Copying conditions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
2 How to read this manual . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
3 Running GetDP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
4 Expressions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
5 Objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
6 Types for objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
7 Short examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75
8 Complete examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91
A File formats . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111
B Gmsh examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115
C Compiling the source code . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119
D Frequently asked questions . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121
E Tips and tricks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123
F Version history . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125
G Copyright and credits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131
H License . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133
Concept index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 141
Metasyntactic variable index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 145
Syntax index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 147
iii

Table of Contents

Obtaining GetDP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1

Copying conditions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3

1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
1.1 Numerical tools as objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
1.2 Which problems can GetDP actually solve? . . . . . . . . . . . . . . . . . . . . . 6
1.3 Bug reports . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7

2 How to read this manual . . . . . . . . . . . . . . . . . . . . . . . 9


2.1 Syntactic rules used in this document . . . . . . . . . . . . . . . . . . . . . . . . . . . 9

3 Running GetDP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11

4 Expressions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
4.1 Comments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
4.2 Includes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
4.3 Expressions definition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
4.4 Constants . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
4.5 Operators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
4.5.1 Operator types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
4.5.2 Evaluation order . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
4.6 Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
4.7 Current values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
4.8 Arguments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
4.9 Run-time variables and registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
4.10 Fields. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
4.11 Macros, loops and conditionals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27

5 Objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
5.1 Group: defining topological entities . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
5.2 Function: defining global and piecewise expressions . . . . . . . . . . . 30
5.3 Constraint: specifying constraints on function spaces and
formulations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
5.4 FunctionSpace: building function spaces . . . . . . . . . . . . . . . . . . . . . . 32
5.5 Jacobian: defining jacobian methods . . . . . . . . . . . . . . . . . . . . . . . . . . 34
5.6 Integration: defining integration methods . . . . . . . . . . . . . . . . . . . . 35
5.7 Formulation: building equations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
5.8 Resolution: solving systems of equations . . . . . . . . . . . . . . . . . . . . . 38
5.9 PostProcessing: exploiting computational results . . . . . . . . . . . . . 39
5.10 PostOperation: exporting results . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
iv GetDP 2.11

6 Types for objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43


6.1 Types for Group . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
6.2 Types for Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
6.2.1 Math functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
6.2.2 Extended math functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
6.2.3 Green functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
6.2.4 Type manipulation functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
6.2.5 Coordinate functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
6.2.6 Miscellaneous functions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
6.3 Types for Constraint . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
6.4 Types for FunctionSpace . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
6.5 Types for Jacobian . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
6.6 Types for Integration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
6.7 Types for Formulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
6.8 Types for Resolution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
6.9 Types for PostProcessing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
6.10 Types for PostOperation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67

7 Short examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75
7.1 Constant expression examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75
7.2 Group examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75
7.3 Function examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75
7.4 Constraint examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77
7.5 FunctionSpace examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78
7.5.1 Nodal finite element spaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78
7.5.2 High order nodal finite element space . . . . . . . . . . . . . . . . . . . . . 78
7.5.3 Nodal finite element space with floating potentials . . . . . . . . 79
7.5.4 Edge finite element space . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79
7.5.5 Edge finite element space with gauge condition . . . . . . . . . . . 80
7.5.6 Coupled edge and nodal finite element spaces . . . . . . . . . . . . . 80
7.5.7 Coupled edge and nodal finite element spaces for multiply
connected domains . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81
7.6 Jacobian examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82
7.7 Integration examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83
7.8 Formulation examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83
7.8.1 Electrostatic scalar potential formulation . . . . . . . . . . . . . . . . . 83
7.8.2 Electrostatic scalar potential formulation with floating
potentials and electric charges . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84
7.8.3 Magnetostatic 3D vector potential formulation . . . . . . . . . . . . 84
7.8.4 Magnetodynamic 3D or 2D magnetic field and magnetic
scalar potential formulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85
7.8.5 Nonlinearities, Mixed formulations, . . . . . . . . . . . . . . . . . . . . . . 85
7.9 Resolution examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85
7.9.1 Static resolution (electrostatic problem) . . . . . . . . . . . . . . . . . . 85
7.9.2 Frequency domain resolution (magnetodynamic problem)
............................................................ 86
7.9.3 Time domain resolution (magnetodynamic problem) . . . . . . 86
v

7.9.4 Nonlinear time domain resolution (magnetodynamic problem)


. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87
7.9.5 Coupled formulations. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87
7.10 PostProcessing examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88
7.11 PostOperation examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88

8 Complete examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91
8.1 Electrostatic problem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91
8.2 Magnetostatic problem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98
8.3 Magnetodynamic problem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103

Appendix A File formats . . . . . . . . . . . . . . . . . . . . . . 111


A.1 Input file format . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111
A.2 Output file format . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111
A.2.1 File ‘.pre’ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112
A.2.2 File ‘.res’ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112

Appendix B Gmsh examples. . . . . . . . . . . . . . . . . . 115

Appendix C Compiling the source code . . . . . 119

Appendix D Frequently asked questions . . . . . 121


D.1 The basics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121
D.2 Installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121
D.3 Usage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121

Appendix E Tips and tricks . . . . . . . . . . . . . . . . . . 123

Appendix F Version history . . . . . . . . . . . . . . . . . . 125

Appendix G Copyright and credits . . . . . . . . . . . 131

Appendix H License . . . . . . . . . . . . . . . . . . . . . . . . . . . 133

Concept index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 141

Metasyntactic variable index . . . . . . . . . . . . . . . . . . . . 145

Syntax index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 147


Obtaining GetDP 1

Obtaining GetDP
The source code and various pre-compiled versions of GetDP (for Windows, Linux and
MacOS) can be downloaded from http://getdp.info.
If you use GetDP, we would appreciate that you mention it in your work. References and
the latest news about GetDP are always available on http://getdp.info.
Copying conditions 3

Copying conditions
GetDP is “free software”; this means that everyone is free to use it and to redistribute it on
a free basis. GetDP 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 GetDP that they might get from you.
Specifically, we want to make sure that you have the right to give away copies of GetDP,
that you receive source code or else can get it if you want it, that you can change GetDP
or use pieces of GetDP 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 GetDP, 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 GetDP. If GetDP 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 GetDP are found in the General Public
License that accompanies the source code (see Appendix H [License], page 133).
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 131.
If you want to integrate parts of GetDP into a closed-source software, or want to sell a
modified closed-source version of GetDP, you will need to obtain a different license. Please
contact us directly for more information.
Chapter 1: Overview 5

1 Overview

GetDP (a “General environment for the treatment of Discrete Problems”) is a scientific


software environment for the numerical solution of integro-differential equations, open to
the coupling of physical problems (electromagnetic, thermal, etc.) as well as of numerical
methods (finite element method, integral methods, etc.). It can deal with such problems of
various dimensions (1D, 2D or 3D) and time states (static, transient or harmonic).
The main feature of GetDP is the closeness between its internal structure (written in C), the
organization of data defining discrete problems (written by the user in ASCII data files) and
the symbolic mathematical expressions of these problems. Its aim is to be welcoming and of
easy use for both development and application levels: it consists of a working environment in
which the definition of any problem makes use of a limited number of objects, which makes
the environment structured and concise. It therefore gives researchers advanced developing
tools and a large freedom in adding new functionalities.
The modeling tools provided by GetDP can be tackled at various levels of complexity: this
opens the software to a wide range of activities, such as research, collaboration, education,
training and industrial studies.

1.1 Numerical tools as objects


An assembly of computational tools (or objects) in GetDP leads to a problem definition
structure, which is a transcription of the mathematical expression of the problem, and forms
a text data file: the equations describing a phenomenon, written in a mathematical form
adapted to a chosen numerical method, directly constitute data for GetDP.
The resolution of a discrete problem with GetDP requires the definition, in a text data file,
of the GetDP objects listed (together with their dependencies) in the following figure and
table.
6 GetDP 2.11

Group ---
Function Group
Constraint Group, Function, (Resolution)
FunctionSpace Group, Constraint, (Formulation), (Resolution)
Jacobian Group
Integration ---
Formulation Group, Function, (Constraint), FunctionSpace,
Jacobian, Integration
Resolution Function, Formulation
PostProcessing Group, Function, Jacobian, Integration,
Formulation, Resolution
PostOperation Group, PostProcessing

The gathering of all these objects constitutes the problem definition structure, which is a
copy of the formal mathematical formulation of the problem. Reading the first column of
the table from top to bottom pictures the working philosophy and the linking of operations
peculiar to GetDP, from group definition to results visualization. The decomposition high-
lighted in the figure points out the separation between the objects defining the method of
resolution, which may be isolated in a “black box” (bottom) and those defining the data
peculiar to a given problem (top).
The computational tools which are in the center of a problem definition structure are formu-
lations (Formulation) and function spaces (FunctionSpace). Formulations define systems
of equations that have to be built and solved, while function spaces contain all the quantities,
i.e., functions, fields of vectors or covectors, known or not, involved in formulations.
Each object of a problem definition structure must be defined before being referred to by
others. A linking which always respects this property is the following: it first contains the
objects defining particular data of a problem, such as geometry, physical characteristics
and boundary conditions (i.e., Group, Function and Constraint) followed by those defin-
ing a resolution method, such as unknowns, equations and related objects (i.e., Jacobian,
Integration, FunctionSpace, Formulation, Resolution and PostProcessing). The pro-
cessing cycle ends with the presentation of the results (i.e., lists of numbers in various
formats), defined in PostOperation fields. This decomposition points out the possibility
of building black boxes, containing objects of the second group, adapted to treatment of
general classes of problems that share the same resolution methods.

1.2 Which problems can GetDP actually solve?


The preceding explanations may seem very (too) general. Which are the problems that
GetDP can actually solve? To answer this question, here is a list of methods that we have
considered and coupled until now:

Numerical methods
finite element method
boundary element method (experimental, undocumented)
volume integral methods (experimental, undocumented)
Chapter 1: Overview 7

Geometrical models
one-dimensional models (1D)
two-dimensional models (2D), plane and axisymmetric
three-dimensional models (3D)
Time states
static states
sinusoidal and harmonic states
transient states
eigenvalue problems
These methods have been successfully applied to build coupled physical models involving
electromagnetic phenomena (magnetostatics, magnetodynamics, electrostatics, electroki-
netics, electrodynamics, wave propagation, lumped electric circuits), acoustic phenomena,
thermal phenomena and mechanical phenomena (elasticity, rigid body movement).
As can be guessed from the preceding list, GetDP has been initially developed in the field
of computational electromagnetics, which fully uses all the offered coupling features. We
believe that this does not interfere with the expected generality of the software because a
particular modeling forms a problem definition structure which is totally external to the
software: GetDP offers computational tools; the user freely applies them to define and solve
his problem.
Nevertheless, specific numerical tools will always need to be implemented to solve specific
problems in areas other than those mentionned above. If you think the general phisosophy
of GetDP is right for you and your problem, but you discover that GetDP lacks the tools
necessary to handle it, let us know: we would love to discuss it with you. For example,
at the time of this writing, many areas of GetDP would need to be improved to make
GetDP as useful for computational mechanics or computational fluid dynamics as it is for
computational electromagnetics... So if you have the skills and some free time, feel free to
join the project: we gladly accept all code contributions!

1.3 Bug reports


If you think you have found a bug in GetDP, you can report it by electronic mail to the
GetDP mailing list at getdp@onelab.info, or file it directly into our bug tracking system
at http://gitlab.onelab.info/getdp/getdp/issues (User name and password: getdp).
Please send as precise a description of the problem as you can, including sample input files
that produce the bug (problem definition and mesh files). Don’t forget to mention both
the version of GetDP and the version of your operation system (see Chapter 3 [Running
GetDP], page 11 to see how to get this information).
See Appendix D [Frequently asked questions], page 121, and the bug tracking system to see
which problems we already know about.
Chapter 2: How to read this manual 9

2 How to read this manual


After reading Chapter 1 [Overview], page 5, which depicts the general philosophy of GetDP,
you might want to skip Chapter 4 [Expressions], page 15, Chapter 5 [Objects], page 29 and
Chapter 6 [Types for objects], page 43 and directly run the demo files bundled in the
distribution on your computer (see Chapter 3 [Running GetDP], page 11). You should then
open these examples with a text editor and compare their structure with the examples given
in Chapter 7 [Short examples], page 75 and Chapter 8 [Complete examples], page 91. For
each new syntax element that you fall onto, you can then go back to Chapter 4 [Expressions],
page 15, Chapter 5 [Objects], page 29, and Chapter 6 [Types for objects], page 43, and find
in these chapters the detailed description of the syntactic rules as well as all the available
options.
Indexes for many concepts (see [Concept index], page 141) and for all the syntax elements
(see [Syntax index], page 147) are available at the end of this manual.

2.1 Syntactic rules used in this document


Here are the rules we tried to follow when writing this user’s guide. Note that metasyntactic
variable definitions stay valid throughout all the manual (and not only in the sections where
the definitions appear). See [Metasyntactic variable index], page 145, for an index of all
metasyntactic variables.
1. Keywords and literal symbols are printed like this.
2. Metasyntactic variables (i.e., text bits that are not part of the syntax, but stand for
other text bits) are printed like this.
3. A colon (:) after a metasyntactic variable separates the variable from its definition.
4. Optional rules are enclosed in < > pairs.
5. Multiple choices are separated by |.
6. Three dots (. . . ) indicate a possible repetition of the preceding rule.
7. For conciseness, the notation rule <, rule > ... is replaced by rule <,...>.
8. The etc symbol replaces nonlisted rules.
Chapter 3: Running GetDP 11

3 Running GetDP
GetDP has no graphical interface1 . It is a command-line driven program that reads a
problem definition file once at the beginning of the processing. This problem definition file
is a regular ASCII text file (see Section 1.1 [Numerical tools as objects], page 5), hence
created with whatever text editor you like.
If you just type the program name at your shell prompt (without any argument), you will
get a short help on how to run GetDP. All GetDP calls look like
getdp filename options
where filename is the ASCII file containing the problem definition, i.e., the structures this
user’s guide has taught you to create. This file can include other files (see Section 4.2
[Includes], page 15), so that only one problem definition file should always be given on
the command line. The input files containing the problem definition structure are usually
given the ‘.pro’ extension (if so, there is no need to specify the extension on the command
line). The name of this file (without the extension) is used as a basis for the creation of
intermediate files during the pre-processing and the processing stages.
The options are a combination of the following commands (in any order):
-pre resolution-id
Performs the pre-processing associated with the resolution resolution-id. In the
pre-processing stage, GetDP creates the geometric database (from the mesh
file), identifies the degrees of freedom (the unknowns) of the problem and sets
up the constraints on these degrees of freedom. The pre-processing creates a file
with a ‘.pre’ extension. If resolution-id is omitted, the list of available choices
is displayed.
-cal
Performs the processing. This requires that a pre-processing has been per-
formed previously, or that a -pre option is given on the same command line.
The performed resolution is the one given as an argument to the -pre op-
tion. In the processing stage, GetDP executes all the commands given in the
Operation field of the selected Resolution object (such as matrix assemblies,
system resolutions, . . . ).
-pos post-operation-id . . .
Performs the operations in the PostOperation(s) selected by the post-
operation-id(s). This requires that a processing has been performed previously,
or that a -cal option is given on the same command line. If post-operation-id
is omitted, the list of available choices is displayed.
-msh filename
1
If you are looking for a graphical front-end to GetDP, you may consider using Gmsh (available at
http://gmsh.info). Gmsh permits to construct geometries, generate meshes, launch computations and
visualize results directly from within a user-friendly graphical interface. The file formats used by Gmsh
for mesh generation and post-processing are the default file formats accepted by GetDP (see Section A.1
[Input file format], page 111, and Section 6.10 [Types for PostOperation], page 67).
12 GetDP 2.11

Reads the mesh (in .msh format) from filename (see Appendix A [File formats],
page 111) rather than from the default problem file name (with the ‘.msh’
extension appended).
-gmshread
filename . . .
Read gmsh data files (same as GmshRead in Resolution operations). Allows
to use such datasets outside resolutions (e.g. in pre-processing).
-split
Saves processing results in separate files (one for each timestep).
-res filename . . .
Loads processing results from file(s).
-name string
Uses string as the default generic file name for input or output of mesh, pre-
processing and processing files.
-restart
Restarts processing of a time stepping resolution interrupted before being com-
plete.
-solve resolution-id
Same as -pre resolution-id -cal.
-solver filename
Specifies a solver option file (whose format varies depending on the linear alge-
bra toolkit used).
-slepc
Uses SLEPc instead of Arpack as eigensolver.
-adapt file
Reads adaptation constraints from file.
-order real
Specifies the maximum interpolation order.
-cache
Caches network computations to disk.
-bin
Selects binary format for output files.
-v2
Creates mesh-based Gmsh output files when possible.
-check
Lets you check the problem structure interactively.
Chapter 3: Running GetDP 13

-v
-verbose integer
Sets the verbosity level. A value of 0 means that no information will be displayed
during the processing.
-cpu
Reports CPU times for all operations.
-p
-progress
integer
Sets the progress update rate. This controls the refreshment rate of the counter
indicating the progress of the current computation (in %).
-onelab name <address>
Communicates with OneLab (file or server address)
-setnumber
name value
Sets constant number name to value
-setstring
name value
Sets constant string name to value
-info
Displays the version information.
-version
Displays the version number.
-help
Displays a message listing basic usage and available options.
Chapter 4: Expressions 15

4 Expressions
This chapter and the next two describe in a rather formal way all the commands that can
be used in the ASCII text input files. If you are just beginning to use GetDP, or just want
to see what GetDP is all about, you should skip this chapter and the next two for now, have
a quick look at Chapter 3 [Running GetDP], page 11, and run the demo problems bundled
in the distribution on your computer. You should then open the ‘.pro’ files in a text editor
and compare their structure with the examples given in Chapter 7 [Short examples], page 75
and Chapter 8 [Complete examples], page 91. Once you have a general idea of how the files
are organized, you might want to come back here to learn more about the specific syntax
of all the objects, and all the available options.

4.1 Comments
Both C and C++ style comments are supported and can be used in the input data files to
comment selected text regions:
1. the text region comprised between /* and */ pairs is ignored;
2. the rest of a line after a double slash // is ignored.
Comments cannot be used inside double quotes or inside GetDP keywords.

4.2 Includes
An input data file can be included in another input data file by placing one of the following
commands (expression-char represents a file name) on a separate line, outside the GetDP
objects. Any text placed after an include command on the same line is ignored.
Include expression-char
#include expression-char
See Section 4.4 [Constants], page 16, for the definition of the character expression expression-
char.

4.3 Expressions definition


Expressions are the basic tool of GetDP. They cover a wide range of functional expressions,
from constants to formal expressions containing functions (built-in or user-defined, depend-
ing on space and time, etc.), arguments, discrete quantities and their associated differential
operators, etc. Note that ‘white space’ (spaces, tabs, new line characters) is ignored inside
expressions (as well as inside all GetDP objects).
Expressions are denoted by the metasyntactic variable expression (remember the definition
of the syntactic rules in Section 2.1 [Syntactic rules], page 9):
expression :
( expression ) |
integer |
real |
constant-id |
quantity |
argument |
16 GetDP 2.11

current-value |
variable-set |
variable-get |
register-set |
register-get |
operator-unary expression |
expression operator-binary expression |
expression operator-ternary-left expression operator-ternary-right ex-
pression |
built-in-function-id [ < expression-list > ] < { expression-cst-list } > |
function-id [ < expression-list > ] |
< Real | Complex > [ expression ] |
Dt [ expression ] |
AtAnteriorTimeStep [ expression, integer ] |
Order [ quantity ] |
Trace [ expression, group-id ] |
expression ##integer
The following sections introduce the quantities that can appear in expressions, i.e.,
constant terminals (integer, real) and constant expression identifiers (constant-id,
expression-cst-list), discretized fields (quantity), arguments (argument), current values
(current-value), register values (register-set, register-get), operators (operator-unary,
operator-binary, operator-ternary-left, operator-ternary-right) and built-in or user-defined
functions (built-in-function-id, function-id). The last seven cases in this definition permit
to cast an expression as real or complex, get the time derivative or evaluate an expression
at an anterior time step, retrieve the interpolation order of a discretized quantity, evaluate
the trace of an expression, and print the value of an expression for debugging purposes.
List of expressions are defined as:
expression-list :
expression <,...>

4.4 Constants
The three constant types used in GetDP are integer, real and string. These types have
the same meaning and syntax as in the C or C++ programming languages. Besides general
expressions (expression), purely constant expressions, denoted by the metasyntactic variable
expression-cst, are also used:
expression-cst :
( expression-cst ) |
integer |
real |
constant-id |
operator-unary expression-cst |
expression-cst operator-binary expression-cst |
expression-cst operator-ternary-left expression-cst operator-ternary-
right
expression-cst |
Chapter 4: Expressions 17

math-function-id [ < expression-cst-list > ] |


#constant-id () |
constant-id (expression-cst ) |
StrFind[ expression-char, expression-char ] |
StrCmp[ expression-char, expression-char ] |
StrLen[ expression-char ] |
StringToName[ expression-char ] | S2N[ expression-char ] |
Exists[ string ] | FileExists[ string ] |
GetForced[ string ] | NbrRegions [ string ] |
GetNumber[ expression-char <, expression-cst > ]
StrFind searches the first expression-char for any occurrence of the second expression-char.
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).
StrLen returns the length of the string. StringToName creates a name from the provided
string. Exists checks for the existence of a constant or a function. FileExists checks
for the existence of a file. GetForced gets the value of a constant (zero if does not exist).
NbrRegions counts the numbers of elementary regions in a group. GetNumber allows to
get the value of a ONELAB number variable (the optional second argument specifies the
default value returned if the variable does not exist).
List of constant expressions are defined as:
expression-cst-list :
expression-cst-list-item <,...>
with
expression-cst-list-item :
expression-cst |
expression-cst : expression-cst |
expression-cst : expression-cst : expression-cst |
constant-id () |
constant-id ( { expression-cst-list } ) |
List[ constant-id ] |
List[ expression-cst-list-item ] |
List[ { expression-cst-list } ] |
ListAlt[ constant-id, constant-id ] |
ListAlt[ expression-cst-list-item, expression-cst-list-item ] |
LinSpace[ expression-cst, expression-cst, expression-cst ] |
LogSpace[ expression-cst, expression-cst, expression-cst ] |
- expression-cst-list-item |
expression-cst * expression-cst-list-item |
expression-cst-list-item * expression-cst |
expression-cst / expression-cst-list-item |
expression-cst-list-item / expression-cst |
expression-cst-list-item ^ expression-cst |
expression-cst-list-item + expression-cst-list-item |
expression-cst-list-item - expression-cst-list-item |
expression-cst-list-item * expression-cst-list-item |
expression-cst-list-item / expression-cst-list-item |
18 GetDP 2.11

ListFromFile [ expression-char ]
The second case in this last definition permits to create a list containing the range of
numbers comprised between the two expression-cst, with a unit incrementation step. The
third case also permits to create a list containing the range of numbers comprised between
the two expression-cst, but with a positive or negative incrementation step equal to the third
expression-cst. The fourth and fifth cases permit to reference constant identifiers (constant-
ids) of lists of constants and constant identifiers of sublists of constants (see below for the
definition of constant identifiers) . The sixth case is a synonym for the fourth. The seventh
case permits to create alternate lists: the arguments of ListAlt must be constant-ids of
lists of constants of the same dimension. The result is an alternate list of these constants:
first constant of argument 1, first constant of argument 2, second constant of argument 1,
etc. These kinds of lists of constants are for example often used for function parameters
(see Section 4.6 [Functions], page 22). The next two cases permit to create linear and
logarithmic lists of numbers, respectively. The remaining cases permit to apply arithmetic
operators item-wise in lists. ListFromFile reads a list of numbers from a file.
Contrary to a general expression which is evaluated at runtime (thanks to an internal stack
mechanism), an expression-cst is completely evaluated during the syntactic analysis of the
problem (when GetDP reads the ‘.pro’ file). The definition of such constants or lists of
constants with identifiers can be made outside or inside any GetDP object. The syntax for
the definition of constants is:
affectation :
DefineConstant [ constant-id < = expression-cst > <,...> ]; |
DefineConstant [ constant-id = { expression-cst , onelab-options } <,...> ]; |
DefineConstant [ string-id < = string-def > <,...> ]; |
DefineConstant [ string-id = { string-def , onelab-options } <,...> ]; |
constant-id <()> = constant-def ; |
constant-id = DefineNumber[ constant-def, onelab-options ];
string-id <()> = string-def ; |
string-id = DefineString[ string-def, onelab-options ]; |
Printf [ "string " ] < > | >> string-def >; |
Printf [ "string ", expression-cst-list ] < > | >> string-def >; |
Read [ constant-id ] ; |
Read [ constant-id , expression-cst ]; |
UndefineConstant | Delete [ constant-id ] ;
UndefineFunction [ constant-id ] ;
SetNumber[ string , expression-cst ];
SetString[ string , string-def ];
with
constant-id :
string |
string ( expression-cst-list ) |
string ~ { expression-cst } <,...>

constant-def :
expression-cst-list-item |
{ expression-cst-list }
Chapter 4: Expressions 19

string-id :
string |
string ~ { expression-cst } <,...>

string-def :
"string " |
StrCat[ expression-char <,...> ] |
Str[ expression-char <,...> ]
Notes:
1. Five constants are predefined in GetDP: Pi (3.1415926535897932), 0D (0), 1D (1), 2D
(2) and 3D (3).
2. When ~{expression-cst } 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-
cst. This is most useful in loops (see Section 4.11 [Macros loops and conditionals],
page 27), 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;
3. The assignment in DefineConstant (zero if no expression-cst is given) is performed
only if constant-id has not yet been defined. This kind of explicit default definition
mechanism is most useful in general problem definition structures making use of a
large number of generic constants, functions or groups. When exploiting only a part
of a complex problem definition structure, the default definition mechanism allows to
define the quantities of interest only, the others being assigned a default value (that
will not be used during the processing but that avoids the error messages produced
when references to undefined quantities are made).
When onelab-options are provided, the parameter is exchanged with the ONELAB
server. See http://onelab.info/wiki/ONELAB_Syntax_for_Gmsh_and_GetDP for
more information.
4. DefineNumber and DefineString allow to define a ONELAB parameter. In this case
the affectation always takes place. SetNumber and SetString allow the direct setting
of ONELAB parameters without defining local variables.
See Section 7.1 [Constant expression examples], page 75, as well as Section 7.3 [Function
examples], page 75, for some examples.
Character expressions are defined as follows:
expression-char :
"string " |
string-id |
StrCat[ expression-char <,...> ] |
20 GetDP 2.11

Str[ expression-char <,...> ]


StrChoice[ expression, expression-char, expression-char ] |
StrSub[ expression-char, expression, expression ] |
StrSub[ expression-char, expression ] |
UpperCase [ expression-char ] |
Sprintf [ expression-char ] |
Sprintf[ expression-char, expression-cst-list ] |
NameToString ( string ) | N2S ( string ) |
GetString[ expression-char <, expression-char,> ] |
Date | CurrentDirectory | CurrentDir |
AbsolutePath [ expression-char ] |
DirName [ expression-char ] |
OnelabAction
StrCat and Str permit to concatenate character expressions (Str adds a newline character
after each string except the last) when creating a string. Str is also used to create string lists
(when string-id is followed by ()). StrChoice returns the first or second expression-char
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 expression-char to upper
case. Sprintf is equivalent to the sprintf C function (where expression-char is a format
string that can contain floating point formatting characters: %e, %g, etc.). NameToString
converts a variable name into a string. GetString allows to get the value of a ONELAB
string variable (the optional second argument specifies the default value returned if the
variable does not exist.) Date permits to access the current date. CurrentDirectory
and CurrentDir return the directory of the .pro file. AbsolutePath returns the absolute
path of a file. DirName returns the directory of a file. OnelabAction returns the current
ONELAB action (e.g. check or compute).
List of character expressions are defined as:
expression-char-list :
expression-char <,...>

4.5 Operators
4.5.1 Operator types
The operators in GetDP are similar to the corresponding operators in the C or C++ pro-
gramming languages.
operator-unary:
- Unary minus.
! Logical not.
operator-binary:
^ Exponentiation. The evaluation of the both arguments must result in a scalar
value.
Chapter 4: Expressions 21

* Multiplication or scalar product, depending on the type of the arguments.


/\ Cross product. The evaluation of both arguments must result in vectors.
/ Division.
% Modulo. The evaluation of the second argument must result in a scalar value.
+ Addition.
- Subtraction.
== Equality.
!= Inequality.
> Greater. The evaluation of both arguments must result in scalar values.
>= Greater or equality. The evaluation of both arguments must result in scalar
values.
< Less. The evaluation of both arguments must result in scalar values.
<= Less or equality. The evaluation of both arguments must result in scalar values.
&& Logical ‘and’. The evaluation of both arguments must result in scalar values.
|| Logical ‘or’. The evaluation of both arguments must result in floating point
values. Warning: the logical ‘or’ always (unlike in C or C++) implies the eval-
uation of both arguments. That is, the second operand of || is evaluated even
if the first one is true.
& Binary ‘and’.
| Binary ‘or’.
>> Bitwise right-shift operator. Shifts the bits of the first argument to the right
by the number of bits specified by the second argument.
<< Bitwise left-shift operator. Shifts the bits of the first argument to the left by
the number of bits specified by the second argument.

operator-ternary-left:

operator-ternary-right:

: The only ternary operator, formed by operator-ternary-left and operator-


ternary-right is defined as in the C or C++ programming languages. The
ternary operator first evaluates its first argument (the expression-cst located
before the ?), which must result in a scalar value. If it is true (non-zero)
the second argument (located between ? and :) is evaluated and returned;
otherwise the third argument (located after :) is evaluated and returned.
22 GetDP 2.11

4.5.2 Evaluation order


The evaluation priorities are summarized below (from stronger to weaker, i.e., ^ has the
highest evaluation priority). Parentheses () may be used anywhere to change the order of
evaluation.

^
- (unary), !
|&
/\
*, /, %
+, -
<, >, <=, >=, <<, >>
!=, ==
&&, ||
?:

4.6 Functions
Two types of functions coexist in GetDP: user-defined functions (function-id, see Section 5.2
[Function], page 30) and built-in functions (built-in-function-id, defined in this section).
Both types of functions are always followed by a pair of brackets [] that can possibly contain
arguments (see Section 4.8 [Arguments], page 24). This makes it simple to distinguish a
function-id or a built-in-function-id from a constant-id. As shown below, built-in functions
might also have parameters, given between braces {}, and which are completely evaluated
during the analysis of the syntax (since they are of expression-cst-list type):
built-in-function-id [ < expression-list > ] < { expression-cst-list } >
with
built-in-function-id :
math-function-id |
extended-math-function-id |
green-function-id |
type-function-id |
coord-function-id |
misc-function-id
Notes:
1. All possible values for built-in-function-id are listed in Section 6.2 [Types for Function],
page 44.
2. Classical mathematical functions (see Section 6.2.1 [Math functions], page 44) are the
only functions allowed in a constant definition (see the definition of expression-cst in
Section 4.4 [Constants], page 16).
Chapter 4: Expressions 23

4.7 Current values


Current values return the current floating point value of an internal GetDP variable:
$Time Value of the current time. This value is set to zero for non time dependent
analyses.
$DTime Value of the current time increment used in a time stepping algorithm.
$Theta Current theta value in a theta time stepping algorithm.
$TimeStep
Number of the current time step in a time stepping algorithm.
$Breakpoint
In case of a breakpoint hit in TimeLoopAdaptive it is the number of the current
breakpoint. In the other case when $Time corresponds not to a breakpoint the
value is -1.
$Iteration, $NLIteration
Current iteration in a nonlinear loop.
$Residual, $NLResidual
Current residual in a nonlinear loop.
$EigenvalueReal
Real part of the current eigenvalue.
$EigenvalueImag
Imaginary part of the current eigenvalue.
$X, $XS Value of the current (destination or source) X-coordinate.
$Y, $YS Value of the current (destination or source) Y-coordinate.
$Z, $ZS Value of the current (destination or source) Z-coordinate.
$A, $B, $C
Value of the current parametric coordinates used in the parametric OnGrid
PostOperation (see Section 6.10 [Types for PostOperation], page 67).
$QuadraturePointIndex
Index of the current quadrature point.
$KSPIteration
Current iteration in a Krylov subspace solver.
$KSPResidual
Current residual in a Krylov subspace solver.
$KSPIterations
Total number of iterations of Krylov subspace solver.
Note:
1. The current X, Y and Z coordinates refer to the ‘physical world’ coordinates, i.e.,
coordinates in which the mesh is expressed.
Current values are “read-only”. User-defined run-time variables, which share the same
syntax but whose value can be changed in an expression, are defined in Section 4.9 [Run-
time variables and registers], page 24.
24 GetDP 2.11

4.8 Arguments
Function arguments can be used in expressions and have the following syntax (integer
indicates the position of the argument in the expression-list of the function, starting from
1):
argument :
$integer
See Section 5.2 [Function], page 30, and Section 7.3 [Function examples], page 75, for more
details.

4.9 Run-time variables and registers


Constant expressions (expression-csts) are evaluated only once during the analysis of the
problem definition structure, cf. Section 4.4 [Constants], page 16. While this is perfectly
fine in most situations, sometimes it is necessary to store and modify variables at run-time.
For example, an iteration in a Resolution could depend on values computed at run-time.
Also, to speed-up the evaluation of expressions (which are evaluated at runtime through
GetDP’s internal stack mechanism), it can be useful to save some results in a temporary
variable, at run-time, in order to reuse them later on.
Two mechanisms exit to handle such cases: run-time variables (which follow the same
syntax as Section 4.7 [Current values], page 23), and registers.
Run-time variables have the following syntax:
variable-set :
$variable-id = expression

variable-get :
$variable-id

variable-id :
string |
string ~ { expression-cst } <,...>
Thus, run-time variables can simply be defined anywhere in an expression and be reused
later on. Current values can be seen as special cases of run-time variables, which are read-
only.
Registers have the following syntax:
register-set :
expression #expression-cst

register-get :
#expression-cst
Thus, to store any expression in the register 5, one should add #5 directly after the expres-
sion. To reuse the value stored in this register, one simply uses #5 instead of the expression
it should replace.
See Section 7.3 [Function examples], page 75, for an example.
Chapter 4: Expressions 25

4.10 Fields
A discretized quantity (defined in a function space, cf. Section 5.4 [FunctionSpace],
page 32) is represented between braces {}, and can only appear in well-defined expressions
in Formulation (see Section 5.7 [Formulation], page 36) and PostProcessing (see
Section 5.9 [PostProcessing], page 39) objects:
quantity :
< quantity-dof > { < quantity-operator > quantity-id } |
{ < quantity-operator > quantity-id } [ expression-cst-list ]
with
quantity-id :
string |
string ~ { expression-cst }
and
quantity-dof :
Dof Defines a vector of discrete quantities (vector of Degrees of freedom), to be
used only in Equation terms of formulations to define (elementary) matrices.
Roughly said, the Dof symbol in front of a discrete quantity indicates that this
quantity is an unknown quantity, and should therefore not be considered as
already computed.
An Equation term must be linear with respect to the Dof. Thus, for example,
a nonlinear term like
Galerkin { [ f[] * Dof{T}^4 , {T} ]; ... }
must first be linearized; and while
Galerkin { [ f[] * Dof{T} , {T} ]; ... }
Galerkin { [ -f[] * 12 , {T} ]; ... }
is valid, the following, which is affine but not linear, is not:
Galerkin { [ f[] * (Dof{T} - 12) , {T} ]; ... }
GetDP supports two linearization techniques. The first is functional iteration
(or Picard method), where one simply plugs the value obtained at the previ-
ous iteration into the nonlinear equation (the previous value is known, and is
accessed e.g. with {T} instead Dof{T}). The second is the Newton-Raphson
iteration, where the Jacobian is specified with a JacNL equation term.
BF Indicates that only a basis function will be used (only valid with basis functions
associated with regions).
quantity-operator:
d Exterior derivative (d): applied to a p-form, gives a (p+1)-form.
Grad Gradient: applied to a scalar field, gives a vector.
Curl
Rot Curl: applied to a vector field, gives a vector.
Div Divergence (div): applied to a vector field, gives a scalar.
26 GetDP 2.11

D1 Applies the operator specified in the first argument of dFunction { basis-


function-type, basis-function-type } (see Section 5.4 [FunctionSpace],
page 32). This is currently only used for nodal-interpolated vector fields
(interpolated with BF_Node_X, BF_Node_Y, BF_Node_Z)
When the first basis-function-type in dFunction is set to BF_NodeX_D1 for
component X, BF_NodeY_D1 for component Y and BF_NodeZ_D1 for component
Z, then D1 applied to a vector [u x, u y, u z] gives:

∂ux ∂uy ∂uz


 
, ,
∂x ∂y ∂z

Note that in this case specifying explicitely dFunction is not necessary, as


BF_NodeX_D1, BF_NodeY_D1 and BF_NodeZ_D1 are assigned by default as the
“D1 derivatives” of BF_NodeX, BF_NodeY and BF_NodeZ. This also holds for
BF_GroupOfNodes_X, BF_GroupOfNodes_Y and BF_GroupOfNodes_Z.
When the first basis-function-type in dFunction is set to BF_NodeX_D12 for
component X and BF_NodeY_D12 for component Y, then D1 applied to a vector
[u x, u y] gives:
∂ux ∂uy ∂uy ∂ux
 
, , +
∂x ∂y ∂x ∂y

D2 Applies the operator specified in the second argument of dFunction { basis-


function-type, basis-function-type } (see Section 5.4 [FunctionSpace],
page 32). This is currently only used for nodal-interpolated vector fields
(interpolated with BF_Node_X, BF_Node_Y, BF_Node_Z)
More specifically, when the second basis-function-type is to BF_NodeX_D2 for
component X, BF_NodeY_D2 for component Y and BF_NodeZ_D2 for component
Z, then D2 applied to a vector [u x, u y, u z] gives:

∂uy ∂ux ∂uz ∂uy ∂ux ∂uz


 
+ , + , +
∂x ∂y ∂y ∂z ∂z ∂x

Note that in this case specifying explicitely dFunction is not necessary, as


BF_NodeX_D2, BF_NodeY_D2 and BF_NodeZ_D2 are assigned by default as the
“D2 derivatives” of BF_NodeX, BF_NodeY and BF_NodeZ. This also holds for
BF_GroupOfNodes_X, BF_GroupOfNodes_Y and BF_GroupOfNodes_Z.

Notes:
1. While the operators Grad, Curl and Div can be applied to 0, 1 and 2-forms respectively,
the exterior derivative operator d is usually preferred with such fields.
2. The second case permits to evaluate a discretized quantity at a certain position X, Y,
Z (when expression-cst-list contains three items) or at a specific time, N time steps ago
(when expression-cst-list contains a single item).
Chapter 4: Expressions 27

4.11 Macros, loops and conditionals


Macros are defined as follows:
Macro string | expression-char
Begins the declaration of a user-defined macro named string. The body of the
macro starts on the line after ‘Macro string ’, and can contain any GetDP
command.
Return Ends the body of the current user-defined macro. Macro declarations cannot
be imbricated, and must be made outside any GetDP object.
Macros, loops and conditionals can be used in any of the following objects: Group, Function,
Constraint (as well as in a contraint-case), FunctionSpace, Formulation (as well as in the
quantity and equation defintions), Resolution (as well as resolution-term, system defintion
and operations), PostProcessing (in the definition of the PostQuantities) and PostOperation
(as well as in the operation list).
loop:
Call string | expression-char ;
Executes the body of a (previously defined) macro named string.
For ( expression-cst : expression-cst )
Iterates from the value of the first expression-cst to the value of the second
expression-cst, with a unit incrementation step. At each iteration, the com-
mands comprised between ‘For ( expression-cst : expression-cst )’ and
the matching EndFor are executed.
For ( expression-cst : expression-cst : expression-cst )
Iterates from the value of the first expression-cst to the value of the second
expression-cst, with a positive or negative incrementation step equal to the third
expression-cst. At each iteration, the commands comprised between ‘For (
expression-cst : expression-cst : expression-cst )’ and the matching
EndFor are executed.
For string In { expression-cst : expression-cst }
Iterates from the value of the first expression-cst to the value of the second
expression-cst, with a unit incrementation step. At each iteration, the value of
the iterate is affected to an expression named string, and the commands com-
prised between ‘For string In { expression-cst : expression-cst }’ and
the matching EndFor are executed.
For string In { expression-cst : expression-cst : expression-cst }
Iterates from the value of the first expression-cst to the value of the second
expression-cst, with a positive or negative incrementation step equal to the third
expression-cst. At each iteration, the value of the iterate is affected to an ex-
pression named string, and the commands comprised between ‘For string In {
expression-cst : expression-cst : expression-cst }’ and the matching
EndFor are executed.
EndFor Ends a matching For command.
28 GetDP 2.11

If ( expression-cst )
The body enclosed between ‘If ( expression-cst )’ and the matching
ElseIf, Else or EndIf, is evaluated if expression-cst is non-zero.
ElseIf ( expression-cst )
The body enclosed between ‘ElseIf ( expression-cst )’ and the next match-
ing ElseIf, Else or EndIf, is evaluated if expression-cst is non-zero and none of
the expression-cst of the previous matching codes If and ElseIf were non-zero.
Else The body enclosed between Else and the matching EndIf is evaluated if none of
the expression-cst of the previous matching codes If and ElseIf were non-zero.
EndIf Ends a matching If command.
LevelTest
Variable equal to the level of imbrication of a body in an If-EndIf test.
Parse [ expression-char ];
Parse the given string.
Chapter 5: Objects 29

5 Objects
This chapter presents the formal definition of the ten GetDP objects mentioned in Chapter 1
[Overview], page 5. To be concise, all the possible parameters for these objects are not given
here (cf. the etc syntactic rule defined in Section 2.1 [Syntactic rules], page 9). Please refer
to Chapter 6 [Types for objects], page 43, for the list of all available options.

5.1 Group: defining topological entities


Meshes (grids) constitute the input data of GetDP. All that is needed by GetDP as a
mesh is a file containing a list of nodes (with their coordinates) and a list of geometrical
elements with, for each one, a number characterizing its geometrical type (i.e., line, triangle,
quadrangle, tetrahedron, hexahedron, prism, etc.), a number characterizing the physical
region to which it belongs and the list of its nodes. This minimal input set should be easy
to extract from most of the classical mesh file formats (see Section A.1 [Input file format],
page 111, for a complete description of the mesh file format read by GetDP).
Groups of geometrical entities of various types can be considered and are used in many
objects. There are region groups, of which the entities are regions, and function groups,
with nodes, edges, facets, volumes, groups of nodes, edges of tree, facets of tree, . . . of
regions.
Amongst region groups, elementary and global groups can be distinguished: elementary
groups are relative to single regions (e.g., physical regions in which piecewise defined func-
tions or constraints can be defined) while global groups are relative to sets of regions for
which given treatments have to be performed (e.g., domain of integration, support of a
function space, etc.).
Groups of function type contain lists of entities built on some region groups (e.g., nodes for
nodal elements, edges for edge elements, edges of tree for gauge conditions, groups of nodes
for floating potentials, elements on one side of a surface for cuts, etc.).
A definition of initially empty groups can be obtained thanks to a DefineGroup command,
so that their identifiers exist and can be referred to in other objects, even if these groups
are not explicitly defined. This procedure is similar to the DefineConstant procedure
introduced for constants in Section 4.4 [Constants], page 16.
The syntax for the definition of groups is:
Group {
< DefineGroup [ group-id <{integer }> <,...> ]; > ...
< group-id = group-def ; > ...
< group-id += group-def ; > ...
< affectation > ...
< loop > ...
}
with
group-id :
string |
string ~ { expression-cst }
30 GetDP 2.11

group-def :
group-type [ group-list <, group-sub-type group-list > ] |
group-id <{<integer >}> |
#group-list

group-type :
Region | Global | NodesOf | EdgesOf | etc

group-list :
All | group-list-item | { group-list-item <,...> }

group-list-item :
integer |
integer : integer |
integer : integer : integer |
group-id <{<integer >}>

group-sub-type :
Not | StartingOn | OnPositiveSideOf | etc
Notes:
1. integer as a group-list-item is the only interface with the mesh; with each element is
associated a region number, being this integer, and a geometrical type (see Section A.1
[Input file format], page 111). Ranges of integers can be specified in the same way as
ranges of constant expressions in an expression-cst-list-item (see Section 4.4 [Constants],
page 16). For example, i :j replaces the list of consecutive integers i, i+1, . . . , j-1, j.
2. Array of groups: DefineGroup[group-id {n }] defines the empty groups group-id {i },
i=1, . . . , n. Such a definition is optional, i.e., each group-id {i } can be separately
defined, in any order.
3. #group-list is an abbreviation of Region[group-list ].
See Section 6.1 [Types for Group], page 43, for the complete list of options and Section 7.2
[Group examples], page 75, for some examples.

5.2 Function: defining global and piecewise expressions


A user-defined function can be global in space or piecewise defined in region groups. A
physical characteristic is an example of a piecewise defined function (e.g., magnetic perme-
ability, electric conductivity, etc.) and can be simply a constant, for linear materials, or a
function of one or several arguments for nonlinear materials. Such functions can of course
depend on space coordinates or time, which can be needed to express complex constraints.
A definition of initially empty functions can be made thanks to the DefineFunction com-
mand so that their identifiers exist and can be referred to (but cannot be used) in other
objects. The syntax for the definition of functions is:
Function {
< DefineFunction [ function-id <,...> ]; > ...
< function-id [ < group-def <, group-def > > ] = expression ; > ...
Chapter 5: Objects 31

< affectation > ...


< loop > ...
}
with
function-id :
string
Note:
1. The first optional group-def in brackets must be of Region type, and indicates on
which region the (piecewise) function is defined. The second optional group-def in
brackets, also of Region type, defines an association with a second region for mutual
contributions. A default piecewise function can be defined with All for group-def,
for all the other non-defined regions. Warning: it is incorrect to write f[reg1]=1;
g[reg2]=f[]+1; since the domains of definition of f[] and g[] don’t match.
2. One can also define initially empty functions inline by replacing the expression with
***.
See Section 6.2 [Types for Function], page 44, for the complete list of built-in functions and
Section 7.3 [Function examples], page 75, for some examples.

5.3 Constraint: specifying constraints on function spaces


and formulations
Constraints can be referred to in FunctionSpace objects to be used for boundary conditions,
to impose global quantities or to initialize quantities. These constraints can be expressed
with functions or be imposed by the pre-resolution of another discrete problem. Other
constraints can also be defined, e.g., constraints of network type for the definition of circuit
connections, to be used in Formulation objects.
The syntax for the definition of constraints is:
Constraint {
{ < Append < expression-cst >; >
Name constraint-id ; Type constraint-type ;
Case {
{ Region group-def ; < Type constraint-type ; >
< SubRegion group-def ; > < TimeFunction expression ; >
< RegionRef group-def ; > < SubRegionRef group-def ; >
< Coefficient expression ; > < Function expression ; >
< Filter expression ; >
constraint-val ; } ...
< loop > ...
}
| Case constraint-case-id {
{ Region group-def ; < Type constraint-type ; >
constraint-case-val ; } ...
< loop > ...
} ...
} ...
32 GetDP 2.11

< affectation > ...


< loop > ...
}
with
constraint-id :
constraint-case-id :
string |
string ~ { expression-cst }

constraint-type :
Assign | Init | Network | Link | etc

constraint-val :
Value expression | NameOfResolution resolution-id | etc

constraint-case-val :
Branch { integer, integer } | etc
Notes:
1. The optional Append < expression-cst > (when the optional level expression-cst is
strictly positive) permits to append an existing Constraint of the same Name with
additional Cases.
2. The constraint type constraint-type defined outside the Case fields is applied to all
the cases of the constraint, unless other types are explicitly given in these cases. The
default type is Assign.
3. The region type Region group-def will be the main group-list argument of the group-
def to be built for the constraints of FunctionSpaces. The optional region type
SubRegion group-def will be the argument of the associated group-sub-type.
4. expression in Value of constraint-val cannot be time dependent ($Time) because it is
evaluated only once during the pre-processing (for efficiency reasons). Time depen-
dences must be defined in TimeFunction expression .
See Section 6.3 [Types for Constraint], page 53, for the complete list of options and
Section 7.4 [Constraint examples], page 77, for some examples.

5.4 FunctionSpace: building function spaces


A FunctionSpace is characterized by the type of its interpolated fields, one or several basis
functions and optional constraints (in space and time). Subspaces of a function space can
be defined (e.g., for the use with hierarchical elements), as well as direct associations of
global quantities (e.g., floating potential, electric charge, current, voltage, magnetomotive
force, etc.).
A key point is that basis functions are defined by any number of subsets of functions,
being added. Each subset is characterized by associated built-in functions for evaluation,
a support of definition and a set of associated supporting geometrical entities (e.g., nodes,
edges, facets, volumes, groups of nodes, edges incident to a node, etc.). The freedom in
defining various kinds of basis functions associated with different geometrical entities to
Chapter 5: Objects 33

interpolate a field permits to build made-to-measure function spaces adapted to a wide


variety of field approximations (see Section 7.5 [FunctionSpace examples], page 78).
The syntax for the definition of function spaces is:
FunctionSpace {
{ < Append < expression-cst >; >
Name function-space-id ;
Type function-space-type ;
BasisFunction {
{ Name basis-function-id ; NameOfCoef coef-id ;
Function basis-function-type
< { Quantity quantity-id ;
Formulation formulation-id { expression-cst };
Group group-def ;
Resolution resolution-id { expression-cst } } >;
< dFunction { basis-function-type, basis-function-type } ; >
Support group-def ; Entity group-def ; } ...
}
< SubSpace {
{ < Append < expression-cst >; >
Name sub-space-id ;
NameOfBasisFunction basis-function-list ; } ...
} >
< GlobalQuantity {
{ Name global-quantity-id ; Type global-quantity-type ;
NameOfCoef coef-id ; } ...
} >
< Constraint {
{ NameOfCoef coef-id ;
EntityType Auto | group-type ; < EntitySubType group-sub-type ; >
NameOfConstraint constraint-id <{}>; } ...
} >
} ...
< affectation > ...
< loop > ...
}
with
function-space-id :
formulation-id :
resolution-id :
string |
string ~ { expression-cst }

basis-function-id :
coef-id :
sub-space-id :
global-quantity-id :
34 GetDP 2.11

string

function-space-type :
Scalar | Vector | Form0 | Form1 | etc

basis-function-type :
BF_Node | BF_Edge | etc

basis-function-list :
basis-function-id | { basis-function-id <,...> }

global-quantity-type :
AliasOf | AssociatedWith

Notes:
1. The optional Append < expression-cst > (when the optional level expression-cst is
strictly positive; its omission fixes it to a top value) permits to append an exist-
ing FunctionSpace of the same Name with additional BasisFunctions, SubSpaces,
GlobalQuantity’s and Constraints, or an existing SubSpace of the same Name with ad-
ditional NameOfBasisFunction’s. If the Append FunctionSpace level is 2, the Append
SubSpace level is automatically 1 if omitted.
2. When the definition region of a function type group used as an Entity of a
BasisFunction is the same as that of the associated Support, it is replaced by
All for more efficient treatments during the computation process (this prevents the
construction and the analysis of a list of geometrical entities).
3. The same Name for several BasisFunction fields permits to define piecewise basis func-
tions; separate NameOfCoefs must be defined for those fields.
4. A constraint is associated with geometrical entities defined by an automatically created
Group of type group-type (Auto automatically fixes it as the Entity group-def type of
the related BasisFunction), using the Region defined in a Constraint object as its
main argument, and the optional SubRegion in the same object as a group-sub-type
argument.
5. A global basis function (BF_Global or BF_dGlobal) needs parameters, i.e., it is given
by the quantity (quantity-id) pre-computed from multiresolutions performed on mul-
tiformulations.
6. Explicit derivatives of the basis functions can be specified using dFunction { basis-
function-type , basis-function-type }. These derivates can be accessed using the
special D1 and D2 operators (see Section 4.10 [Fields], page 25).
See Section 6.4 [Types for FunctionSpace], page 54, for the complete list of options and
Section 7.5 [FunctionSpace examples], page 78, for some examples.

5.5 Jacobian: defining jacobian methods


Jacobian methods can be referred to in Formulation and PostProcessing objects to be
used in the computation of integral terms and for changes of coordinates. They are based on
Chapter 5: Objects 35

Group objects and define the geometrical transformations applied to the reference elements
(i.e., lines, triangles, quadrangles, tetrahedra, prisms, hexahedra, etc.). Besides the classical
lineic, surfacic and volume Jacobians, the Jacobian object allows the construction of various
transformation methods (e.g., infinite transformations for unbounded domains) thanks to
dedicated jacobian methods.
The syntax for the definition of Jacobian methods is:
Jacobian {
{ < Append < expression-cst >; >
Name jacobian-id ;
Case {
{ Region group-def | All;
Jacobian jacobian-type < { expression-cst-list } >; } ...
}
} ...
}
with
jacobian-id :
string

jacobian-type :
Vol | Sur | VolAxi | etc
Note:
1. The optional Append < expression-cst > (when the optional level expression-cst is
strictly positive) permits to append an existing Jacobian of the same Name with addi-
tional Cases.
2. The default case of a Jacobian object is defined by Region All and must follow all
the other cases.
See Section 6.5 [Types for Jacobian], page 56, for the complete list of options and Section 7.6
[Jacobian examples], page 82, for some examples.

5.6 Integration: defining integration methods


Various numerical or analytical integration methods can be referred to in Formulation and
PostProcessing objects to be used in the computation of integral terms, each with a set
of particular options (number of integration points for quadrature methods—which can be
linked to an error criterion for adaptative methods, definition of transformations for singular
integrations, etc.). Moreover, a choice can be made between several integration methods
according to a criterion (e.g., on the proximity between the source and computation points
in integral formulations).
The syntax for the definition of integration methods is:
Integration {
{ < Append < expression-cst >; >
Name integration-id ; < Criterion expression ; >
Case {
< { Type integration-type ;
36 GetDP 2.11

Case {
{ GeoElement element-type ; NumberOfPoints expression-cst } ...
}
} ... >
< { Type Analytic; } ... >
}
} ...
}
with
integration-id :
string

integration-type :
Gauss | etc

element-type :
Line | Triangle | Tetrahedron etc
Note:
1. The optional Append < expression-cst > (when the optional level expression-cst is
strictly positive) permits to append an existing Integration of the same Name with
additional Cases.
See Section 6.6 [Types for Integration], page 57, for the complete list of options and
Section 7.7 [Integration examples], page 83, for some examples.

5.7 Formulation: building equations


The Formulation tool permits to deal with volume, surface and line integrals with many
kinds of densities to integrate, written in a form that is similar to their symbolic expressions
(it uses the same expression syntax as elsewhere in GetDP), which therefore permits to
directly take into account various kinds of elementary matrices (e.g., with scalar or cross
products, anisotropies, nonlinearities, time derivatives, various test functions, etc.). In
case nonlinear physical characteristics are considered, arguments are used for associated
functions. In that way, many formulations can be directly written in the data file, as they
are written symbolically. Fields involved in each formulation are declared as belonging to
beforehand defined function spaces. The uncoupling between formulations and function
spaces allows to maintain a generality in both their definitions.
A Formulation is characterized by its type, the involved quantities (of local, global or
integral type) and a list of equation terms. Global equations can also be considered, e.g.,
for the coupling with network relations.
The syntax for the definition of formulations is:
Formulation {
{ < Append < expression-cst >; >
Name formulation-id ; Type formulation-type ;
Quantity {
{ Name quantity-id ; Type quantity-type ;
Chapter 5: Objects 37

NameOfSpace function-space-id <{}>


< [ sub-space-id | global-quantity-id ] >;
< Symmetry expression-cst ; >
< [ expression ]; In group-def ;
Jacobian jacobian-id ; Integration integration-id ; >
< IndexOfSystem integer ; > } ...
}
Equation {
< local-term-type
{ < term-op-type > [ expression, expression ];
In group-def ; Jacobian jacobian-id ;
Integration integration-id ; } > ...
< GlobalTerm
{ < term-op-type > [ expression, expression ];
In group-def ; < SubType equation-term-sub-type ; > } > ...
< GlobalEquation
{ Type Network; NameOfConstraint constraint-id ;
{ Node expression ; Loop expression ; Equation expression ;
In group-def ; } ...
} > ...
< affectation > ...
< loop > ...
}
} ...
< affectation > ...
< loop > ...
}
with
formulation-id :
string |
string ~ { expression-cst }

formulation-type :
FemEquation | etc

local-term-type :
Galerkin | deRham

equation-term-sub-type :
Self (default) | Mutual | SelfAndMutual

quantity-type :
Local | Global | Integral

term-op-type :
DtDof | DtDtDof | Eig | JacNL | etc
38 GetDP 2.11

Note:
1. The optional Append < expression-cst > (when the optional level expression-cst is
strictly positive) permits to append an existing Formulation of the same Name with
additional Quantity’s and Equations.
2. IndexOfSystem permits to resolve ambiguous cases when several quantities belong to
the same function space, but to different systems of equations. The integer parameter
then specifies the index in the list of an OriginSystem command (see Section 5.8
[Resolution], page 38).
3. A GlobalTerm defines a term to be assembled in an equation associated with a global
quantity. This equation is a finite element equation if that global quantity is linked
with local quantities. The optional associated SubType defines either self (default) or
mutual contributions, or both. Mutual contributions need piecewise functions defined
on pairs or regions.
4. A GlobalEquation defines a global equation to be assembled in the matrix of the
system.
See Section 6.7 [Types for Formulation], page 58, for the complete list of options and
Section 7.8 [Formulation examples], page 83, for some examples.

5.8 Resolution: solving systems of equations


The operations available in a Resolution include: the generation of a linear system, its
solving with various kinds of linear solvers, the saving of the solution or its transfer to
another system, the definition of various time stepping methods, the construction of itera-
tive loops for nonlinear problems (Newton-Raphson and fixed point methods), etc. Multi-
harmonic resolutions, coupled problems (e.g., magneto-thermal) or linked problems (e.g.,
pre-computations of source fields) are thus easily defined in GetDP.
The Resolution object is characterized by a list of systems to build and their associated
formulations, using time or frequency domain, and a list of elementary operations:
Resolution {
{ < Append < expression-cst >; >
Name resolution-id ; < Hidden expression-cst ; >
System {
{ Name system-id ; NameOfFormulation formulation-list ;
< Type system-type ; >
< Frequency expression-cst-list-item |
Frequency { expression-cst-list }; >
< DestinationSystem system-id ; >
< OriginSystem system-id ; | OriginSystem { system-id <,...> }; >
< NameOfMesh expression-char > < Solver expression-char >
< loop > } ...
< loop > ...
}
Operation {
< resolution-op ; > ...
< loop > ...
}
Chapter 5: Objects 39

} ...
< affectation > ...
< loop > ...
}
with
resolution-id :
system-id :
string |
string ~ { expression-cst }

formulation-list :
formulation-id <{}> | { formulation-id <{}> <,...> }

system-type :
Real | Complex

resolution-op :
Generate[system-id ] | Solve[system-id ] | etc
Notes:
1. The optional Append < expression-cst > (when the optional level expression-cst is
strictly positive) permits to append an existing Resolution of the same Name with
additional Systems and Operations.
2. The default type for a system of equations is Real. A frequency domain analysis is
defined through the definition of one or several frequencies (Frequency expression-
cst-list-item | Frequency { expression-cst-list }). Complex systems of equa-
tions with no predefined list of frequencies (e.g., in modal analyses) can be explicitely
defined with Type Complex.
3. NameOfMesh permits to explicitely specify the mesh to be used for the construction of
the system of equations.
4. Solver permits to explicitely specify the name of the solver parameter file to use for the
solving of the system of equations. This is ony valid if GetDP was compiled against the
default solver library (it is the case if you downloaded a pre-compiled copy of GetDP
from the internet).
5. DestinationSystem permits to specify the destination system of a TransferSolution
operation (see Section 6.8 [Types for Resolution], page 59).
6. OriginSystem permits to specify the systems from which ambiguous quantity defini-
tions can be solved (see Section 5.7 [Formulation], page 36).
See Section 6.8 [Types for Resolution], page 59, for the complete list of options and
Section 7.9 [Resolution examples], page 85, for some examples.

5.9 PostProcessing: exploiting computational results


The PostProcessing object is based on the quantities defined in a Formulation and per-
mits the construction (thanks to the expression syntax) of any useful piecewise defined
quantity of interest:
40 GetDP 2.11

PostProcessing {
{ < Append < expression-cst >; >
Name post-processing-id ;
NameOfFormulation formulation-id <{}>; < NameOfSystem system-id ; >
Quantity {
{ < Append < expression-cst >; >
Name post-quantity-id ; Value { post-value ... } } ...
< loop > ...
}
} ...
< affectation > ...
< loop > ...
}
with
post-processing-id :
post-quantity-id :
string |
string ~ { expression-cst }

post-value :
Local { local-value } | Integral { integral-value }

local-value :
[ expression ]; In group-def ; Jacobian jacobian-id ;

integral-value :
[ expression ]; In group-def ;
Integration integration-id ; Jacobian jacobian-id ;
Notes:
1. The optional Append < expression-cst > (when the optional level expression-cst is
strictly positive; its omission fixes it to a top value) permits to append an existing
PostProcessing of the same Name with additional Values, or an existing Quantity of
the same Name with additional Quantity’s. If the Append PostProcessing level is 2,
the Append Quantity level is automatically 1 if omitted. Fixing the Append Quantity
level to -n suppresses the n lastly defined Quantity’s before appending.
2. The quantity defined with integral-value is piecewise defined over the elements of the
mesh of group-def, and takes, in each element, the value of the integration of expres-
sion over this element. The global integral of expression over a whole region (being
either group-def or a subset of group-def ) has to be defined in the PostOperation
with the post-quantity-id [group-def ] command (see Section 5.10 [PostOperation],
page 41).
3. If NameOfSystem system-id is not given, the system is automatically selected as the
one to which the first quantity listed in the Quantity field of formulation-id is associ-
ated.
Chapter 5: Objects 41

See Section 6.9 [Types for PostProcessing], page 67, for the complete list of options and
Section 7.10 [PostProcessing examples], page 88, for some examples.

5.10 PostOperation: exporting results


The PostOperation is the bridge between results obtained with GetDP and the external
world. It defines several elementary operations on PostProcessing quantities (e.g., plot
on a region, section on a user-defined plane, etc.), and outputs the results in several file
formats.
PostOperation {
{ < Append < expression-cst >; >
Name post-operation-id ; NameOfPostProcessing post-processing-id ;
< Hidden expression-cst ; >
< Format post-operation-fmt ; >
< TimeValue expression-cst-list ; > < TimeImagValue expression-cst-list ; >
< LastTimeStepOnly < expression-cst >; >
< OverrideTimeStepValue expression-cst ; >
< NoMesh expression-cst ; > < AppendToExistingFile expression-cst ; >
< ResampleTime[expression-cst, expression-cst, expression-cst ]; >
Operation {
< post-operation-op ; > ...
}
} ...
< affectation > ...
< loop > ...
} |
PostOperation < (Append < expression-cst >) > post-operation-id UsingPost post-
processing-id {
< post-operation-op ; > ...
} ...
with
post-operation-id :
string |
string ~ { expression-cst }

post-operation-op :
Print[ post-quantity-id <[group-def ]>, print-support <,print-option > ... ] |
Print[ "string ", expression <,print-option > ... ] |
Print[ "string ", Str[ expression-char ] <,print-option > ... ] |
Echo[ "string " <,print-option > ... ] |
PrintGroup[ group-id, print-support <,print-option > ... ] |
SendMergeFileRequest[ expression-char ] |
< loop > ...
etc

print-support :
OnElementsOf group-def | OnRegion group-def | OnGlobal | etc
42 GetDP 2.11

print-option :
File expression-char | Format post-operation-fmt | etc

post-operation-fmt :
Table | TimeTable | etc
Notes:
1. The optional Append < expression-cst > (when the optional level expression-cst is
strictly positive) permits to append an existing PostOperation of the same Name with
additional Operations.
2. Both PostOperation syntaxes are equivalent. The first one conforms to the overall
interface, but the second one is more concise.
3. The format post-operation-fmt defined outside the Operation field is applied to all the
post-processing operations, unless other formats are explicitly given in these operations
with the Format option (see Section 6.10 [Types for PostOperation], page 67). The
default format is Gmsh.
4. The ResampleTime option allows equidistant resampling of the time steps by a spline
interpolation. The parameters are: start time, stop time, time step.
5. The optional argument [group-def ] of the post-quantity-id can only be used when
this quantity has been defined as an integral-value (see Section 5.9 [PostProcessing],
page 39). In this case, the sum of all elementary integrals is performed over the region
group-def.
See Section 6.10 [Types for PostOperation], page 67, for the complete list of options and
Section 7.11 [PostOperation examples], page 88, for some examples.
Chapter 6: Types for objects 43

6 Types for objects


This chapter presents the complete list of choices associated with metasyntactic variables
introduced for the ten GetDP objects.

6.1 Types for Group


Types in
group-type [ R1 <, group-sub-type R2 <, group-sub-type-2 R3 > > ]
group-type < group-sub-type < group-sub-type-2 > >:
Region Regions in R1.
Global Regions in R1 (variant of Region used with global BasisFunctions BF_Global
and BF_dGlobal).
NodesOf Nodes of elements of R1
< Not: but not those of R2 >.
EdgesOf Edges of elements of R1
< Not: but not those of R2 >.
FacetsOf Facets of elements of R1
< Not: but not those of R2 >.
VolumesOf
Volumes of elements of R1
< Not: but not those of R2 >.
ElementsOf
Elements of regions in R1
< OnOneSideOf: only elements on one side of R2 (non-automatic, i.e., both sides
if both in R1) > | < OnPositiveSideOf: only elements on positive (normal)
side of R2 < , Not: but not those touching only its skin R3 (mandatory for free
skins for correct separation of side layers) > >.
GroupsOfNodesOf
Groups of nodes of elements of R1 (a group is associated with each region).
GroupsOfEdgesOf
Groups of edges of elements of R1 (a group is associated with each region).
< InSupport: in a support R2 being a group of type ElementOf, i.e., containing
elements >.
GroupsOfEdgesOnNodesOf
Groups of edges incident to nodes of elements of R1 (a group is associated with
each node).
< Not: but not those of R2) >.
GroupOfRegionsOf
Single group of elements of regions in R1 (with basis function BF Region just
one DOF is created for all elements of R1).
44 GetDP 2.11

EdgesOfTreeIn
Edges of a tree of edges of R1
< StartingOn: a complete tree is first built on R2 >.
FacetsOfTreeIn
Facets of a tree of facets of R1
< StartingOn: a complete tree is first built on R2 >.
DualNodesOf
Dual nodes of elements of R1.
DualEdgesOf
Dual edges of elements of R1.
DualFacetsOf
Dual facets of elements of R1.
DualVolumesOf
Dual volumes of elements of R1.

6.2 Types for Function


6.2.1 Math functions
The following functions are the equivalent of the functions of the C or C++ math library.
Unless indicated otherwise, arguments to these functions can be real or complex valued
when used in expressions. When used in constant expressions (expression-cst, see Section 4.4
[Constants], page 16), only real-valued arguments are accepted.
math-function-id:
Exp [expression ]
Exponential function: e^expression.
Log [expression ]
Natural logarithm: ln(expression), expression>0.
Log10 [expression ]
Base 10 logarithm: log10(expression), expression>0.
Sqrt [expression ]
Square root, expression>=0.
Sin [expression ]
Sine of expression.
Asin [expression ]
Arc sine (inverse sine) of expression in [-Pi/2,Pi/2], expression in [-1,1] (real
valued only).
Cos [expression ]
Cosine of expression.
Chapter 6: Types for objects 45

Acos [expression ]
Arc cosine (inverse cosine) of expression in [0,Pi], expression in [-1,1] (real valued
only).
Tan [expression ]
Tangent of expression.
Atan [expression ]
Arc tangent (inverse tangent) of expression in [-Pi/2,Pi/2] (real valued only).
Atan2 [expression,expression ]
Arc tangent (inverse tangent) of the first expression divided by the second, in
[-Pi,Pi] (real valued only).
Sinh [expression ]
Hyperbolic sine of expression.
Cosh [expression ]
Hyperbolic cosine of expression.
Tanh [expression ]
Hyperbolic tangent of the real valued expression.
TanhC2 [expression ]
Hyperbolic tangent of a complex valued expression.
Fabs [expression ]
Absolute value of expression (real valued only).
Abs [expression ]
Absolute value of expression.
Floor [expression ]
Rounds downwards to the nearest integer that is not greater than expression
(real valued only).
Ceil [expression ]
Rounds upwards to the nearest integer that is not less than expression (real
valued only).
Fmod [expression,expression ]
Remainder of the division of the first expression by the second, with the sign
of the first (real valued only).
Min [expression,expression ]
Minimum of the two (scalar) expressions (real valued only).
Max [expression,expression ]
Maximum of the two (scalar) expressions (real valued only).
Sign [expression ]
-1 for expression less than zero and 1 otherwise (real valued only).
46 GetDP 2.11

Jn [expression ]
Returns the Bessel function of the first kind of order given by the first expression
for the value of the second expression (real valued only).
dJn [expression ]
Returns the derivative of the Bessel function of the first kind of order given by
the first expression for the value of the second expression (real valued only).
Yn [expression ]
Returns the Bessel function of the second kind of order given by the first ex-
pression for the value of the second expression (real valued only).
dYn [expression ]
Returns the derivative of the Bessel function of the second kind of order given
by the first expression for the value of the second expression (real valued only).

6.2.2 Extended math functions


extended-math-function-id:
Cross [expression,expression ]
Cross product of the two arguments; expression must be a vector.
Hypot [expression,expression ]
Square root of the sum of the squares of its arguments.
Norm [expression ]
Absolute value if expression is a scalar; euclidian norm if expression is a vector.
SquNorm [expression ]
Square norm: Norm[expression ]^2.
Unit [expression ]
Normalization: expression /Norm[expression ]. Returns 0 if the norm is
smaller than 1.e-30.
Transpose
[expression ]
Transposition; expression must be a tensor.
Inv [expression ]
Inverse of the tensor expression.
Det [expression ]
Determinant of the tensor expression.
Rotate [expression,expression,expression,expression ]
Rotation of a vector or tensor given by the first expression by the angles in
radians given by the last three expression values around the x-, y- and z-axis.
TTrace [expression ]
Trace; expression must be a tensor.
Chapter 6: Types for objects 47

Cos_wt_p []{expression-cst,expression-cst }
The first parameter represents the angular frequency and the second represents
the phase. If the type of the current system is Real, F_Cos_wt_p[]{w,p} is
identical to Cos[w*$Time+p]. If the type of the current system is Complex, it
is identical to Complex[Cos[p],Sin[p]].

Sin_wt_p []{expression-cst,expression-cst }
The first parameter represents the angular frequency and the second represents
the phase. If the type of the current system is Real, F_Sin_wt_p[]{w,p} is
identical to Sin[w*$Time+p]. If the type of the current system is Complex, it
is identical to Complex[Sin[p],-Cos[p]].

Period [expression ]{expression-cst }


Fmod[expression,expression-cst ] + (expression <0 ? expression-cst :
0); the result is always in [0,expression-cst[.

Interval [expression,expression,expression ]{expression-cst, expression-


cst,expression-cst }
Not documented yet.

6.2.3 Green functions


The Green functions are only used in integral quantities (see Section 5.7 [Formulation],
page 36). The first parameter represents the dimension of the problem:
• 1D: r = Fabs[$X-$XS]
• 2D: r = Sqrt[($X-$XS)^2+($Y-$YS)^2]
• 3D: r = Sqrt[($X-$XS)^2+($Y-$YS)^2+($Z-$ZS)^2]

The triplets of values given in the definitions below correspond to the 1D, 2D and 3D cases.
green-function-id:

Laplace []{expression-cst }
r/2, 1/(2*Pi)*ln(1/r), 1/(4*Pi*r).

GradLaplace
[]{expression-cst }
Gradient of Laplace relative to the destination point ($X, $Y, $Z).

Helmholtz
[]{expression-cst, expression-cst }
exp(j*k0*r)/(4*Pi*r), where k0 is given by the second parameter.

GradHelmholtz
[]{expression-cst, expression-cst }
Gradient of Helmholtz relative to the destination point ($X, $Y, $Z).
48 GetDP 2.11

6.2.4 Type manipulation functions


type-function-id:
Complex [expression-list ]
Creates a (multi-harmonic) complex expression from an number of real-valued
expressions. The number of expressions in expression-list must be even.
Complex_MH
[expression-list ]{expression-cst-list }
Not documented yet.
Re [expression ]
Takes the real part of a complex-valued expression.
Im [expression ]
Takes the imaginary part of a complex-valued expression.
Conj [expression ]
Computes the conjugate of a complex-valued expression.
Cart2Pol [expression ]
Converts the cartesian form (reale, imaginary) of a complex-valued expression
into polar form (amplitude, phase [radians]).
Vector [expression,expression,expression ]
Creates a vector from 3 scalars.
Tensor [expression,expression,expression,expression,expression,expression,
expression,expression,expression ]
Creates a second-rank tensor of order 3 from 9 scalars, by row:
[ scalar0 scalar1 scalar2 ] [ CompXX CompXY CompXZ ]
T = [ scalar3 scalar4 scalar5 ] = [ CompYX CompYY CompYZ ]
[ scalar6 scalar7 scalar8 ] [ CompZX CompZY CompZZ ]

TensorV [expression,expression,expression ]
Creates a second-rank tensor of order 3 from 3 row vectors:
[ vector0 ]
T = [ vector1 ]
[ vector2 ]

TensorSym
[expression,expression,expression,expression,expression,expression ]
Creates a symmetrical second-rank tensor of order 3 from 6 scalars.
TensorDiag
[expression,expression,expression ]
Creates a diagonal second-rank tensor of order 3 from 3 scalars.
SquDyadicProduct
[expression ]
Dyadic product of the vector given by expression with itself.
Chapter 6: Types for objects 49

CompX [expression ]
Gets the X component of a vector.
CompY [expression ]
Gets the Y component of a vector.
CompZ [expression ]
Gets the Z component of a vector.
CompXX [expression ]
Gets the XX component of a tensor.
CompXY [expression ]
Gets the XY component of a tensor.
CompXZ [expression ]
Gets the XZ component of a tensor.
CompYX [expression ]
Gets the YX component of a tensor.
CompYY [expression ]
Gets the YY component of a tensor.
CompYZ [expression ]
Gets the YZ component of a tensor.
CompZX [expression ]
Gets the ZX component of a tensor.
CompZY [expression ]
Gets the ZY component of a tensor.
CompZZ [expression ]
Gets the ZZ component of a tensor.
Cart2Sph [expression ]
Gets the tensor for transformation of vector from cartesian to spherical coordi-
nates.
Cart2Cyl [expression ]
Gets the tensor for transformation of vector from cartesian to cylindric coor-
dinates. E.g. to convert a vector with (x,y,z)-components to one with (radial,
tangential, axial)-components: Cart2Cyl[XYZ[]] * vector
UnitVectorX
[]
Creates a unit vector in x-direction.
UnitVectorY
[]
Creates a unit vector in y-direction.
50 GetDP 2.11

UnitVectorZ
[]
Creates a unit vector in z-direction.

6.2.5 Coordinate functions


coord-function-id:
X []
Gets the X coordinate.
Y []
Gets the Y coordinate.
Z []
Gets the Z coordinate.
XYZ []
Gets X, Y and Z in a vector.

6.2.6 Miscellaneous functions


misc-function-id:
Printf [expression ]
Prints the value of expression when evaluated. (MPI_Printf can be use instead,
to print the message for all MPI ranks.)
Rand [expression ]
Returns a pseudo-random number in [0, expression].
Normal []
Computes the normal to the element.
NormalSource
[]
Computes the normal to the source element (only valid in a quantity of Integral
type).
Tangent []
Computes the tangent to the element (only valid for line elements).
TangentSource
[]
Computes the tangent to the source element (only valid in a quantity of Integral
type and only for line elements).
ElementVol
[]
Computes the element’s volume.
Chapter 6: Types for objects 51

SurfaceArea
[]{expression-cst-list }
Computes the area of the physical surfaces in expression-cst-list or of the actual
surface if expression-cst-list is empty.
GetVolume
[]
Computes the volume of the actual physical group.
CompElementNum
[]
Returns 0 if the current element and the current source element are identical.
GetNumElements
[]{expression-cst-list }
Counts the elements of physical numbers in expression-cst-list or of the actual
region if expression-cst-list is empty.
AtIndex [expression ]{expression-cst-list }
Returns the i-th entry of expression-cst-list. This can be used to get an element
in a list, using an index that is computed at runtime.
InterpolationLinear
[expression ]{expression-cst-list }
Linear interpolation of points. The number of constant expressions in
expression-cst-list must be even.
dInterpolationLinear
[expression ]{expression-cst-list }
Derivative of linear interpolation of points. The number of constant expressions
in expression-cst-list must be even.
InterpolationBilinear
[expression,expression ]{expression-cst-list }
Bilinear interpolation of a table based on two variables.
dInterpolationBilinear
[expression,expression ]{expression-cst-list }
Derivative of bilinear interpolation of a table based on two variables. The result
is a vector.
InterpolationAkima
[expression ]{expression-cst-list }
Akima interpolation of points. The number of constant expressions in
expression-cst-list must be even.
dInterpolationAkima
[expression ]{expression-cst-list }
Derivative of Akima interpolation of points. The number of constant expres-
sions in expression-cst-list must be even.
52 GetDP 2.11

Order [quantity ]
Returns the interpolation order of the quantity.
Field [expression ]
Evaluate the last one of the fields (“views”) loaded with GmshRead (see
Section 6.8 [Types for Resolution], page 59), at the point expression. Common
usage is thus Field[XYZ[]].
Field [expression ]{expression-cst-list }
Idem, but evaluate all the fields corresponding to the tags in the list, and sum
all the values. A field having no value at the given position does not produce
an error: its contribution to the sum is simply zero.
ScalarField
[expression ]{expression-cst-list }
Idem, but consider only real-valued scalar fields. A second optional argument
is the value of the time step. A third optional argument is a boolean flag to
indicate that the interpolation should be performed (if possible) in the same
element as the current element.
VectorField
[expression ]{expression-cst-list }
Idem, but consider only real-valued vector fields. Optional arguments are
treated in the same way as for ScalarField.
TensorField
[expression ]{expression-cst-list }
Idem, but consider only real-valued tensor fields. Optional arguments are
treated in the same way as for ScalarField.
ComplexScalarField
[expression ]{expression-cst-list }
Idem, but consider only complex-valued scalar fields. Optional arguments are
treated in the same way as for ScalarField.
ComplexVectorField
[expression ]{expression-cst-list }
Idem, but consider only complex-valued vector fields. Optional arguments are
treated in the same way as for ScalarField.
ComplexTensorField
[expression ]{expression-cst-list }
Idem, but consider only complex-valued tensor fields. Optional arguments are
treated in the same way as for ScalarField.
GetCpuTime
[]
Returns current CPU time, in seconds (total amount of time spent executing
in user mode since GetDP was started).
Chapter 6: Types for objects 53

GetWallClockTime
[]
Returns the current wall clock time, in seconds (total wall clock time since
GetDP was started).
GetMemory
[]
Returns the current memory usage, in megabytes (maximum resident set size).
SetNumberRunTime
[expression ]{char-expression }
Sets the char-expression ONELAB variable at run-time to expression.
GetNumberRunTime
[ <expression > ]{char-expression }
Gets the value of the char-expression ONELAB variable at run-time. If the
optional expression is provided, it is used as a default value if ONELAB is not
available.
SetVariable
[ expression <,...> ]{ $variable-id }
Sets the value of the runtime variable $variable-id to the value of the first
expression, and returns this value. If optional expressions are provided, they
are appended to the variable name, separated by _.
GetVariable
[ <expression > <,...> ]{ $variable-id }
Gets the value of the runtime variable $variable-id . If the optional expres-
sions are provided, they are appended to the variable name, separated by _.

6.3 Types for Constraint


constraint-type:
Assign To assign a value (e.g., for boundary condition).
Init To give an initial value (e.g., initial value in a time domain analysis). If two
values are provided (with Value [ expression, expression ]), the first value
can be used using the InitSolution1 operation. This is mainly useful for the
Newmark time-stepping scheme.
AssignFromResolution
To assign a value to be computed by a pre-resolution.
InitFromResolution
To give an initial value to be computed by a pre-resolution.
Network To describe the node connections of branches in a network.
Link To define links between degrees of freedom in the constrained region with de-
grees of freedom in a “reference” region, with some coefficient. For example,
to link the degrees of freedom in the contrained region Left with the degrees
54 GetDP 2.11

of freedom in the reference region Right, located Pi units to the right of the
region Left along the X-axis, with the coeficient -1, one could write:
{ Name periodic;
Case {
{ Region Left; Type Link ; RegionRef Right;
Coefficient -1; Function Vector[$X+Pi,$Y,$Z] ;
}
}
}
In this example, Function defines the mapping that translates the geometrical
elements in the region Left by Pi units along the X-axis, so that they correspond
with the elements in the region Right. For this mapping to work, the meshes
of Left and Right must be identical.
LinkCplx To define complex-valued links between degrees of freedom. The syntax is the
same as for constraints of type Link, but Coeficient can be complex.

6.4 Types for FunctionSpace


function-space-type:
Form0 0-form, i.e., scalar field of potential type.
Form1 1-form, i.e., curl-conform field (associated with a curl).
Form2 2-form, i.e., div-conform field (associated with a divergence).
Form3 3-form, i.e., scalar field of density type.
Form1P 1-form perpendicular to the z=0 plane, i.e., perpendicular curl-conform field
(associated with a curl).
Form2P 2-form in the z=0 plane, i.e., parallel div-conform field (associated with a di-
vergence).
Scalar Scalar field.
Vector Vector field.
basis-function-type:
BF_Node Nodal function (on NodesOf, value Form0).
BF_Edge Edge function (on EdgesOf, value Form1).
BF_Facet Facet function (on FacetsOf, value Form2).
BF_Volume
Volume function (on VolumesOf, value Form3).
BF_GradNode
Gradient of nodal function (on NodesOf, value Form1).
BF_CurlEdge
Curl of edge function (on EdgesOf, value Form2).
Chapter 6: Types for objects 55

BF_DivFacet
Divergence of facet function (on FacetsOf, value Form3).
BF_GroupOfNodes
Sum of nodal functions (on GroupsOfNodesOf, value Form0).
BF_GradGroupOfNodes
Gradient of sum of nodal functions (on GroupsOfNodesOf, value Form1).
BF_GroupOfEdges
Sum of edge functions (on GroupsOfEdgesOf, value Form1).
BF_CurlGroupOfEdges
Curl of sum of edge functions (on GroupsOfEdgesOf, value Form2).
BF_PerpendicularEdge
1-form (0, 0, BF_Node) (on NodesOf, value Form1P).
BF_CurlPerpendicularEdge
Curl of 1-form (0, 0, BF_Node) (on NodesOf, value Form2P).
BF_GroupOfPerpendicularEdge
Sum of 1-forms (0, 0, BF_Node) (on NodesOf, value Form1P).
BF_CurlGroupOfPerpendicularEdge
Curl of sum of 1-forms (0, 0, BF_Node) (on NodesOf, value Form2P).
BF_PerpendicularFacet
2-form (90 degree rotation of BF_Edge) (on EdgesOf, value Form2P).
BF_DivPerpendicularFacet
Div of 2-form (90 degree rotation of BF_Edge) (on EdgesOf, value Form3).
BF_Region
Unit value 1 (on Region or GroupOfRegionsOf, value Scalar).
BF_RegionX
Unit vector (1, 0, 0) (on Region, value Vector).
BF_RegionY
Unit vector (0, 1, 0) (on Region, value Vector).
BF_RegionZ
Unit vector (0, 0, 1) (on Region, value Vector).
BF_Global
Global pre-computed quantity (on Global, value depends on parameters).
BF_dGlobal
Exterior derivative of global pre-computed quantity (on Global, value depends
on parameters).
BF_NodeX Vector (BF_Node, 0, 0) (on NodesOf, value Vector).
BF_NodeY Vector (0, BF_Node, 0) (on NodesOf, value Vector).
BF_NodeZ Vector (0, 0, BF_Node) (on NodesOf, value Vector).
56 GetDP 2.11

BF_Zero Zero value 0 (on all regions, value Scalar).


BF_One Unit value 1 (on all regions, value Scalar).
global-quantity-type:
AliasOf Another name for a name of coefficient of basis function.
AssociatedWith
A global quantity associated with a name of coefficient of basis function, and
therefore with this basis function.

6.5 Types for Jacobian


jacobian-type:
Vol Volume Jacobian, for n-D regions in n-D geometries, n = 1, 2 or 3.
Sur Surface Jacobian, for (n-1)-D regions in n-D geometries, n = 1, 2 or 3.
Lin Line Jacobian, for (n-2)-D regions in n-D geometries, n = 2 or 3.
VolAxi Axisymmetrical volume Jacobian (1st type: r), for 2-D regions in axisymmet-
rical geometries.
SurAxi Axisymmetrical surface Jacobian (1st type: r), for 1-D regions in axisymmet-
rical geometries.
VolAxiSqu
Axisymmetrical volume Jacobian (2nd type: r2 ), for 2-D regions in axisymmet-
rical geometries.
VolSphShell
Volume Jacobian with spherical shell transformation, for n-D regions in n-D
geometries, n = 2 or 3.
Parameters: radius-internal, radius-external <, center-X, center-Y, center-Z,
power, 1/infinity >.
VolCylShell
Volume Jacobian with cylindrical shell transformation, for n-D regions in n-D
geometries, n = 2 or 3. For n=2, VolCylShell is identical to VolSphShell.
For n=3, the axis of the cylinder is supposed to be along the z axis.
Parameters: radius-internal, radius-external <, center-X, center-Y, center-Z,
power, 1/infinity >.
VolAxiSphShell
Same as VolAxi, but with spherical shell transformation.
Parameters: radius-internal, radius-external <, center-X, center-Y, center-Z,
power, 1/infinity >.
VolAxiSquSphShell
Same as VolAxiSqu, but with spherical shell transformation.
Parameters: radius-internal, radius-external <, center-X, center-Y, center-Z,
power, 1/infinity >.
Chapter 6: Types for objects 57

VolRectShell
Volume Jacobian with rectangular shell transformation, for n-D regions in n-D
geometries, n = 2 or 3.
Parameters: radius-internal, radius-external <, direction, center-X, center-Y,
center-Z, power, 1/infinity >.
VolAxiRectShell
Same as VolAxi, but with rectangular shell transformation.
Parameters: radius-internal, radius-external <, direction, center-X, center-Y,
center-Z, power, 1/infinity >.
VolAxiSquRectShell
Same as VolAxiSqu, but with rectangular shell transformation.
Parameters: radius-internal, radius-external <, direction, center-X, center-Y,
center-Z, power, 1/infinity >.

6.6 Types for Integration


integration-type:

Gauss Numerical Gauss integration.


GaussLegendre
Numerical Gauss integration obtained by application of a multiplicative rule on
the one-dimensional Gauss integration.

element-type:

Line Line (2 nodes, 1 edge, 1 volume) (#1).


Triangle Triangle (3 nodes, 3 edges, 1 facet, 1 volume) (#2).
Quadrangle
Quadrangle (4 nodes, 4 edges, 1 facet, 1 volume) (#3).
Tetrahedron
Tetrahedron (4 nodes, 6 edges, 4 facets, 1 volume) (#4).
Hexahedron
Hexahedron (8 nodes, 12 edges, 6 facets, 1 volume) (#5).
Prism Prism (6 nodes, 9 edges, 5 facets, 1 volume) (#6).
Pyramid Pyramid (5 nodes, 8 edges, 5 facets, 1 volume) (#7).
Point Point (1 node) (#15).

Note:
1. n in (#n) is the type number of the element (see Section A.1 [Input file format],
page 111).
58 GetDP 2.11

6.7 Types for Formulation


formulation-type:

FemEquation
Finite element method formulation (all methods of moments, integral methods).

local-term-type:

Galerkin Integral of Galerkin type.


deRham deRham projection (collocation).

quantity-type:

Local Local quantity defining a field in a function space. In case a subspace is


considered, its identifier has to be given between the brackets following the
NameOfSpace function-space-id .
Global Global quantity defining a global quantity from a function space. The identifier
of this quantity has to be given between the brackets following the NameOfSpace
function-space-id .
Integral Integral quantity obtained by the integration of a LocalQuantity before its use
in an Equation term.

term-op-type:

Dt Time derivative applied to the whole term of the equation. (Not implemented
yet.)
DtDof Time derivative applied only to the Dof{} term of the equation.
DtDt Time derivative of 2nd order applied to the whole term of the equation. (Not
implemented yet.)
DtDtDof Time derivative of 2nd order applied only to the Dof{} term of the equation.
Eig The term is multiplied by (a certain function of) the eigenvalue. This is to
be used with the GenerateSeparate and EigenSolve Resolution operations.
An optional Order expression ; or Rational expression ; statement can be
added in the term to specify the eigenvalue function. Full documentation of
this feature is not available yet.
JacNL Nonlinear part of the Jacobian matrix (tangent stiffness matrix) to be assembled
for nonlinear analysis.
DtDofJacNL
Nonlinear part of the Jacobian matrix for the first order time derivative (tangent
mass matrix) to be assembled for nonlinear analysis.
NeverDt No time scheme applied to the term (e.g., Theta is always 1 even if a theta
scheme is applied).
Chapter 6: Types for objects 59

6.8 Types for Resolution


resolution-op:
Generate [system-id ]
Generate the system of equations system-id.
Solve [system-id ]
Solve the system of equations system-id.
SolveAgain
[system-id ]
Save as Solve, but reuses the preconditionner when called multiple times.
GenerateJac
[system-id ]
Generate the system of equations system-id using a jacobian matrix (of which
the unknowns are corrections dx of the current solution x).
SolveJac [system-id ]
Solve the system of equations system-id using a jacobian matrix (of which the
unknowns are corrections dx of the current solution x). Then, Increment the
solution (x=x+dx) and compute the relative error dx/x.
GenerateSeparate
[system-id ]
Generate matrices separately for DtDtDof, DtDof and NoDt terms in system-
id. The separate matrices can be used with the Update operation (for efficient
time domain analysis of linear PDEs with constant coefficients), or with the
EigenSolve operation (for solving generalized eigenvalue problems).
GenerateOnly
[system-id, expression-cst-list ]
Not documented yet.
GenerateOnlyJac
[system-id, expression-cst-list ]
Not documented yet.
GenerateGroup
Not documented yet.
GenerateRightHandSideGroup
Not documented yet.
Update [system-id ]
Update the system of equations system-id (built from sub-matrices generated
separately with GenerateSeparate) with the TimeFunction(s) provided in
Assign constraints. This assumes that the problem is linear, that the ma-
trix coefficients are independent of time, and that all sources are imposed using
Assign constraints.
60 GetDP 2.11

Update [system-id, expression ]


Update the system of equations system-id (built from sub-matrices generated
separately with GenerateSeparate) with expression. This assumes that the
problem is linear, that the matrix coefficients are independent of time, and that
the right-hand-side of the linear system can simply be multiplied by expression
at each step.
UpdateConstraint
[system-id, group-id, constraint-type ]
Recompute the constraint of type constraint-type acting on group-id during
processing.
GetResidual
[system-id, $variable-id ]
Compute the residual r = b - A x and store its L2 norm in the run-time variable
$variable-id.
GetNormSolution | GetNormRightHandSide | GetNormResidual | GetNormIncrement
[system-id, $variable-id ]
Compute the norm of the solution (resp. right-hand-side, residual or increment)
and store its L2 norm in the run-time variable $variable-id.
SwapSolutionAndResidual
[system-id ]
Swap the solution x and residual r vectors.
SwapSolutionAndRightHandSide
[system-id ]
Swap the solution x and right-hand-side b vectors.
InitSolution
[system-id ]
Creates a new solution vector, adds it to the solution vector list for system-id,
and initializes the solution. The values in the vector are initialized to the values
given in a Constraint of Init type (if two values are given in Init, the second
value is used). If no constraint is provided, the values are initialized to zero
if the solution vector is the first in the solution list; otherwise the values are
initialized using the previous solution in the list.
InitSolution1
[system-id ]
Same as InitSolution, but uses the first value given in the Init constraints.
CreateSolution
[system-id ]
Creates a new solution vector, adds it to the solution vector list for system-id,
and initializes the solution to zero.
CreateSolution
[system-id, expression-cst ]
Chapter 6: Types for objects 61

Same as CreateSolution, but initialize the solution by copying the expression-


cstth solution in the solution list.
Apply [system-id ]
x <- Ax
SetSolutionAsRightHandSide
[system-id ]
b <- x
SetRightHandSideAsSolution
[system-id ]
x <- b
Residual [system-id ]
res <- b - Ax
CopySolution
[system-id, char-expression | constant-id () ]
Copy the current solution x into a vector named char-expression or into a list
named constant-id.
CopySolution
[char-expression | constant-id (), system-id ]
Copy the vector named char-expression or the list named constant-id into the
current solution x.
CopyRightHandSide
[system-id, char-expression | constant-id () ]
Copy the current right-hand side b into a vector named char-expression or into
a list named constant-id.
CopyRightHandSide
[char-expression | constant-id (), system-id ]
Copy the vector named char-expression or the list named constant-id into the
current right-hand-side b.
CopyResidual
[system-id, char-expression | constant-id () ]
Copy the current residual into a vector named char-expression or into a list
named constant-id.
CopyResidual
[char-expression | constant-id (), system-id ]
Copy the vector named char-expression or the list named constant-id into the
current residual.
SaveSolution
[system-id ]
Save the solution of the system of equations system-id.
62 GetDP 2.11

SaveSolutions
[system-id ]
Save all the solutions available for the system of equations system-id. This
should be used with algorithms that generate more than one solution at once,
e.g., EigenSolve or FourierTransform.
RemoveLastSolution
[system-id ]
Removes the last solution (i.e. associated with the last time step) associated
with system system-id.
TransferSolution
[system-id ]
Transfer the solution of system system-id, as an Assign constraint, to the sys-
tem of equations defined with a DestinationSystem command. This is used
with the AssignFromResolution constraint type (see Section 6.3 [Types for
Constraint], page 53).
TransferInitSolution
[system-id ]
Transfer the solution of system system-id, as an Init constraint, to the sys-
tem of equations defined with a DestinationSystem command. This is used
with the InitFromResolution constraint type (see Section 6.3 [Types for Con-
straint], page 53).
Evaluate [expression <, expression >]
Evaluate the expression(s).
SetTime [expression ]
Change the current time.
SetTimeStep
[expression ]
Change the current time step number (1, 2, 3, ...)
SetDTime [expression ]
Change the current time step value (dt).
SetFrequency
[system-id, expression ]
Change the frequency of system system-id.
SystemCommand
[expression-char ]
Execute the system command given by expression-char.
Error [expression-char ]
Output error message expression-char.
Test [expression ] { resolution-op }
If expression is true (nonzero), perform the operations in resolution-op.
Chapter 6: Types for objects 63

Test [expression ] { resolution-op } { resolution-op }


If expression is true (nonzero), perform the operations in the first resolution-op,
else perform the operations in the second resolution-op.
While [expression ] { resolution-op }
While expression is true (nonzero), perform the operations in resolution-op.
Break []
Aborts an iterative loop, a time loop or a While loop.
Sleep [expression ]
Sleeps for expression seconds;
Print [ { expression-list } <, File expression-char > <, Format
expression-char > ]
Print the expressions listed in expression-list. If Format is given, use it to
format the (scalar) expressions like Printf.
Print [ system-id <, File expression-char > <, { expression-cst-list } >
<, TimeStep { expression-cst-list } >]
Print the system system-id. If the expression-cst-list is given, print only the
values of the degrees of freedom given in that list. If the TimeStep option is
present, limit the printing to the selected time steps.
EigenSolve
[system-id, expression-cst, expression-cst, expression-cst < ,
expression > ]
Eigenvalue/eigenvector computation using Arpack or SLEPc. The parameters
are: the system (which has to be generated with GenerateSeparate[]), the
number of eigenvalues/eigenvectors to compute and the real and imaginary
spectral shift (around which to look for eigenvalues). The last optional argu-
ment allows to filter which eigenvalue/eigenvector pairs will be saved. For ex-
ample, ($EigenvalueReal > 0) would only keep pairs corresponding to eigen-
values with a striclty positive real part.
Lanczos [system-id, expression-cst, { expression-cst-list } , expression-
cst ]
Eigenvalue/eigenvector computation using the Lanczos algorithm. The param-
eters are: the system (which has to be generated with GenerateSeparate[]),
the size of the Lanczos space, the indices of the eigenvalues/eigenvectors to
store, the spectral shift. This routine is deprecated: use EigenSolve instead.
FourierTransform
[system-id, system-id, { expression-cst-list }]
On-the-fly computation of a discrete Fourier transform. The parameters are:
the (time domain) system, the destination system in which the result of the
Fourier tranform is to be saved (it should be declared with Type Complex), the
list of frequencies to consider in the discrete Fourier transform.
64 GetDP 2.11

TimeLoopTheta
[expression-cst,expression-cst,expression,expression-cst ] {
resolution-op }
Time loop of a theta scheme. The parameters are: the initial time, the end
time, the time step and the theta parameter (e.g., 1 for implicit Euler, 0.5 for
Crank-Nicholson).
Warning: GetDP automatically handles time-dependent constraints when
they are provided using the TimeFunction mechanism in an Assign-type
Constraint (see Section 5.3 [Constraint], page 31). However, GetDP
cannot automatically transform general time-dependent source terms in weak
formulations (time-dependent functions written in a Galerkin term). Such
source terms will be correctly treated only for implicit Euler, as the expression
in the Galerkin term is evaluated at the current time step. For other schemes,
the source term should be written explicitly, by splitting it in two (theta
f_n+1 + (1-theta) f_n), making use of the AtAnteriorTimeStep[] for the
second part, and specifying NeverDt in the Galerkin term.
TimeLoopNewmark
[expression-cst,expression-cst,expression,expression-
cst,expression-cst ]
{ resolution-op }
Time loop of a Newmark scheme. The parameters are: the initial time, the end
time, the time step, the beta and the gamma parameter.
Warning: same restrictions apply for time-dependent functions in the weak
formulations as for TimeLoopTheta.
TimeLoopAdaptive
[expression-cst,expression-cst,expression-cst,expression-cst,
expression-cst,integration-method,<expression-cst-list >,
System { {system-id,expression-cst,expression-cst,norm-type } ... }
|
PostOperation { {post-operation-id,expression-cst,expression-
cst,norm-type } ... } ]
{ resolution-op }
{ resolution-op }
Time loop with variable time steps. The step size is adjusted according the
local truncation error (LTE) of the specified Systems/PostOperations via a
predictor-corrector method.
The parameters are: start time, end time, initial time step, min. time step,
max. time step, integration method, list of breakpoints (time points to be
hit). The LTE calculation can be based on all DOFs of a system and/or on
a PostOperation result. The parameters here are: System/PostOperation for
LTE assessment, relative LTE tolerance, absolute LTE tolerance, norm-type for
LTE calculation.
Possible choices for integration-method are: Euler, Trapezoidal, Gear_2,
Gear_3, Gear_4, Gear_5, Gear_6. The Gear methods correspond to backward
differentiation formulas of order 2..6.
Chapter 6: Types for objects 65

Possible choices for norm-type: L1Norm, MeanL1Norm, L2Norm, MeanL2Norm,


LinfNorm.
MeanL1Norm and MeanL2Norm correspond to L1Norm and L2Norm divided by the
number of degrees of freedom, respectively.
The first resolution-op is executed every time step. The second one is only
executed if the actual time step is accepted (LTE is in the specified range).
E.g. SaveSolution[] is usually placed in the 2nd resolution-op.

IterativeLoop
[expression-cst,expression,expression-cst <,expression-cst >] {
resolution-op }
Iterative loop for nonlinear analysis. The parameters are: the maximum number
of iterations (if no convergence), the relaxation factor (multiplies the iterative
correction dx) and the relative error to achieve. The optional parameter is a
flag for testing purposes.
IterativeLoopN
[expression-cst,expression,
System { {system-id,expression-cst,expression-cst, assessed-object
norm-type } ... } |
PostOperation { {post-operation-id,expression-cst,expression-cst,
norm-type } ... } ]
{ resolution-op }
Similar to IterativeLoop[] but allows to specify in detail the tolerances and
the type of norm to be calculated for convergence assessment.
The parameters are: the maximum number of iterations (if no convergence),
the relaxation factor (multiplies the iterative correction dx). The convergence
assessment can be based on all DOFs of a system and/or on a PostOperation
result. The parameters here are: System/PostOperation for convergence assess-
ment, relative tolerance, absolute tolerance, assessed object (only applicable for
a specified system), norm-type for error calculation.
Possible choices for assessed-object: Solution, Residual, RecalcResidual.
Residual assesses the residual from the last iteration whereas RecalcResidual
calculates the residual once again after each iteration. This means that with
Residual usually one extra iteration is performed, but RecalcResidual causes
higher computational effort per iteration. Assessing the residual can only be
used for Newton’s method.
Possible choices for norm-type: L1Norm, MeanL1Norm, L2Norm, MeanL2Norm,
LinfNorm.
MeanL1Norm and MeanL2Norm correspond to L1Norm and L2Norm divided by the
number of degrees of freedom, respectively.

IterativeLinearSolver
Generic iterative linear solver. To be documented.
PostOperation
[post-operation-id ]
66 GetDP 2.11

Perform the specified PostOperation.


GmshRead [expression-char ]
When GetDP is linked with the Gmsh library, read a file using Gmsh. This
file can be in any format recognized by Gmsh. If the file contains one or
multiple post-processing fields, these fields will be evaluated using the built-
in Field[], ScalarField[], VectorField[], etc., functions (see Section 6.2.6
[Miscellaneous functions], page 50).
(Note that GmshOpen and GmshMerge can be used instead of GmshRead to force
Gmsh to do classical “open” and “merge” operations, instead of trying to “be
intelligent” when reading post-processing datasets, i.e., creating new models on
the fly if necessary.)
GmshRead [expression-char, expression-cst ]
Same thing as the GmshRead command above, except that the field is forced to
be stored with the given tag. The tag can be used to retrieve the given field
with the built-in Field[], ScalarField[], VectorField[], etc., functions (see
Section 6.2.6 [Miscellaneous functions], page 50).
GmshWrite
[expression-char, expression-cst ]
Writes the a Gmsh field to disk. (The format is guessed from the file extension.)
GmshClearAll
[]
Clears all Gmsh data (loaded with GmshRead and friends).
DeleteFile
[expression-char ]
Delete a file.
RenameFile
[expression-char, expression-char ]
Rename a file.
CreateDir | CreateDirectory
[expression-char ]
Create a directory.
MPI_SetCommSelf
[]
Changes MPI communicator to self.
MPI_SetCommWorld
[]
Changes MPI communicator to world.
MPI_Barrier
[]
MPI barrier (blocks until all processes have reached this call).
Chapter 6: Types for objects 67

MPI_BroadcastFields
[ < expression-list > ]
Broadcast all fields over MPI (except those listed in the list).
MPI_BroadcastVariables
[]
Broadcast all runtime variables over MPI.

6.9 Types for PostProcessing


post-value:
Local { local-value }
To compute a local quantity.
Integral { integral-value }
To integrate the expression over each element.

6.10 Types for PostOperation


print-support:
OnElementsOf
group-def
To compute a quantity on the elements belonging to the region group-def, where
the solution was computed during the processing stage.
OnRegion group-def
To compute a global quantity associated with the region group-def.
OnGlobal To compute a global integral quantity, with no associated region.
OnSection
{ { expression-cst-list } { expression-cst-list } { expression-cst-list } }
To compute a quantity on a section of the mesh defined by three points (i.e., on
the intersection of the mesh with a cutting a plane, specified by three points).
Each expression-cst-list must contain exactly three elements (the coordinates
of the points).
OnGrid group-def
To compute a quantity in elements of a mesh which differs from the real support
of the solution. OnGrid group-def differs from OnElementsOf group-def by
the reinterpolation that must be performed.
OnGrid { expression, expression, expression }
{ expression-cst-list-item | { expression-cst-list } ,
expression-cst-list-item | { expression-cst-list } ,
expression-cst-list-item | { expression-cst-list } }
To compute a quantity on a parametric grid. The three expressions repre-
sent the three cartesian coordinates x, y and z, and can be functions of the
current values $A, $B and $C. The values for $A, $B and $C are specified
68 GetDP 2.11

by each expression-cst-list-item or expression-cst-list. For example, OnGrid


{Cos[$A], Sin[$A], 0} { 0:2*Pi:Pi/180, 0, 0 } will compute the quantity
on 360 points equally distributed on a circle in the z=0 plane, and centered on
the origin.
OnPoint { expression-cst-list }
To compute a quantity at a point. The expression-cst-list must contain exactly
three elements (the coordinates of the point).
OnLine { { expression-cst-list } { expression-cst-list } } { expression-cst }
To compute a quantity along a line (given by its two end points), with an
associated number of divisions equal to expression-cst. The interpolation points
on the line are equidistant. Each expression-cst-list must contain exactly three
elements (the coordinates of the points).
OnPlane { { expression-cst-list } { expression-cst-list } { expression-cst-list } }
{ expression-cst, expression-cst }
To compute a quantity on a plane (specified by three points), with an asso-
ciated number of divisions equal to each expression-cst along both generating
directions. Each expression-cst-list must contain exactly three elements (the
coordinates of the points).
OnBox { { expression-cst-list } { expression-cst-list } { expression-cst-list }
{ expression-cst-list } } { expression-cst, expression-cst,
expression-cst }
To compute a quantity in a box (specified by four points), with an associated
number of divisions equal to each expression-cst along the three generating
directions. Each expression-cst-list must contain exactly three elements (the
coordinates of the points).
print-option:
File expression-char
Outputs the result in a file named expression-char.
File > expression-char
Same as File expression-char , except that, if several File > expression-
char options appear in the same PostOperation, the results are concatenated
in the file expression-char.
File >> expression-char
Appends the result to a file named expression-char.
AppendToExistingFile
expression-cst
Appends the result to the file specified with File. (Same behavior as > if
expression-cst = 1; same behavior as >> if expression-cst = 2.)
Name | Label
expression-char
For formats that support it, sets the label of the output field to expression-char
(also used with with SendToServer to force the label).
Chapter 6: Types for objects 69

Depth expression-cst
Recursive division of the elements if expression-cst is greater than zero, dere-
finement if expression-cst is smaller than zero. If expression-cst is equal to zero,
evaluation at the barycenter of the elements.
Skin Computes the result on the boundary of the region.
Smoothing
< expression-cst >
Smoothes the solution at the nodes.
HarmonicToTime
expression-cst
Converts a harmonic solution into a time-dependent one (with expression-cst
steps).
Dimension
expression-cst
Forces the dimension of the elements to consider in an element search. Specifies
the problem dimension during an adaptation (h- or p-refinement).
TimeStep expression-cst-list-item | { expression-cst-list }
Outputs results for the specified time steps only.
TimeValue
expression-cst-list-item | { expression-cst-list }
Outputs results for the specified time value(s) only.
TimeImagValue
expression-cst-list-item | { expression-cst-list }
Outputs results for the specified imaginary time value(s) only.
LastTimeStepOnly
Outputs results for the last time step only (useful when calling a PostOperation
directly in a Resolution, for example).
AppendExpressionToFileName
expression
Evaluate the given expression at run-time and append it to the filename.
AppendExpressionFormat
expression-char
C-style format string for printing the expression provided in
AppendExpressionToFileName. Default is "%.16g".
AppendTimeStepToFileName
< expression-cst >
Appends the time step to the output file; only makes sense with
LastTimeStepOnly.
70 GetDP 2.11

AppendStringToFileName
expression-char
Append the given expression-char to the filename.
OverrideTimeStepValue
expression-cst
Overrides the value of the current time step with the given value.
NoMesh < expression-cst >
Prevents the mesh from being written in the output file (useful with new mesh-
based solution formats).
SendToServer
expression-char
Send the value to the Onelab server, using expression-char as the parameter
name.
SendToServer
expression-char { expression-cst-list }
Send the requested harmonics of the value to the Onelab server, using
expression-char as the parameter name.
Color expression-char
Used with SendToServer, sets the color of the parameter in the Onelab server.
Hidden < expression-cst >
Used with SendToServer, selects the visibility of the exchanged value.
Closed expression-char
Used with SendToServer, closes (or opens) the subtree containing the param-
eter.
Units expression-char
Used with SendToServer, sets the units of the parameter in the Onelab server.
Frequency
expression-cst-list-item | { expression-cst-list }
Outputs results for the specified frequencies only.
Format post-operation-fmt
Outputs results in the specified format.
Adapt P1 | H1 | H2
Performs p- or h-refinement on the post-processing result, considered as an error
map.
Target expression-cst
Specifies the target for the optimizer during adaptation (error for P1|H1, num-
ber of elements for H2).
Chapter 6: Types for objects 71

Value expression-cst-list-item | { expression-cst-list }


Specifies acceptable output values for discrete optimization (e.g. the available
interpolation orders with Adapt P1).
Sort Position | Connection
Sorts the output by position (x, y, z) or by connection (for LINE elements only).
Iso expression-cst
Outputs directly contour prints (with expression-cst values) instead of elemen-
tary values.
Iso { expression-cst-list }
Outputs directly contour prints for the values specified in the expression-cst-list
instead of elementary values.
NoNewLine
Suppresses the new lines in the output when printing global quantities (i.e.,
with Print OnRegion or Print OnGlobal).
ChangeOfCoordinates
{ expression, expression, expression }
Changes the coordinates of the results according to the three expressions given
in argument. The three expressions represent the three new cartesian coordi-
nates x, y and z, and can be functions of the current values of the cartesian
coordinates $X, $Y and $Z.
ChangeOfValues
{ expression-list }
Changes the values of the results according to the expressions given in argument.
The expressions represent the new values (x-compoment, y-component, etc.),
and can be functions of the current values of the solution ($Val0, $Val1, etc.).
DecomposeInSimplex
Decomposes all output elements in simplices (points, lines, triangles or tetra-
hedra).
StoreInVariable
$expression-char
Stores the result of a point-wise evaluation or an OnRegion post-processing
operation in the run-time variable $code[$]expression-char.
StoreInRegister
expression-cst
Stores the result of point-wise evaluation or an OnRegion post-processing oper-
ation in the register expression-cst.
StoreMinInRegister
StoreMaxInRegister
expression-cst
Stores the minimum or maximum value of an OnElementsOf post-processing
operation in the register expression-cst.
72 GetDP 2.11

StoreMinXinRegister
StoreMinYinRegister
StoreMinZinRegister
StoreMaxXinRegister
StoreMaxYinRegister
StoreMaxZinRegister
expression-cst
Stores the X, Y or Z coordinate of the location, where the minimum or max-
imum of an OnElementsOf post-processing operation occurs, in the register
expression-cst.
StoreInField
expression-cst
Stores the result of a post-processing operation in the field (Gmsh list-based
post-processing view) with tag expression-cst.
StoreInMeshBasedField
expression-cst
Stores the result of a post-processing operation in the mesh-based field (Gmsh
mesh-based post-processing view) with tag expression-cst.
TimeLegend
< { expression, expression, expression } >
Includes a time legend in Gmsh plots. If the three optional expressions giving
the position of the legend are not specified, the legend is centered on top of the
plot.
FrequencyLegend
< { expression, expression, expression } >
Includes a frequency legend in Gmsh plots. If the three optional expressions
giving the position of the legend are not specified, the legend is centered on top
of the plot.
EigenvalueLegend
< { expression, expression, expression } >
Includes an eigenvalue legend in Gmsh plots. If the three optional expressions
giving the position of the legend are not specified, the legend is centered on top
of the plot.
post-operation-fmt:
Gmsh
GmshParsed
Gmsh output. See Section A.1 [Input file format], page 111 and the documen-
tation of Gmsh (http://gmsh.info) for a description of the file formats.
Table Space oriented column output, e.g., suitable for Gnuplot, Excel, Caleida Graph,
etc. The columns are: element-type element-index x-coord y-coord z-coord
<x-coord y-coord z-coord> . . . real real real values. The three real numbers
preceding the values contain context-dependent information, depending on the
Chapter 6: Types for objects 73

type of plot: curvilinear abscissa for OnLine plots, normal to the plane for
OnPlane plots, parametric coordinates for parametric OnGrid plots, etc.
SimpleTable
Like Table, but with only the x-coord y-coord z-coord and values columns.
TimeTable
Time oriented column output, e.g., suitable for Gnuplot, Excel, Caleida Graph,
etc. The columns are: time-step time x-coord y-coord z-coord <x-coord y-coord
z-coord> . . . value.
NodeTable
Table of node values. The first value corresponds to the number of listed nodes.
The columns of the following lines are: node-number node-value(s)
Gnuplot Space oriented column output similar to the Table format, except that a new
line is created for each node of each element, with a repetition of the first node
if the number of nodes in the element is greater than 2. This permits to draw
unstructured meshes and nice three-dimensional elevation plots in Gnuplot.
The columns are: element-type element-index x-coord y-coord z-coord real
real real values. The three real numbers preceding the values contain context-
dependent information, depending on the type of plot: curvilinear abscissa for
OnLine plots, normal to the plane for OnPlane plots, parametric coordinates
for parametric OnGrid plots, etc.
Adaptation
Adaptation map, suitable for the GetDP -adapt command line option.
Chapter 7: Short examples 75

7 Short examples

7.1 Constant expression examples


The simplest constant expression consists of an integer or a real number as in
21
-3
or
-3.1415
27e3
-290.53e-12
Using operators and the classic math functions, constant-ids can be defined:
c1 = Sin[2/3*3.1415] * 5000^2;
c2 = -1/c1;

7.2 Group examples


Let us assume that some elements in the input mesh have the region numbers 1000, 2000
and 3000. In the definitions
Group {
Air = Region[1000]; Core = Region[2000]; Inductor = Region[3000];
NonConductingDomain = Region[{Air, Core}];
ConductingDomain = Region[{Inductor}];
}
Air, Core, Inductor are identifiers of elementary region groups while NonConductingDom
ain and ConductingDomain are global region groups.
Groups of function type contain lists of entities built on the region groups appearing in
their arguments. For example,
NodesOf[NonConductingDomain]
represents the group of nodes of geometrical elements belonging to the regions in NonConduc
tingDomain and
EdgesOf[DomainC, Not SkinDomainC]
represents the group of edges of geometrical elements belonging to the regions in DomainC
but not to those of SkinDomainC.

7.3 Function examples


A physical characteristic is a piecewise defined function. The magnetic permeability mu[]
can for example be defined in the considered regions by
Function {
mu[Air] = 4.e-7*Pi;
mu[Core] = 1000.*4.e-7*Pi;
}
A nonlinear characteristic can be defined through an expression with arguments, e.g.,
76 GetDP 2.11

Function {
mu0 = 4.e-7*Pi;
a1 = 1000.; b1 = 100.; // Constants
mu[NonlinearCore] = mu0 + 1./(a1+b1*Norm[$1]^6);
}
where function mu[] in region NonLinearCore has one argument $1 which has to be the
magnetic flux density. This function is actually called when writing the equations of a
formulation, which permits to directly extend it to a nonlinear form by adding only the
necessary arguments. For example, in a magnetic vector potential formulation, one may
write mu[{Curl a}] instead of mu[] in Equation terms (see Section 7.8 [Formulation ex-
amples], page 83). Multiple arguments can be specified in a similar way: writing mu[{Curl
a},{T}] in an Equation term will provide the function mu[] with two usable arguments,
$1 (the magnetic flux density) and $2 (the temperature).
It is also possible to directly interpolate one-dimensional functions from tabulated data. In
the following example, the function f (x) as well as its derivative f ’(x) are interpolated from
the (x,f (x)) couples (0,0.65), (1,0.72), (2,0.98) and (3,1.12):
Function {
couples = {0, 0.65 , 1, 0.72 , 2, 0.98 , 3, 1.12};
f[] = InterpolationLinear[$1]{List[couples]};
dfdx[] = dInterpolationLinear[$1]{List[couples]};
}
The function f[] may then be called in an Equation term of a Formulation with one argu-
ment, x. Notice how the list of constants List[couples] is supplied as a list of parameters
to the built-in function InterpolationLinear (see Section 4.4 [Constants], page 16, as well
as Section 4.6 [Functions], page 22). In order to facilitate the construction of such interpo-
lations, the couples can also be specified in two separate lists, merged with the alternate
list ListAlt command (see Section 4.4 [Constants], page 16):
Function {
data_x = {0, 1, 2, 3};
data_f = {0.65, 0.72, 0.98, 1.12};
f[] = InterpolationLinear[$1]{ListAlt[data_x, data_f]};
dfdx[] = dInterpolationLinear[$1]{ListAlt[data_x, data_f]};
}
In order to optimize the evaluation time of complex expressions, registers may be used (see
Section 4.9 [Run-time variables and registers], page 24). For example, the evaluation of g[]
= f[$1]*Sin[f[$1]^2] would require two (costly) linear interpolations. But the result of
the evaluation of f[] may be stored in a register (for example the register 0) with
g[] = f[$1]#0 * Sin[#0^2];
thus reducing the number of evaluations of f[] (and of the argument $1) to one.
The same results can be obtained using a run-time variable $v:
g[] = ($v = f[$1]) * Sin[$v^2];
A function can also be time dependent, e.g.,
Function {
Freq = 50.; Phase = 30./180.*Pi; // Constants
Chapter 7: Short examples 77

TimeFct_Sin[] = Sin [ 2.*Pi*Freq * $Time + Phase ];


TimeFct_Exp[] = Exp [ - $Time / 0.0119 ];
TimeFct_ExtSin[] = Sin_wt_p [] {2.*Pi*Freq, Phase};
}
Note that TimeFct_ExtSin[] is identical to TimeFct_Sin[] in a time domain analysis, but
also permits to define phasors implicitely in the case of harmonic analyses.

7.4 Constraint examples


Constraints are referred to in FunctionSpaces and are usually used for boundary conditions
(Assign type). For example, essential conditions on two surface regions, Surf0 and Surf1,
will be first defined by
Constraint {
{ Name DirichletBoundaryCondition1; Type Assign;
Case {
{ Region Surf0; Value 0.; }
{ Region Surf1; Value 1.; }
}
}
}
The way the Values are associated with Regions (with their nodes, their edges, their global
regions, . . . ) is defined in the FunctionSpaces which use the Constraint. In other words, a
Constraint defines data but does not define the method to process them. A time dependent
essential boundary condition on Surf1 would be introduced as (cf. Section 7.3 [Function
examples], page 75 for the definition of TimeFct_Exp[]):
{ Region Surf1; Value 1.; TimeFunction 3*TimeFct_Exp[] }
It is important to notice that the time dependence cannot be introduced in the Value field,
since the Value is only evaluated once during the pre-processing.
Other constraints can be referred to in Formulations. It is the case of those defining
electrical circuit connections (Network type), e.g.,
Constraint {
{ Name ElectricalCircuit; Type Network;
Case Circuit1 {
{ Region VoltageSource; Branch {1,2}; }
{ Region PrimaryCoil; Branch {1,2}; }
}
Case Circuit2 {
{ Region SecondaryCoil; Branch {1,2}; }
{ Region Charge; Branch {1,2}; }
}
}
}
which defines two non-connected circuits (Circuit1 and Circuit2), with an independent
numbering of nodes: region VoltageSource is connected in parallel with region
PrimaryCoil, and region SecondaryCoil is connected in parallel with region Charge.
78 GetDP 2.11

7.5 FunctionSpace examples


Various discrete function spaces can be defined in the frame of the finite element method.

7.5.1 Nodal finite element spaces


The most elementary function space is the nodal finite element space, defined on a mesh of a
domain W and denoted S0(W) (associated finite elements can be of various geometries), and
associated with essential boundary conditions (Dirichlet conditions). It contains 0-forms,
i.e., scalar fields of potential type:
X
v= vn s n v ∈ S 0 (W )
n∈N

where N is the set of nodes of W, sn is the nodal basis function associated with node n and
vn is the value of v at node n. It is defined by
FunctionSpace {
{ Name Hgrad_v; Type Form0;
BasisFunction {
{ Name sn; NameOfCoef vn; Function BF_Node;
Support Domain; Entity NodesOf[All]; }
}
Constraint {
{ NameOfCoef vn; EntityType NodesOf;
NameOfConstraint DirichletBoundaryCondition1; }
}
}
}
Function sn is the built-in basis function BF Node associated with all nodes (NodesOf) in
the mesh of W (Domain). Previously defined Constraint DirichletBoundaryCondition1
(see Section 7.4 [Constraint examples], page 77) is used as boundary condition.
In the example above, Entity NodesOf[All] is preferred to Entity NodesOf[Domain]. In
this way, the list of all the nodes of Domain will not have to be generated. All the nodes of
each geometrical element in Support Domain will be directly taken into account.

7.5.2 High order nodal finite element space


Higher order finite elements can be directly taken into account by BF_Node. Hierarchical
finite elements for 0-forms can be used by simply adding other basis functions (associated
with other geometrical entities, e.g., edges and facets) to BasisFunction, e.g.,
...
BasisFunction {
{ Name sn; NameOfCoef vn; Function BF_Node;
Support Domain; Entity NodesOf[All]; }
{ Name s2; NameOfCoef v2; Function BF_Node_2E;
Support Domain; Entity EdgesOf[All]; }
}
...
Chapter 7: Short examples 79

7.5.3 Nodal finite element space with floating potentials


A scalar potential with floating values vf on certain boundaries Gf, f in Cf, e.g., for elec-
trostatic problems, can be expressed as
X X
v= vn sn + vf sf v ∈ S 0 (W )
n∈Nv f ∈Cf

where Nv is the set of inner nodes of W and each function sf is associated with the group
of nodes of boundary Gf, f in Cf (SkinDomainC); sf is the sum of the nodal basis functions
of all the nodes of Cf. Its function space is defined by
FunctionSpace {
{ Name Hgrad_v_floating; Type Form0;
BasisFunction {
{ Name sn; NameOfCoef vn; Function BF_Node;
Support Domain; Entity NodesOf[All, Not SkinDomainC]; }
{ Name sf; NameOfCoef vf; Function BF_GroupOfNodes;
Support Domain; Entity GroupsOfNodesOf[SkinDomainC]; }
}
GlobalQuantity {
{ Name GlobalElectricPotential; Type AliasOf; NameOfCoef vf; }
{ Name GlobalElectricCharge; Type AssociatedWith;
NameOfCoef vf; }
}
Constraint { ... }
}
}
Two global quantities have been associated with this space: the electric potential Global
ElectricPotential, being an alias of coefficient vf, and the electric charge GlobalElec
tricCharge, being associated with coefficient vf.

7.5.4 Edge finite element space


Another space is the edge finite element space, denoted S1(W), containing 1-forms, i.e.,
curl-conform fields:
X
h= he s e h ∈ S 1 (W )
e∈E

where E is the set of edges of W, se is the edge basis function for edge e and he is the
circulation of h along edge e. It is defined by
FunctionSpace {
{ Name Hcurl_h; Type Form1;
BasisFunction {
{ Name se; NameOfCoef he; Function BF_Edge;
Support Domain; Entity EdgesOf[All]; }
}
Constraint { ... }
80 GetDP 2.11

}
}

7.5.5 Edge finite element space with gauge condition


A 1-form function space containing vector potentials can be associated with a gauge con-
dition, which can be defined as a constraint, e.g., a zero value is fixed for all circulations
along edges of a tree (EdgesOfTreeIn) built in the mesh (Domain), having to be complete
on certain boundaries (StartingOn Surf):
Constraint {
{ Name GaugeCondition_a_Mag_3D; Type Assign;
Case {
{ Region Domain; SubRegion Surf; Value 0.; }
}
}
}

FunctionSpace {
{ Name Hcurl_a_Gauge; Type Form1;
BasisFunction {
{ Name se; NameOfCoef ae; Function BF_Edge;
Support Domain; Entity EdgesOf[All]; }
}
Constraint {
{ NameOfCoef ae;
EntityType EdgesOfTreeIn; EntitySubType StartingOn;
NameOfConstraint GaugeCondition_a_Mag_3D; }
...
}
}
}

7.5.6 Coupled edge and nodal finite element spaces


A 1-form function space, containing curl free fields in certain regions WcC (DomainCC) of W,
which are the complementary part of Wc (DomainC) in W, can be explicitly characterized
by
X X
h= hk sk + φn vn h ∈ S 1 (W )
k∈Ec n∈NcC

where Ec is the set of inner edges of W, NcC is the set of nodes inside WcC and on its
boundary dWcC, sk is an edge basis function and vn is a vector nodal function. Such a
space, coupling a vector field with a scalar potential, can be defined by
FunctionSpace {
{ Name Hcurl_hphi; Type Form1;
BasisFunction {
{ Name sk; NameOfCoef hk; Function BF_Edge;
Chapter 7: Short examples 81

Support DomainC; Entity EdgesOf[All, Not SkinDomainC]; }


{ Name vn; NameOfCoef phin; Function BF_GradNode;
Support DomainCC; Entity NodesOf[All]; }
{ Name vn; NameOfCoef phic; Function BF_GroupOfEdges;
Support DomainC; Entity GroupsOfEdgesOnNodesOf[SkinDomainC];}
}
Constraint {
{ NameOfCoef hk;
EntityType EdgesOf; NameOfConstraint MagneticField; }
{ NameOfCoef phin;
EntityType NodesOf; NameOfConstraint MagneticScalarPotential; }
{ NameOfCoef phic;
EntityType NodesOf; NameOfConstraint MagneticScalarPotential; }
}
}
}
This example points out the definition of a piecewise defined basis function, e.g., function
vn being defined with BF_GradNode in DomainCC and BF_GroupOfEdges in DomainC. This
leads to an easy coupling between these regions.

7.5.7 Coupled edge and nodal finite element spaces for multiply
connected domains
In case a multiply connected domain WcC is considered, basis functions associated with cuts
(SurfaceCut) have to be added to the previous basis functions, which gives the function
space below:
Group {
_TransitionLayer_SkinDomainC_ =
ElementsOf[SkinDomainC, OnOneSideOf SurfaceCut];
}

FunctionSpace {
{ Name Hcurl_hphi; Type Form1;
BasisFunction {

... same as above ...

{ Name sc; NameOfCoef Ic; Function BF_GradGroupOfNodes;


Support ElementsOf[DomainCC, OnOneSideOf SurfaceCut];
Entity GroupsOfNodesOf[SurfaceCut]; }
{ Name sc; NameOfCoef Icc; Function BF_GroupOfEdges;
Support DomainC;
Entity GroupsOfEdgesOf
[SurfaceCut,
InSupport _TransitionLayer_SkinDomainC_]; }
}
GlobalQuantity {
82 GetDP 2.11

{ Name I; Type AliasOf ; NameOfCoef Ic; }


{ Name U; Type AssociatedWith; NameOfCoef Ic; }
}
Constraint {

... same as above ...

{ NameOfCoef Ic;
EntityType GroupsOfNodesOf; NameOfConstraint Current; }
{ NameOfCoef Icc;
EntityType GroupsOfNodesOf; NameOfConstraint Current; }
{ NameOfCoef U;
EntityType GroupsOfNodesOf; NameOfConstraint Voltage; }
}
}
}

Global quantities associated with the cuts, i.e., currents and voltages if h is the magnetic
field, have also been defined.

7.6 Jacobian examples


A simple Jacobian method is for volume transformations (of n-D regions in n-D geometries;
n = 1, 2 or 3), e.g., in region Domain,

Jacobian {
{ Name Vol;
Case {
{ Region Domain; Jacobian Vol; }
}
}
}

Jacobian VolAxi would define a volume Jacobian for axisymmetrical problems.

A Jacobian method can also be piecewise defined, in DomainInf, where an infinite geomet-
rical transformation has to be made using two constant parameters (inner and outer radius
of a spherical shell), and in all the other regions (All, being the default); in each case, a
volume Jacobian is used. This method is defined by:

Jacobian {
{ Name Vol;
Case {
{ Region DomainInf; Jacobian VolSphShell {Val_Rint, Val_Rext}; }
{ Region All; Jacobian Vol; }
}
}
}
Chapter 7: Short examples 83

7.7 Integration examples


A commonly used numerical integration method is the Gauss integration, with a
number of integration points (NumberOfPoints) depending on geometrical element types
(GeoElement), i.e.
Integration {
{ Name Int_1;
Case { {Type Gauss;
Case { { GeoElement Triangle ; NumberOfPoints 4; }
{ GeoElement Quadrangle ; NumberOfPoints 4; }
{ GeoElement Tetrahedron; NumberOfPoints 4; }
{ GeoElement Hexahedron ; NumberOfPoints 6; }
{ GeoElement Prism ; NumberOfPoints 9; } }
}
}
}
}
The method above is valid for both 2D and 3D problems, for different kinds of elements.

7.8 Formulation examples


7.8.1 Electrostatic scalar potential formulation
An electrostatic formulation using an electric scalar potential v, i.e.

( grad v, grad v 0 )W = 0 ∀v 0 ∈ S 0 (W )

is expressed by
Formulation {
{ Name Electrostatics_v; Type FemEquation;
Quantity {
{ Name v; Type Local; NameOfSpace Hgrad_v; }
}
Equation {
Galerkin { [ epsr[] * Dof{Grad v} , {Grad v} ];
In Domain; Jacobian Vol; Integration Int_1; }
}
}
}
The density of the Galerkin term is a copy of the symbolic form of the formulation, i.e.,
the product of a relative permittivity function epsr[] by a vector of degrees of freedom
(Dof{.}); the scalar product of this with the gradient of test function v results in a sym-
metrical matrix.
Note that another Quantity could be defined for test functions, e.g., vp defined by { Name
vp; Type Local; NameOfSpace Hgrad_v; }. However, its use would result in the computa-
tion of a full matrix and consequently in a loss of efficiency.
84 GetDP 2.11

7.8.2 Electrostatic scalar potential formulation with floating


potentials and electric charges
An extension of the formulation above can be made to take floating potentials and electrical
charges into account (the latter being defined in FunctionSpace Hgrad_v_floating), i.e.
Formulation {
{ Name Electrostatics_v_floating; Type FemEquation;
Quantity {
{ Name v; Type Local; NameOfSpace Hgrad_v_floating; }
{ Name V; Type Global;
NameOfSpace Hgrad_v_floating [GlobalElectricPotential]; }
{ Name Q; Type Global;
NameOfSpace Hgrad_v_floating [GlobalElectricCharge]; }
}
Equation {
Galerkin { [ epsr[] * Dof{Grad v} , {Grad v} ];
In Domain; Jacobian Vol; Integration Int_1; }
GlobalTerm { [ - Dof{Q}/eps0 , {V} ]; In SkinDomainC; }
}
}
}
with the predefinition Function { eps0 = 8.854187818e-12; }.

7.8.3 Magnetostatic 3D vector potential formulation


A magnetostatic 3D vector potential formulation

(ν curl a, curl a0 )W = (js , a0 )Ws ∀a0 ∈ S 1 (W ), with gauge condition

with a source current density js in inductors Ws, is expressed by


Formulation {
{ Name Magnetostatics_a_3D; Type FemEquation;
Quantity {
{ Name a; Type Local; NameOfSpace Hcurl_a_Gauge; }
}
Equation {
Galerkin { [ nu[] * Dof{Curl a} , {Curl a} ];
In Domain; Jacobian Vol; Integration Int_1; }
Galerkin { [ - SourceCurrentDensity[] , {a} ];
In DomainWithSourceCurrentDensity;
Jacobian Vol; Integration Int_1; }
}
}
}
Note that js is here given by a function SourceCurrentDensity[], but could also be given
by data computed from another problem, e.g., from an electrokinetic problem (coupling of
formulations) or from a fully fixed function space (constraints fixing the density, which is
usually more efficient in time domain analyses).
Chapter 7: Short examples 85

7.8.4 Magnetodynamic 3D or 2D magnetic field and magnetic


scalar potential formulation
A magnetodynamic 3D or 2D h-phi formulation, i.e., coupling the magnetic field h with a
magnetic scalar potential phi,

∂t (µ h, h0 )W + (ρ curl h, curl h0 )Wc = 0 ∀h0 ∈ S 1 (W )

can be expressed by
Formulation {
{ Name Magnetodynamics_hphi; Type FemEquation;
Quantity {
{ Name h; Type Local; NameOfSpace Hcurl_hphi; }
}
Equation {
Galerkin { Dt [ mu[] * Dof{h} , {h} ];
In Domain; Jacobian Vol; Integration Int_1; }
Galerkin { [ rho[] * Dof{Curl h} , {Curl h} ];
In DomainC; Jacobian Vol; Integration Int_1; }
}
}
}

7.8.5 Nonlinearities, Mixed formulations, . . .


In case nonlinear physical characteristics are considered, arguments are used for associated
functions, e.g., mu[{h}]. Several test functions can be considered in an Equation field.
Consequently, mixed formulations can be defined.

7.9 Resolution examples


7.9.1 Static resolution (electrostatic problem)
A static resolution, e.g., for the electrostatic formulation (see Section 7.8 [Formulation
examples], page 83), can be defined by
Resolution {
{ Name Electrostatics_v;
System {
{ Name Sys_Ele; NameOfFormulation Electrostatics_v; }
}
Operation {
Generate[Sys_Ele]; Solve[Sys_Ele]; SaveSolution[Sys_Ele];
}
}
}
The generation (Generate) of the matrix of the system Sys_Ele will be made with the for-
mulation Electrostatics_v, followed by its solving (Solve) and the saving of the solution
(SaveSolution).
86 GetDP 2.11

7.9.2 Frequency domain resolution (magnetodynamic problem)


A frequency domain resolution, e.g., for the magnetodynamic h-phi formulation (see
Section 7.8 [Formulation examples], page 83), is given by
Resolution {
{ Name Magnetodynamics_hphi;
System {
{ Name Sys_Mag; NameOfFormulation Magnetodynamics_hphi;
Frequency Freq; }
}
Operation {
Generate[Sys_Mag]; Solve[Sys_Mag]; SaveSolution[Sys_Mag];
}
}
}
preceded by the definition of constant Freq, e.g.,
Function {
Freq = 50.;
}

7.9.3 Time domain resolution (magnetodynamic problem)


A time domain resolution, e.g., for the same magnetodynamic h-phi formulation (see
Section 7.8 [Formulation examples], page 83), is given by
Resolution {
{ Name Magnetodynamics_hphi_Time;
System {
{ Name Sys_Mag; NameOfFormulation Magnetodynamics_hphi; }
}
Operation {
InitSolution[Sys_Mag]; SaveSolution[Sys_Mag];
TimeLoopTheta[Mag_Time0, Mag_TimeMax, Mag_DTime[], Mag_Theta[]] {
Generate[Sys_Mag]; Solve[Sys_Mag]; SaveSolution[Sys_Mag];
}
}
}
}
If, e.g., the Resolution above is preceded by the constant and function definitions below
Function {
Tc = 10.e-3;
Mag_Time0 = 0.; Mag_TimeMax = 2.*Tc; Mag_DTime[] = Tc/20.;
Mag_Theta[] = 1./2.;
}
the performed time domain analysis will be a Crank-Nicolson scheme (theta-scheme with
Theta = 0.5) with initial time 0 ms, end time 20 ms and time step 1 ms.
Chapter 7: Short examples 87

7.9.4 Nonlinear time domain resolution (magnetodynamic


problem)
In case a nonlinear problem is solved, an iterative loop has to be defined in an appropriate
level of the recursive resolution operations, e.g., for the magnetodynamic problem above,
...
Operation {
InitSolution[Sys_Mag]; SaveSolution[Sys_Mag];
TimeLoopTheta[Mag_Time0, Mag_TimeMax, Mag_DTime[], Mag_Theta[]] {
IterativeLoop[NL_NbrMax, NL_Eps, NL_Relax] {
GenerateJac[Sys_Mag]; SolveJac[Sys_Mag];
}
SaveSolution[Sys_Mag];
}
}
...
preceded by constant definitions, e.g.,
Function {
NL_Eps = 1.e-4; NL_Relax = 1.; NL_NbrMax = 80;
}

7.9.5 Coupled formulations


A coupled problem, e.g., magnetodynamic (in frequency domain; Frequency Freq) - ther-
mal (in time domain) coupling, with temperature dependent characteristics (e.g., rho[{T}],
. . . ), can be defined by:
Resolution {
{ Name MagnetoThermalCoupling_hphi_T;
System {
{ Name Sys_Mag; NameOfFormulation Magnetodynamics_hphi;
Frequency Freq; }
{ Name Sys_The; NameOfFormulation Thermal_T; }
}
Operation {
InitSolution[Sys_Mag]; InitSolution[Sys_The];
IterativeLoop[NL_NbrMax, NL_Eps, NL_Relax] {
GenerateJac[Sys_Mag]; SolveJac[Sys_Mag];
GenerateJac[Sys_The]; SolveJac[Sys_The];
}
SaveSolution[Sys_Mag]; SaveSolution[Sys_The];
}
}
}
Two systems of equations, Sys_Mag and Sys_The, will be solved iteratively until convergence
(Criterion), using a relaxation factor (RelaxationFactor).
It can be seen through these examples that many resolutions can be linked or nested directly
by the user, which gives a great freedom for coupled problems.
88 GetDP 2.11

7.10 PostProcessing examples


The quantities to be post-computed based on a solution of a resolution are defined,
e.g., for the electrostatic problem (see Section 7.8 [Formulation examples], page 83;
see Section 7.9 [Resolution examples], page 85), for the solution associated with the
formulation Electrostatics_v, by
PostProcessing {
{ Name EleSta_v; NameOfFormulation Electrostatics_v;
Quantity {
{ Name v; Value { Local { [ {v} ]; In Domain; } } }
{ Name e; Value { Local { [ -{Grad v} ]; In Domain; } } }
{ Name d; Value { Local { [ -eps0*epsr[] *{Grad v} ];
In Domain; } } }
}
}
}
The electric scalar potential v (v), the electric field e (e) and the electric flux density d (d)
can all be computed from the solution. They are all defined in the region Domain.
The quantities for the solution associated with the formulation Electrostatics_v_float
ing are defined by
PostProcessing {
{ Name EleSta_vf; NameOfFormulation Electrostatics_v_floating;
Quantity {

... same as above ...

{ Name Q; Value { Local { [ {Q} ]; In SkinDomainC; } } }


{ Name V; Value { Local { [ {V} ]; In SkinDomainC; } } }
}
}
}
which points out the way to define post-quantities based on global quantities.

7.11 PostOperation examples


The simplest post-processing operation is the generation of maps of local quantities, i.e.,
the display of the computed fields on the mesh. For example, using the PostProcessing
defined in Section 7.10 [PostProcessing examples], page 88, the maps of the electric scalar
potential and of the electric field on the elements of the region Domain are defined as:
PostOperation {
{ Name Map_v_e; NameOfPostProcessing EleSta_v ;
Operation {
Print [ v, OnElementsOf Domain, File "map_v.pos" ];
Print [ e, OnElementsOf Domain, File "map_e.pos" ];
}
}
Chapter 7: Short examples 89

}
It is also possible to display local quantities on sections of the mesh, here for example on
the plane containing the points (0,0,1), (1,0,1) and (0,1,1):
Print [ v, OnSection { {0,0,1} {1,0,1} {0,1,1} }, File "sec_v.pos" ];
Finally, local quantities can also be interpolated on another mesh than the one on which
they have been computed. Six types of grids can be specified for this interpolation: a single
point, a set of points evenly distributed on a line, a set of points evenly distributed on a
plane, a set of points evenly distributed in a box, a set of points defined by a parametric
equation, and a set of elements belonging to a different mesh than the original one:
Print [ e, OnPoint {0,0,1} ];
Print [ e, OnLine { {0,0,1} {1,0,1} } {125} ];
Print [ e, OnPlane { {0,0,1} {1,0,1} {0,1,1} } {125, 75} ];
Print [ e, OnBox { {0,0,1} {1,0,1} {0,1,1} {0,0,2} } {125, 75, 85} ];
Print [ e, OnGrid {$A, $B, 1} { 0:1:1/125, 0:1:1/75, 0 } ];
Print [ e, OnGrid Domain2 ];
Many options can be used to modify the aspect of all these maps, as well as the default
behaviour of the Print commands. See Section 6.10 [Types for PostOperation], page 67,
to get the list of all these options. For example, to obtain a map of the scalar potential at
the barycenters of the elements on the boundary of the region Domain, in a table oriented
format appended to an already existing file out.txt, the operation would be:
Print [ v, OnElementsOf Domain, Depth 0, Skin, Format Table,
File >> "out.txt" ];
Global quantities, which are associated with regions (and not with the elements of the mesh
of these regions), are displayed thanks to the OnRegion operation. For example, the global
potential and charge on the region SkinDomainC can be displayed with:
PostOperation {
{ Name Val_V_Q; NameOfPostProcessing EleSta_vf ;
Operation {
Print [ V, OnRegion SkinDomainC ];
Print [ Q, OnRegion SkinDomainC ];
}
}
}
Chapter 8: Complete examples 91

8 Complete examples
This chapter presents complete examples that can be run “as is” with GetDP (see Chapter 3
[Running GetDP], page 11).
Many other ready-to-use examples are available on the website of the ONELAB project:
http://onelab.info.

8.1 Electrostatic problem


Let us first consider a simple electrostatic problem. The formulation used is an electric
scalar potential formulation (file ‘EleSta_v.pro’, including files ‘Jacobian_Lib.pro’ and
‘Integration_Lib.pro’). It is applied to a microstrip line (file ‘mStrip.pro’), whose geom-
etry is defined in the file ‘mStrip.geo’ (see Appendix B [Gmsh examples], page 115). The
geometry is two-dimensional and by symmetry only one half of the structure is modeled.

Note that the structure of the following files points out the separation of the data describing
the particular problem and the method used to solve it (see Section 1.1 [Numerical tools as
objects], page 5), and therefore how it is possible to build black boxes adapted to well defined
categories of problems. The files are commented (see Section 4.1 [Comments], page 15) and
can be run without any modification.

/* -------------------------------------------------------------------
File "mStrip.pro"
92 GetDP 2.11

This file defines the problem dependent data structures for the
microstrip problem.

To compute the solution:


getdp mStrip -solve EleSta_v

To compute post-results:
getdp mStrip -pos Map
or getdp mStrip -pos Cut
------------------------------------------------------------------- */

Group {

/* Let’s start by defining the interface (i.e. elementary groups)


between the mesh file and GetDP (no mesh object is defined, so
the default mesh will be assumed to be in GMSH format and located
in "mStrip.msh") */

Air = Region[101]; Diel1 = Region[111];


Ground = Region[120]; Line = Region[121];
SurfInf = Region[130];

/* We can then define a global group (used in "EleSta_v.pro",


the file containing the function spaces and formulations) */

DomainCC_Ele = Region[{Air, Diel1}];

Function {

/* The relative permittivity (needed in the formulation) is piecewise


defined in elementary groups */

epsr[Air] = 1.;
epsr[Diel1] = 9.8;

Constraint {

/* Now, some Dirichlet conditions are defined. The name


’ElectricScalarPotential’ refers to the constraint name given in
the function space */

{ Name ElectricScalarPotential; Type Assign;


Case {
Chapter 8: Complete examples 93

{ Region Region[{Ground, SurfInf}]; Value 0.; }


{ Region Line; Value 1.e-3; }
}
}

/* The formulation used and its tools, considered as being


in a black box, can now be included */

Include "Jacobian_Lib.pro"
Include "Integration_Lib.pro"
Include "EleSta_v.pro"

/* Finally, we can define some operations to output results */

e = 1.e-7;

PostOperation {
{ Name Map; NameOfPostProcessing EleSta_v;
Operation {
Print [ v, OnElementsOf DomainCC_Ele, File "mStrip_v.pos" ];
Print [ e, OnElementsOf DomainCC_Ele, File "mStrip_e.pos" ];
}
}
{ Name Cut; NameOfPostProcessing EleSta_v;
Operation {
Print [ e, OnLine {{e,e,0}{10.e-3,e,0}} {500}, File "Cut_e" ];
}
}

/* -------------------------------------------------------------------
File "EleSta_v.pro"

Electrostatics - Electric scalar potential v formulation


-------------------------------------------------------------------

I N P U T
---------

Global Groups : (Extension ’_Ele’ is for Electric problem)


-------------
Domain_Ele Whole electric domain (not used)
DomainCC_Ele Nonconducting regions
DomainC_Ele Conducting regions (not used)
94 GetDP 2.11

Function :
--------
epsr[] Relative permittivity

Constraint :
----------
ElectricScalarPotential Fixed electric scalar potential
(classical boundary condition)

Physical constants :
------------------ */

eps0 = 8.854187818e-12;

Group {
DefineGroup[ Domain_Ele, DomainCC_Ele, DomainC_Ele ];
}

Function {
DefineFunction[ epsr ];
}

FunctionSpace {
{ Name Hgrad_v_Ele; Type Form0;
BasisFunction {
// v = v s , for all nodes
// n n
{ Name sn; NameOfCoef vn; Function BF_Node;
Support DomainCC_Ele; Entity NodesOf[ All ]; }
}
Constraint {
{ NameOfCoef vn; EntityType NodesOf;
NameOfConstraint ElectricScalarPotential; }
}
}
}

Formulation {
{ Name Electrostatics_v; Type FemEquation;
Quantity {
{ Name v; Type Local; NameOfSpace Hgrad_v_Ele; }
}
Equation {
Galerkin { [ epsr[] * Dof{d v} , {d v} ]; In DomainCC_Ele;
Jacobian Vol; Integration GradGrad; }
Chapter 8: Complete examples 95

}
}
}

Resolution {
{ Name EleSta_v;
System {
{ Name Sys_Ele; NameOfFormulation Electrostatics_v; }
}
Operation {
Generate[Sys_Ele]; Solve[Sys_Ele]; SaveSolution[Sys_Ele];
}
}
}

PostProcessing {
{ Name EleSta_v; NameOfFormulation Electrostatics_v;
Quantity {
{ Name v;
Value {
Local { [ {v} ]; In DomainCC_Ele; Jacobian Vol; }
}
}
{ Name e;
Value {
Local { [ -{d v} ]; In DomainCC_Ele; Jacobian Vol; }
}
}
{ Name d;
Value {
Local { [ -eps0*epsr[] * {d v} ]; In DomainCC_Ele;
Jacobian Vol; }
}
}
}
}
}

/* -------------------------------------------------------------------
File "Jacobian_Lib.pro"

Definition of a jacobian method


-------------------------------------------------------------------

I N P U T
96 GetDP 2.11

---------

GlobalGroup :
-----------
DomainInf Regions with Spherical Shell Transformation

Parameters :
----------
Val_Rint, Val_Rext Inner and outer radius of the Spherical Shell
of DomainInf
*/

Group {
DefineGroup[ DomainInf ] ;
DefineVariable[ Val_Rint, Val_Rext ] ;
}

Jacobian {
{ Name Vol ;
Case { { Region DomainInf ;
Jacobian VolSphShell {Val_Rint, Val_Rext} ; }
{ Region All ; Jacobian Vol ; }
}
}
}

/* -------------------------------------------------------------------
File "Integration_Lib.pro"

Definition of integration methods


------------------------------------------------------------------- */

Integration {
{ Name GradGrad ;
Case { {Type Gauss ;
Case { { GeoElement Triangle ; NumberOfPoints 4 ; }
{ GeoElement Quadrangle ; NumberOfPoints 4 ; }
{ GeoElement Tetrahedron ; NumberOfPoints 4 ; }
{ GeoElement Hexahedron ; NumberOfPoints 6 ; }
{ GeoElement Prism ; NumberOfPoints 9 ; } }
}
}
}
{ Name CurlCurl ;
Case { {Type Gauss ;
Case { { GeoElement Triangle ; NumberOfPoints 4 ; }
{ GeoElement Quadrangle ; NumberOfPoints 4 ; }
Chapter 8: Complete examples 97

{ GeoElement Tetrahedron ; NumberOfPoints 4 ; }


{ GeoElement Hexahedron ; NumberOfPoints 6 ; }
{ GeoElement Prism ; NumberOfPoints 9 ; } }
}
}
}
}
98 GetDP 2.11

8.2 Magnetostatic problem


We now consider a magnetostatic problem. The formulation used is a 2D magnetic vector
potential formulation (see file ‘MagSta_a_2D.pro’). It is applied to a core-inductor system
(file ‘CoreSta.pro’), whose geometry is defined in theh file ‘Core.geo’ (see Appendix B
[Gmsh examples], page 115). The geometry is two-dimensional and, by symmetry, one
fourth of the structure is modeled.

The jacobian and integration methods used are the same as for the electrostatic problem
presented in Section 8.1 [Electrostatic problem], page 91.

/* -------------------------------------------------------------------
File "CoreSta.pro"

This file defines the problem dependent data structures for the
static core-inductor problem.

To compute the solution:


getdp CoreSta -msh Core.msh -solve MagSta_a_2D

To compute post-results:
getdp CoreSta -msh Core.msh -pos Map_a
------------------------------------------------------------------- */

Group {
Chapter 8: Complete examples 99

Air = Region[ 101 ]; Core = Region[ 102 ];


Ind = Region[ 103 ]; AirInf = Region[ 111 ];

SurfaceGh0 = Region[ 1100 ]; SurfaceGe0 = Region[ 1101 ];


SurfaceGInf = Region[ 1102 ];

Val_Rint = 200.e-3;
Val_Rext = 250.e-3;

DomainCC_Mag = Region[ {Air, AirInf, Core, Ind} ];


DomainC_Mag = Region[ {} ];
DomainS_Mag = Region[ {Ind} ]; // Stranded inductor
DomainInf = Region[ {AirInf} ];
Domain_Mag = Region[ {DomainCC_Mag, DomainC_Mag} ];

Function {

mu0 = 4.e-7 * Pi;


murCore = 100.;

nu [ Region[{Air, Ind, AirInf}] ] = 1. / mu0;


nu [ Core ] = 1. / (murCore * mu0);

Sc[ Ind ] = 2.5e-2 * 5.e-2;

Constraint {

{ Name MagneticVectorPotential_2D;
Case {
{ Region SurfaceGe0 ; Value 0.; }
{ Region SurfaceGInf; Value 0.; }
}
}

Val_I_1_ = 0.01 * 1000.;

{ Name SourceCurrentDensityZ;
Case {
{ Region Ind; Value Val_I_1_/Sc[]; }
}
}
100 GetDP 2.11

Include "Jacobian_Lib.pro"
Include "Integration_Lib.pro"
Include "MagSta_a_2D.pro"

e = 1.e-5;
p1 = {e,e,0};
p2 = {0.12,e,0};

PostOperation {

{ Name Map_a; NameOfPostProcessing MagSta_a_2D;


Operation {
Print[ az, OnElementsOf Domain_Mag, File "CoreSta_a.pos" ];
Print[ b, OnLine{{List[p1]}{List[p2]}} {1000}, File "k_a" ];
}
}

/* -------------------------------------------------------------------
File "MagSta_a_2D.pro"

Magnetostatics - Magnetic vector potential a formulation (2D)


-------------------------------------------------------------------

I N P U T
---------

GlobalGroup : (Extension ’_Mag’ is for Magnetic problem)


-----------
Domain_Mag Whole magnetic domain
DomainS_Mag Inductor regions (Source)

Function :
--------
nu[] Magnetic reluctivity

Constraint :
----------
MagneticVectorPotential_2D
Fixed magnetic vector potential (2D)
(classical boundary condition)
SourceCurrentDensityZ Fixed source current density (in Z direction)
*/
Chapter 8: Complete examples 101

Group {
DefineGroup[ Domain_Mag, DomainS_Mag ];
}

Function {
DefineFunction[ nu ];
}

FunctionSpace {

// Magnetic vector potential a (b = curl a)


{ Name Hcurl_a_Mag_2D; Type Form1P;
BasisFunction {
// a = a s
// e e
{ Name se; NameOfCoef ae; Function BF_PerpendicularEdge;
Support Domain_Mag; Entity NodesOf[ All ]; }
}
Constraint {
{ NameOfCoef ae; EntityType NodesOf;
NameOfConstraint MagneticVectorPotential_2D; }
}
}

// Source current density js (fully fixed space)


{ Name Hregion_j_Mag_2D; Type Vector;
BasisFunction {
{ Name sr; NameOfCoef jsr; Function BF_RegionZ;
Support DomainS_Mag; Entity DomainS_Mag; }
}
Constraint {
{ NameOfCoef jsr; EntityType Region;
NameOfConstraint SourceCurrentDensityZ; }
}
}

Formulation {
{ Name Magnetostatics_a_2D; Type FemEquation;
Quantity {
{ Name a ; Type Local; NameOfSpace Hcurl_a_Mag_2D; }
{ Name js; Type Local; NameOfSpace Hregion_j_Mag_2D; }
}
Equation {
Galerkin { [ nu[] * Dof{d a} , {d a} ]; In Domain_Mag;
Jacobian Vol; Integration CurlCurl; }
102 GetDP 2.11

Galerkin { [ - Dof{js} , {a} ]; In DomainS_Mag;


Jacobian Vol; Integration CurlCurl; }
}
}
}

Resolution {
{ Name MagSta_a_2D;
System {
{ Name Sys_Mag; NameOfFormulation Magnetostatics_a_2D; }
}
Operation {
Generate[Sys_Mag]; Solve[Sys_Mag]; SaveSolution[Sys_Mag];
}
}
}

PostProcessing {
{ Name MagSta_a_2D; NameOfFormulation Magnetostatics_a_2D;
Quantity {
{ Name a;
Value {
Local { [ {a} ]; In Domain_Mag; Jacobian Vol; }
}
}
{ Name az;
Value {
Local { [ CompZ[{a}] ]; In Domain_Mag; Jacobian Vol; }
}
}
{ Name b;
Value {
Local { [ {d a} ]; In Domain_Mag; Jacobian Vol; }
}
}
{ Name h;
Value {
Local { [ nu[] * {d a} ]; In Domain_Mag; Jacobian Vol; }
}
}
}
}
}
Chapter 8: Complete examples 103

8.3 Magnetodynamic problem


As a third example we consider a magnetodynamic problem. The formulation is a two-
dimensional a-v formulation (see file ‘MagDyn_av_2D.pro’, which includes the same jacobian
and integration library files as in Section 8.1 [Electrostatic problem], page 91). It is applied
to a core-inductor system (defined in file ‘CoreMassive.pro’), whose geometry has already
been defined in file ‘Core.geo’.

/* -------------------------------------------------------------------
File "CoreMassive.pro"

This file defines the problem dependent data structures for the
dynamic core-inductor problem.

To compute the solution:


getdp CoreMassive -msh Core.msh -solve MagDyn_av_2D

To compute post-results:
getdp CoreMassive -msh Core.msh -pos Map_a
getdp CoreMassive -msh Core.msh -pos U_av
------------------------------------------------------------------- */

Group {

Air = Region[ 101 ]; Core = Region[ 102 ];


Ind = Region[ 103 ]; AirInf = Region[ 111 ];

SurfaceGh0 = Region[ 1100 ]; SurfaceGe0 = Region[ 1101 ];


SurfaceGInf = Region[ 1102 ];

Val_Rint = 200.e-3;
Val_Rext = 250.e-3;

DomainCC_Mag = Region[ {Air, AirInf} ];


DomainC_Mag = Region[ {Ind, Core} ]; // Massive inductor + conducting core
DomainB_Mag = Region[ {} ];
DomainS_Mag = Region[ {} ];
DomainInf = Region[ {AirInf} ];
Domain_Mag = Region[ {DomainCC_Mag, DomainC_Mag} ];

Function {

mu0 = 4.e-7 * Pi;

murCore = 100.;
104 GetDP 2.11

nu [ #{Air, Ind, AirInf} ] = 1. / mu0;


nu [ Core ] = 1. / (murCore * mu0);
sigma [ Ind ] = 5.9e7;
sigma [ Core ] = 2.5e7;

Freq = 1.;

Constraint {

{ Name MagneticVectorPotential_2D;
Case {
{ Region SurfaceGe0 ; Value 0.; }
{ Region SurfaceGInf; Value 0.; }
}
}

{ Name SourceCurrentDensityZ;
Case {
}
}

Val_I_ = 0.01 * 1000.;

{ Name Current_2D;
Case {
{ Region Ind; Value Val_I_; }
}
}

{ Name Voltage_2D;
Case {
{ Region Core; Value 0.; }
}
}

Include "Jacobian_Lib.pro"
Include "Integration_Lib.pro"
Include "MagDyn_av_2D.pro"

PostOperation {
{ Name Map_a; NameOfPostProcessing MagDyn_av_2D;
Operation {
Chapter 8: Complete examples 105

Print[ az, OnElementsOf Domain_Mag, File "Core_m_a.pos" ];


Print[ j, OnElementsOf Domain_Mag, File "Core_m_j.pos" ];
}
}
{ Name U_av; NameOfPostProcessing MagDyn_av_2D;
Operation {
Print[ U, OnRegion Ind ];
Print[ I, OnRegion Ind ];
}
}
}

/* -------------------------------------------------------------------
File "MagDyn_av_2D.pro"

Magnetodynamics - Magnetic vector potential and electric scalar


potential a-v formulation (2D)
-------------------------------------------------------------------

I N P U T
---------

GlobalGroup : (Extension ’_Mag’ is for Magnetic problem)


-----------
Domain_Mag Whole magnetic domain
DomainCC_Mag Nonconducting regions (not used)
DomainC_Mag Conducting regions
DomainS_Mag Inductor regions (Source)
DomainV_Mag All regions in movement (for speed term)

Function :
--------
nu[] Magnetic reluctivity
sigma[] Electric conductivity

Velocity[] Velocity of regions

Constraint :
----------
MagneticVectorPotential_2D
Fixed magnetic vector potential (2D)
(classical boundary condition)
SourceCurrentDensityZ Fixed source current density (in Z direction)

Voltage_2D Fixed voltage


Current_2D Fixed Current
106 GetDP 2.11

Parameters :
----------

Freq Frequency (Hz)

Parameters for time loop with theta scheme :


Mag_Time0, Mag_TimeMax, Mag_DTime
Initial time, Maximum time, Time step (s)
Mag_Theta Theta (e.g. 1. : Implicit Euler,
0.5 : Cranck Nicholson)
*/

Group {
DefineGroup[ Domain_Mag, DomainCC_Mag, DomainC_Mag,
DomainS_Mag, DomainV_Mag ];
}

Function {
DefineFunction[ nu, sigma ];
DefineFunction[ Velocity ];
DefineVariable[ Freq ];
DefineVariable[ Mag_Time0, Mag_TimeMax, Mag_DTime, Mag_Theta ];
}

FunctionSpace {

// Magnetic vector potential a (b = curl a)


{ Name Hcurl_a_Mag_2D; Type Form1P;
BasisFunction {
// a = a s
// e e
{ Name se; NameOfCoef ae; Function BF_PerpendicularEdge;
Support Domain_Mag; Entity NodesOf[ All ]; }
}
Constraint {
{ NameOfCoef ae; EntityType NodesOf;
NameOfConstraint MagneticVectorPotential_2D; }
}
}

// Gradient of Electric scalar potential (2D)


{ Name Hregion_u_Mag_2D; Type Form1P;
BasisFunction {
{ Name sr; NameOfCoef ur; Function BF_RegionZ;
Support DomainC_Mag; Entity DomainC_Mag; }
}
GlobalQuantity {
Chapter 8: Complete examples 107

{ Name U; Type AliasOf ; NameOfCoef ur; }


{ Name I; Type AssociatedWith; NameOfCoef ur; }
}
Constraint {
{ NameOfCoef U; EntityType Region;
NameOfConstraint Voltage_2D; }
{ NameOfCoef I; EntityType Region;
NameOfConstraint Current_2D; }
}
}

// Source current density js (fully fixed space)


{ Name Hregion_j_Mag_2D; Type Vector;
BasisFunction {
{ Name sr; NameOfCoef jsr; Function BF_RegionZ;
Support DomainS_Mag; Entity DomainS_Mag; }
}
Constraint {
{ NameOfCoef jsr; EntityType Region;
NameOfConstraint SourceCurrentDensityZ; }
}
}

Formulation {
{ Name Magnetodynamics_av_2D; Type FemEquation;
Quantity {
{ Name a ; Type Local ; NameOfSpace Hcurl_a_Mag_2D; }
{ Name ur; Type Local ; NameOfSpace Hregion_u_Mag_2D; }
{ Name I ; Type Global; NameOfSpace Hregion_u_Mag_2D [I]; }
{ Name U ; Type Global; NameOfSpace Hregion_u_Mag_2D [U]; }
{ Name js; Type Local ; NameOfSpace Hregion_j_Mag_2D; }
}
Equation {
Galerkin { [ nu[] * Dof{d a} , {d a} ]; In Domain_Mag;
Jacobian Vol; Integration CurlCurl; }

Galerkin { DtDof [ sigma[] * Dof{a} , {a} ]; In DomainC_Mag;


Jacobian Vol; Integration CurlCurl; }
Galerkin { [ sigma[] * Dof{ur} , {a} ]; In DomainC_Mag;
Jacobian Vol; Integration CurlCurl; }

Galerkin { [ - sigma[] * (Velocity[] *^ Dof{d a}) , {a} ];


In DomainV_Mag;
Jacobian Vol; Integration CurlCurl; }
108 GetDP 2.11

Galerkin { [ - Dof{js} , {a} ]; In DomainS_Mag;


Jacobian Vol;
Integration CurlCurl; }

Galerkin { DtDof [ sigma[] * Dof{a} , {ur} ]; In DomainC_Mag;


Jacobian Vol; Integration CurlCurl; }
Galerkin { [ sigma[] * Dof{ur} , {ur} ]; In DomainC_Mag;
Jacobian Vol; Integration CurlCurl; }
GlobalTerm { [ Dof{I} , {U} ]; In DomainC_Mag; }
}
}
}

Resolution {
{ Name MagDyn_av_2D;
System {
{ Name Sys_Mag; NameOfFormulation Magnetodynamics_av_2D;
Type ComplexValue; Frequency Freq; }
}
Operation {
Generate[Sys_Mag]; Solve[Sys_Mag]; SaveSolution[Sys_Mag];
}
}

{ Name MagDyn_t_av_2D;
System {
{ Name Sys_Mag; NameOfFormulation Magnetodynamics_av_2D; }
}
Operation {
InitSolution[Sys_Mag]; SaveSolution[Sys_Mag];
TimeLoopTheta[Mag_Time0, Mag_TimeMax, Mag_DTime, Mag_Theta] {
Generate[Sys_Mag]; Solve[Sys_Mag]; SaveSolution[Sys_Mag];
}
}
}

PostProcessing {
{ Name MagDyn_av_2D; NameOfFormulation Magnetodynamics_av_2D;
Quantity {
{ Name a;
Value {
Local { [ {a} ]; In Domain_Mag; Jacobian Vol; }
Chapter 8: Complete examples 109

}
}
{ Name az;
Value {
Local { [ CompZ[{a}] ]; In Domain_Mag; Jacobian Vol; }
}
}
{ Name b;
Value {
Local { [ {d a} ]; In Domain_Mag; Jacobian Vol; }
}
}
{ Name h;
Value {
Local { [ nu[] * {d a} ]; In Domain_Mag; Jacobian Vol; }
}
}
{ Name j;
Value {
Local { [ - sigma[]*(Dt[{a}]+{ur}) ]; In DomainC_Mag;
Jacobian Vol; }
}
}
{ Name jz;
Value {
Local { [ - sigma[]*CompZ[Dt[{a}]+{ur}] ]; In DomainC_Mag;
Jacobian Vol; }
}
}
{ Name roj2;
Value {
Local { [ sigma[]*SquNorm[Dt[{a}]+{ur}] ]; In DomainC_Mag;
Jacobian Vol; }
}
}
{ Name U; Value { Local { [ {U} ]; In DomainC_Mag; } } }
{ Name I; Value { Local { [ {I} ]; In DomainC_Mag; } } }
}
}
}
Appendix A: File formats 111

Appendix A File formats

This chapter describes the file formats that cannot be modified by the user. The for-
mat of the problem definition structure is explained in Chapter 5 [Objects], page 29, and
Chapter 6 [Types for objects], page 43. The format of the post-processing files is explained
in Section 6.10 [Types for PostOperation], page 67.

A.1 Input file format


The native mesh format read by GetDP is the mesh file format produced by Gmsh
(http://gmsh.info). In its “version 1” incarnation, an ‘msh’ file is divided into two
sections, defining the nodes and the elements in the mesh.
$NOD
number-of-nodes
node-number x-coord y-coord z-coord
...
$ENDNOD
$ELM
number-of-elements
elm-number elm-type elm-region unused number-of-nodes node-numbers
...
$ENDELM
All the syntactic variables stand for integers except x-coord, y-coord and z-coord which
stand for floating point values. The elm-type value defines the geometrical type for the
element:
elm-type:

1 Line (2 nodes, 1 edge).

2 Triangle (3 nodes, 3 edges).

3 Quadrangle (4 nodes, 4 edges).

4 Tetrahedron (4 nodes, 6 edges, 4 facets).

5 Hexahedron (8 nodes, 12 edges, 6 facets).

6 Prism (6 nodes, 9 edges, 5 facets).

7 Pyramid (5 nodes, 8 edges, 5 facets).

15 Point (1 node).

GetDP can also read more recent versions of the ‘msh’ format (2.0 and above), as well as
binary meshes. See the Gmsh documentation for more information about these formats.

A.2 Output file format


112 GetDP 2.11

A.2.1 File ‘.pre’


The ‘.pre’ file is generated by the pre-processing stage. It contains all the information about
the degrees of freedom to be considered during the processing stage for a given resolution
(i.e., unknowns, fixed values, initial values, etc.).
$Resolution /* ’resolution-id ’ */
main-resolution-number number-of-dofdata
$EndResolution
$DofData /* #dofdata-number */
resolution-number system-number
number-of-function-spaces function-space-number ...
number-of-time-functions time-function-number ...
number-of-partitions partition-index ...
number-of-any-dof number-of-dof
dof-basis-function-number dof-entity dof-harmonic dof-type dof-data
...
$EndDofData
...
with
dof-data :
equation-number nnz
(dof-type : 1; unknown ) |
dof-value dof-time-function-number
(dof-type : 2; fixed value ) |
dof-associate-dof-number dof-value dof-time-function-number
(dof-type : 3; associated degree of freedom ) |
equation-number dof-value
(dof-type : 5; initial value for an unknown )

Notes:
1. There is one $DofData field for each system of equations considered in the resolution
(including those considered in pre-resolutions).
2. The dofdata-number of a $DofData field is determined by the order of this field in the
‘.pre’ file.
3. number-of-dof is the dimension of the considered system of equations, while number-of-
any-dof is the total number of degrees of freedom before the application of constraints.
4. Each degree of freedom is coded with three integer values, which are the associated basis
function, entity and harmonic numbers, i.e., dof-basis-function-number, dof-entity and
dof-harmonic.
5. nnz is not used at the moment.

A.2.2 File ‘.res’


The ‘.res’ file is generated by the processing stage. It contains the solution of the problem
(or a part of it in case of program interruption).
$ResFormat /* GetDP vgetdp-version-number, string-for-format */
Appendix A: File formats 113

1.1 file-res-format
$EndResFormat
$Solution /* DofData #dofdata-number */
dofdata-number time-value time-imag-value time-step-number
solution-value
...
$EndSolution
...
Notes:
1. A $Solution field contains the solution associated with a $DofData field.
2. There is one $Solution field for each time step, of which the time is time-value (0 for
non time dependent or non modal analyses) and the imaginary time is time-imag-value
(0 for non time dependent or non modal analyses).
3. The order of the solution-values in a $Solution field follows the numbering of the
equations given in the ‘.pre’ file (one floating point value for each degree of freedom).
Appendix B: Gmsh examples 115

Appendix B Gmsh examples


Gmsh is a three-dimensional finite element mesh generator with simple CAD and post-
processing capabilities that can be used as a graphical front-end for GetDP. Gmsh can be
downloaded from http://gmsh.info.
This appendix reproduces verbatim the input files needed by Gmsh to produce the mesh
files ‘mStrip.msh’ and ‘Core.msh’ used in the examples of Chapter 8 [Complete examples],
page 91.

/* -------------------------------------------------------------------
File "mStrip.geo"

This file is the geometrical description used by GMSH to produce


the file "mStrip.msh".
------------------------------------------------------------------- */

/* Definition of some parameters for geometrical dimensions, i.e.


h (height of ’Diel1’), w (width of ’Line’), t (thickness of ’Line’)
xBox (width of the air box) and yBox (height of the air box) */

h = 1.e-3 ; w = 4.72e-3 ; t = 0.035e-3 ;


xBox = w/2. * 6. ; yBox = h * 12. ;

/* Definition of parameters for local mesh dimensions */

s = 1. ;
p0 = h / 10. * s ;
pLine0 = w/2. / 10. * s ; pLine1 = w/2. / 50. * s ;
pxBox = xBox / 10. * s ; pyBox = yBox / 8. * s ;

/* Definition of gemetrical points */

Point(1) = { 0 , 0, 0, p0} ;
Point(2) = { xBox, 0, 0, pxBox} ;
Point(3) = { xBox, h, 0, pxBox} ;
Point(4) = { 0 , h, 0, pLine0} ;
Point(5) = { w/2., h, 0, pLine1} ;
Point(6) = { 0 , h+t, 0, pLine0} ;
Point(7) = { w/2., h+t, 0, pLine1} ;
Point(8) = { 0 , yBox, 0, pyBox} ;
Point(9) = { xBox, yBox, 0, pyBox} ;

/* Definition of gemetrical lines */

Line(1) = {1,2}; Line(2) = {2,3}; Line(3) = {3,9};


Line(4) = {9,8}; Line(5) = {8,6}; Line(7) = {4,1};
Line(8) = {5,3}; Line(9) = {4,5}; Line(10) = {6,7};
116 GetDP 2.11

Line(11) = {5,7};

/* Definition of geometrical surfaces */

Line Loop(12) = {8,-2,-1,-7,9}; Plane Surface(13) = {12};


Line Loop(14) = {10,-11,8,3,4,5}; Plane Surface(15) = {14};

/* Definition of Physical entities (surfaces, lines). The Physical


entities tell GMSH the elements and their associated region numbers
to save in the file ’mStrip.msh’. For example, the Region
111 is made of elements of surface 13, while the Region 121 is
made of elements of lines 9, 10 and 11 */

Physical Surface (101) = {15} ; /* Air */


Physical Surface (111) = {13} ; /* Diel1 */

Physical Line (120) = {1} ; /* Ground */


Physical Line (121) = {9,10,11} ; /* Line */
Physical Line (130) = {2,3,4} ; /* SurfInf */

/* -------------------------------------------------------------------
File "Core.geo"

This file is the geometrical description used by GMSH to produce


the file "Core.msh".
------------------------------------------------------------------- */

dxCore = 50.e-3; dyCore = 100.e-3;


xInd = 75.e-3; dxInd = 25.e-3; dyInd = 50.e-3;
rInt = 200.e-3; rExt = 250.e-3;

s = 1.;
p0 = 12.e-3 *s;
pCorex = 4.e-3 *s; pCorey0 = 8.e-3 *s; pCorey = 4.e-3 *s;
pIndx = 5.e-3 *s; pIndy = 5.e-3 *s;
pInt = 12.5e-3*s; pExt = 12.5e-3*s;

Point(1) = {0,0,0,p0};
Point(2) = {dxCore,0,0,pCorex};
Point(3) = {dxCore,dyCore,0,pCorey};
Point(4) = {0,dyCore,0,pCorey0};
Point(5) = {xInd,0,0,pIndx};
Point(6) = {xInd+dxInd,0,0,pIndx};
Point(7) = {xInd+dxInd,dyInd,0,pIndy};
Point(8) = {xInd,dyInd,0,pIndy};
Point(9) = {rInt,0,0,pInt};
Point(10) = {rExt,0,0,pExt};
Appendix B: Gmsh examples 117

Point(11) = {0,rInt,0,pInt};
Point(12) = {0,rExt,0,pExt};

Line(1) = {1,2}; Line(2) = {2,5}; Line(3) = {5,6};


Line(4) = {6,9}; Line(5) = {9,10}; Line(6) = {1,4};
Line(7) = {4,11}; Line(8) = {11,12}; Line(9) = {2,3};
Line(10) = {3,4}; Line(11) = {6,7}; Line(12) = {7,8};
Line(13) = {8,5};

Circle(14) = {9,1,11}; Circle(15) = {10,1,12};

Line Loop(16) = {-6,1,9,10}; Plane Surface(17) = {16};


Line Loop(18) = {11,12,13,3}; Plane Surface(19) = {18};
Line Loop(20) = {7,-14,-4,11,12,13,-2,9,10}; Plane Surface(21) = {20};
Line Loop(22) = {8,-15,-5,14}; Plane Surface(23) = {22};

Physical Surface(101) = {21}; /* Air */


Physical Surface(102) = {17}; /* Core */
Physical Surface(103) = {19}; /* Ind */
Physical Surface(111) = {23}; /* AirInf */

Physical Line(1000) = {1,2}; /* Cut */


Physical Line(1001) = {2}; /* CutAir */
Physical Line(202) = {9,10}; /* SkinCore */
Physical Line(203) = {11,12,13}; /* SkinInd */
Physical Line(1100) = {1,2,3,4,5}; /* SurfaceGh0 */
Physical Line(1101) = {6,7,8}; /* SurfaceGe0 */
Physical Line(1102) = {15}; /* SurfaceGInf */
Appendix C: Compiling the source code 119

Appendix C Compiling the source code


Stable releases and source snapshots are available from http://getdp.info/src/. You can
also access the Git repository directly:
1. The first time you want to download the latest full source, type:
git clone http://gitlab.onelab.info/getdp/getdp.git
2. To update your local version to the latest and greatest, go in the getdp directory and
type:
git pull
Once you have the source code, you need to run CMake to configure your build (see the
README.txt file in the top-level source directory for detailed information on how to run
CMake).
Each build can be configured using a series of options, to selectively enable optional modules
or features. Here is the list of CMake options:
ENABLE_ARPACK
Enable Arpack eigensolver (requires Fortran) (default: ON)
ENABLE_CONTRIB_ARPACK
Enable Arpack eigensolver from GetDP’s contrib folder (requires Fortran) (de-
fault: OFF)
ENABLE_BLAS_LAPACK
Enable BLAS/Lapack for linear algebra (e.g. for Arpack) (default: ON)
ENABLE_BUILD_LIB
Enable ’lib’ target for building static GetDP library (default: OFF)
ENABLE_BUILD_SHARED
Enable ’shared’ target for building shared GetDP library (default: OFF)
ENABLE_BUILD_DYNAMIC
Enable dynamic GetDP executable (linked with shared lib) (default: OFF)
ENABLE_BUILD_ANDROID
Enable Android NDK library target (experimental) (default: OFF)
ENABLE_BUILD_IOS
Enable iOS (ARM) library target (experimental) (default: OFF)
ENABLE_FORTRAN
Enable Fortran (needed for Arpack/Sparskit/Zitsol & Bessel) (default: ON)
ENABLE_GMSH
Enable Gmsh functions (for field interpolation) (default: ON)
ENABLE_GSL
Enable GSL functions (for some built-in functions) (default: ON)
ENABLE_LEGACY
Use legacy assembler (required for actual computations) (default: ON)
120 GetDP 2.11

ENABLE_MPI
Enable MPI parallelization (with PETSc/SLEPc) (default: OFF)
ENABLE_MULTIHARMONIC
Enable multi-harmonic support (default: OFF)
ENABLE_NR
Enable NR functions (if GSL is unavailable) (default: ON)
ENABLE_NX
Enable proprietary NX extension (default: OFF)
ENABLE_OCTAVE
Enable Octave functions (default: ON)
ENABLE_OPENMP
Enable OpenMP parallelization of some functions (experimental) (default:
OFF)
ENABLE_PETSC
Enable PETSc linear solver (default: ON)
ENABLE_PYTHON
Enable Python functions (default: ON)
ENABLE_SLEPC
Enable SLEPc eigensolver (default: ON)
ENABLE_SMALLFEM
Enable experimental SmallFem assembler (default: OFF)
ENABLE_SPARSKIT
Enable Sparskit solver instead of PETSc (requires Fortran) (default: ON)
ENABLE_WRAP_PYTHON
Build Python wrappers (default: OFF)
ENABLE_ZITSOL
Enable Zitsol solvers (requires PETSc and Fortran) (default: OFF)
Appendix D: Frequently asked questions 121

Appendix D Frequently asked questions

D.1 The basics


1. What is GetDP?
GetDP is a scientific software environment for the numerical solution of integro-
differential equations, open to the coupling of physical problems (electromagnetic,
thermal, mechanical, etc) as well as of numerical methods (finite element method,
integral methods, etc). It can deal with such problems of various dimensions (1D, 2D,
2D axisymmetric or 3D) and time states (static, transient or harmonic). The main
feature of GetDP is the closeness between the organization of data defining discrete
problems (written by the user in ASCII data files) and the symbolic mathematical
expressions of these problems.
2. What are the terms and conditions of use?
GetDP is distributed under the terms of the GNU General Public License. See
Appendix H [License], page 133 for more information.
3. What does ‘GetDP’ mean?
It’s an acronym for a “General environment for the treatment of Discrete Problems”.
4. Where can I find more information?
http://getdp.info is the primary site to obtain information about GetDP. You will
find a short presentation, a complete reference guide as well as a searchable archive of
the GetDP mailing list (getdp@onelab.info) on this site.

D.2 Installation
1. Which OSes does GetDP run on?
Gmsh runs on Windows, MacOS X, Linux and most Unix variants.
2. What do I need to compile GetDP from the sources?
You need a C++ and a Fortran compiler as well as the GSL (version 1.2 or higher; freely
available from http://sources.redhat.com/gsl).
3. How do I compile GetDP?
You need cmake (http://www.cmake.org) and a C++ compiler (and a Fortran compiler
depending on the modules/solvers you want to compile). See Appendix C [Compiling
the source code], page 119 and the README.txt file in the top-level source directory
for more information.
4. GetDP [from a binary distribution] complains about missing libraries.
Try ldd getdp (or otool -L getdp on MacOS X) to check if all the required shared
libraries are installed on your system. If not, install them. If it still doesn’t work,
recompile GetDP from the sources.

D.3 Usage
1. How can I provide a mesh to GetDP?
The only meshing format accepted by this version of GetDP is the ‘msh’ format created
by Gmsh http://gmsh.info. This format being very simple (see the Gmsh reference
122 GetDP 2.11

manual for more details), it should be straightforward to write a converter from your
mesh format to the ‘msh’ format.
2. How can I visualize the results produced by GetDP?
You can specify a format in all post-processing operations. Available formats include
Table, SimpleTable, TimeTable and Gmsh. Table, SimpleTable and TimeTable out-
put lists of numbers easily readable by Excel/gnuplot/Caleida Graph/etc. Gmsh outputs
post-processing views directly loadable by Gmsh.
3. How do I change the linear solver used by GetDP?
It depends on which linear solver toolkit was enabled when GetDP was compiled
(PETSc or Sparskit).
With PETSc-based linear solvers you can either specify options directly on the com-
mand line (e.g. with -ksp_type gmres -pc_type ilu), through a specific option file
(with -solver file), or through the ‘.petscrc’ file located in your home directly.
With Sparskit-based linear solvers can either specify options directly on command line
(e.g. with -Nb_Fill 200), specify an option file explicitly (with -solver file), or edit
the ‘solver.par’ file in the current working directory. If no ‘solver.par’ file exists
in the current directory, GetDP will give create it the next time you perform a linear
system solution.
Appendix E: Tips and tricks 123

Appendix E Tips and tricks


• Install the ’info’ version of this user’s guide! On your (Unix) system, this can be
achieved by 1) copying all getdp.info* files to the place where your info files live (usually
/usr/info), and 2) issuing the command ’install-info /usr/info/getdp.info /usr/info/dir’.
You will then be able to access the documentation with the command ’info getdp’. Note
that particular sections ("nodes") can be accessed directly. For example, ’info getdp
functionspace’ will take you directly to the definition of the FunctionSpace object.
• Use emacs to edit your files, and load the C++ mode! This permits automatic syntax
highlighting and easy indentation. Automatic loading of the C++ mode for ‘.pro’ files
can be achieved by adding the following command in your .emacs file: (setq auto-
mode-alist (append ’(("\\.pro$" . c++-mode)) auto-mode-alist)).
• Define integration and Jacobian method in separate files, reusable in all your prob-
lem definition structures (see Section 4.2 [Includes], page 15). Define meshes, groups,
functions and constraints in one file dependent of the geometrical model, and func-
tion spaces, formulations, resolutions and post-processings in files independent of the
geometrical model.
• Use All as soon as possible in the definition of topological entities used as Entity
of BasisFunctions. This will prevent GetDP from constructing unnecessary lists of
entities.
• Intentionally misspelling an object type in the problem definition structure will produce
an error message listing all available types in the particular context.
• If you don’t specify the mandatory arguments on the command line, GetDP will give
you the available choices. For example, ’getdp test -pos’ (the name of the PostOperation
is missing) will produce an error message listing all available PostOperations.
Appendix F: Version history 125

Appendix F Version history


2.11.3 (November 5, 2017): new ’Eig’ operator for general eigenvalue problems
(polynomial, rational); small improvements and bug fixes.

2.11.2 (June 23, 2017): minor build system changes.

2.11.1 (May 13, 2017): small bug fixes and improvements.

2.11.0 (January 3, 2017): small improvements (complex math functions, mutual


terms, one side of, get/save runtime variables) and bug fixes.

2.10.0 (October 9, 2016): ONELAB 1.3 with usability and performance


improvements.

2.9.2 (August 21, 2016): small bug fixes.

2.9.1 (August 18, 2016): small improvements (CopySolution[], -cpu) and bug
fixes.

2.9.0 (July 11, 2016): new ONELAB 1.2 protocol with native support for lists;
simple C++ and Python API for exchanging (lists of) numbers and strings;
extended .pro language for the construction of extensible problem definitions
("Append"); new VolCylShell transformation; new functions (Min, Max, SetDTime,
...); small fixes.

2.8.0 (March 5, 2016): new Parse[], {Set,Get}{Number,String}[] and


OnPositiveSideOf commands; added support for lists of strings; various
improvements and bug fixes for better interactive use with ONELAB.

2.7.0 (November 7, 2015): new Else/ElseIf commands; new timing and memory
reporting functions.

2.6.1 (July 30, 2015): enhanced Print[] command; minor fixes.

2.6.0 (July 21, 2015): new ability to define and use Macros in .pro files; new
run-time variables (act as registers, but with user-defined names starting with
’$’) and run-time ONELAB Get/Set functions; new Append*ToFileName PostOperation
options; new GetResdidual and associated operations; fixes and extended format
support in MSH file reader; fixed UpdateConstraint for complex-simulated-real
and multi-harmonic calculations.

2.5.1 (April 18, 2015): enhanced Python[] and DefineFunction[].

2.5.0 (March 12, 2015): added option to embed Octave and Python interpreters;
extended "Field" functions with gradient; extended string and list handling
functions; new resolution and postprocessing functions (RenameFile, While, ...);
126 GetDP 2.11

extended EigenSolve with eigenvalue filter and high order polynomial EV


problems; small bug fixes.

2.4.4 (July 9, 2014): better stability, updated onelab API version and inline
parameter definitions, fixed UpdateConstraint in harmonic case, improved
performance of multi-harmonic assembly, fixed memory leak in parallel MPI
version, improved EigenSolve (quadratic EVP with SLEPC, EVP on real matrices),
new CosineTransform, MPI_Printf, SendMergeFileRequest parser commands, small
improvements and bug fixes.

2.4.3 (February 7, 2014): new mandatory ’Name’ attribute to define onelab


variables in DefineConstant[] & co; minor bug fixes.

2.4.2 (Septembre 27, 2013): fixed function arguments in nested expressions;


minor improvements.

2.4.1 (July 16, 2013): minor improvements and bug fixes.

2.4.0 (July 9, 2013): new two-step Init constraints; faster network computation
(with new -cache); improved Update operation; better cpu/memory reporting; new
-setnumber, -setstring and -gmshread command line options; accept unicode file
paths on Windows; small bug fixes.

2.3.1 (May 11, 2013): updated onelab; small bug fixes.

2.3.0 (March 9, 2013): moved build system from autoconf to cmake; new family of
Field functions to use data imported from Gmsh; improved list handling; general
code cleanup.

2.2.1 (July 15, 2012): cleaned up nonlinear convergence tests and integrated
experimental adaptive time loop code; small bug fixes.

2.2.0 (June 19, 2012): new solver interface based on ONELAB; parallel SLEPC
eigensolvers; cleaned up syntax for groups, moving band and global basis
functions; new Field[] functions to interpolate post-processing datasets from
Gmsh; fixed bug in Sur/Lin transformation of 2 forms; fixed bug for periodic
constraints on high-order edge elements.

2.1.1 (April 12, 2011): default direct solver using MUMPS.

2.1.0 (October 24, 2010): parallel resolution using PETSc solvers; new Gmsh2
output format; new experimental SLEPc-based eigensolvers; various bug and
performance fixes (missing face basis functions, slow PETSc assembly with global
quantities, ...)

2.0.0 (March 16, 2010): general code cleanup (separated interface from kernel
code; removed various undocumented, unstable and otherwise experimental
Appendix F: Version history 127

features; moved to C++); updated input file formats; default solvers are now
based on PETSc; small bug fixes (binary .res read, Newmark -restart).

1.2.1 (March 18, 2006): Small fixes.

1.2.0 (March 10, 2006): Windows versions do not depend on Cygwin anymore; major
parser cleanup (loops & co).

1.1.2 (September 3, 2005): Small fixes.

1.1.0 (August 21, 2005): New eigensolver based on Arpack (EigenSolve);


generalized old Lanczos solver to work with GSL+lapack; reworked PETSc
interface, which now requires PETSc 2.3; documented many previously undocumented
features (loops, conditionals, strings, link constraints, etc.); various
improvements and bug fixes.

1.0.1 (February 6, 2005): Small fixes.

1.0.0 (April 24, 2004): New license (GNU GPL); added support for latest Gmsh
mesh file format; more code cleanups.

0.91: Merged moving band and multi-harmonic code; new loops and conditionals in
the parser; removed old readline code (just use GNU readline if available);
upgraded to latest Gmsh post-processing format; various small enhancements and
bug fixes.

0.89 (March 26, 2003): Code cleanup.

0.88: Integrated FMM code.

0.87: Fixed major performance problem on Windows (matrix assembly and


post-processing can be up to 3-4 times faster with 0.87 compared to 0.86,
bringing performance much closer to Unix versions); fixed stack overflow on Mac
OS X; Re-introduced face basis functions mistakenly removed in 0.86; fixed
post-processing bug with pyramidal basis functions; new build system based on
autoconf.

0.86 (January 25, 2003): Updated Gmsh output format; many small bug fixes.

0.85 (January 21, 2002): Upgraded communication interface with Gmsh; new
ChangeOfValues option in PostOperation; many internal changes.

0.84 (September 6, 2001): New ChangeOfCoordinate option in PostOperation; fixed


crash in InterpolationAkima; improved interactive postprocessing (-ipos);
changed syntax of parametric OnGrid ($S, $T -> $A, $B, $C); corrected Skin for
non simplicial meshes; fixed floating point exception in diagonal matrix
scaling; many other small fixes and cleanups.
128 GetDP 2.11

0.83: Fixed bugs in SaveSolutions[] and InitSolution[]; fixed corrupted binary


post-processing files in the harmonic case for the Gmsh format; output files are
now created relatively to the input file directory; made solver options
available on the command line; added optional matrix scaling and changed default
parameter file name to ’solver.par’ (Warning: please check the scaling
definition in your old SOLVER.PAR files); generalized syntax for lists
(start:[incr]end -> start:end:incr); updated reference guide; added a new short
presentation on the web site; OnCut -> OnSection; new functional syntax for
resolution operations (e.g. Generate X -> Generate[X]); many other small fixes
and cleanups.

0.82: Added communication socket for interactive use with Gmsh; corrected
(again) memory problem (leak + seg. fault) in time stepping schemes; corrected
bug in Update[].

0.81: Generalization of transformation jacobians (spherical and rectangular,


with optional parameters); changed handling of missing command line arguments;
enhanced Print OnCut; fixed memory leak for time domain analysis of coupled
problems; -name option; fixed seg. fault in ILUK.

0.80: Fixed computation of time derivatives on first time step (in


post-processing); added tolerance in transformation jacobians; fixed parsing of
DOS files (carriage return problems); automatic memory reallocation in
ILUD/ILUK.

0.79: Various bug fixes (mainly for the post-processing of intergal quantities);
automatic treatment of degenerated cases in axisymmetrical problems.

0.78: Various bug fixes.

0.77: Changed syntax for PostOperations (Plot suppressed in favour of Print;


Plot OnRegion becomes Print OnElementsOf); changed table oriented
post-processing formats; new binary formats; new error diagnostics.

0.76: Reorganized high order shape functions; optimization of the


post-processing (faster and less bloated); lots of internal cleanups.

0.74: High order shape functions; lots of small bug fixes.

0.73: Eigen value problems (Lanczos); minor corrections.

0.7: constraint syntax; fourier transform; unary minus correction; complex


integral quantity correction; separate iteration matrix generation.

0.6: Second order time derivatives; Newton nonlinear scheme; Newmark time
stepping scheme; global quantity syntax; interactive post-processing; tensors;
Appendix F: Version history 129

integral quantities; post-processing facilities.

0.3: First distributed version.


Appendix G: Copyright and credits 131

Appendix G Copyright and credits


GetDP is copyright (C) 1997-2017

Patrick Dular
<patrick.dular at ulg.ac.be>

and

Christophe Geuzaine
<cgeuzaine at ulg.ac.be>

University of Liege

Major code contributions to GetDP have been provided by Johan Gyselinck, Ruth
Sabariego, Michael Asam and Bertrand Thierry. Other code contributors include:
David Colignon, Tuan Ledinh, Patrick Lefevre, Andre Nicolet, Jean-Francois
Remacle, Timo Tarhasaari, Christophe Trophime and Marc Ume. See the source code
for more details.

The AVL tree code (Common/avl.*) is 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.

The KissFFT code (Numeric/kissfft.hh) is copyright (c) 2003-2010 Mark


Borgerding. Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met: *
Redistributions of source code must retain the above copyright notice, this list
of conditions and the following disclaimer. * 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. * Neither the author nor the names of any contributors may be
used to endorse or promote products derived from this software without specific
prior written permission. 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 OWNER 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
132 GetDP 2.11

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.

This version of GetDP may contain code (in the contrib/Arpack subdirectory)
written by Danny Sorensen, Richard Lehoucq, Chao Yang and Kristi Maschhoff from
the Dept. of Computational & Applied Mathematics at Rice University, Houston,
Texas, USA. See http://www.caam.rice.edu/software/ARPACK/ for more info.

This version of GetDP may contain code (in the contrib/Sparskit subdirectory)
copyright (C) 1990 Yousef Saad: check the configuration options.

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 GetDP:
Olivier Adam, Alejandro Angulo, Geoffrey Deliege, Mark Evans, Philippe Geuzaine,
Eric Godard, Sebastien Guenneau, Francois Henrotte, Daniel Kedzierski, Samuel
Kvasnica, Benoit Meys, Uwe Pahner, Georgia Psoni, Robert Struijs, Ahmed Rassili,
Thierry Scordilis, Herve Tortel, Jose Geraldo A. Brito Neto, Matthias Fenner,
Daryl Van Vorst, Guillaume Dem\’esy.
Appendix H: License 133

Appendix H License
GetDP is provided under the terms of the GNU General Public License
(GPL), Version 2 or later.

GNU GENERAL PUBLIC LICENSE


Version 2, June 1991

Copyright (C) 1989, 1991 Free Software Foundation, Inc.


51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.

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
Foundation’s 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.

When we speak of free software, we are referring to freedom, not


price. Our General Public Licenses are designed to make sure that you
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.

To protect your rights, we need to make restrictions that forbid


anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.

For example, if you distribute copies of such a program, whether


gratis or for a fee, 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 show them these terms so they know their
rights.

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.
134 GetDP 2.11

Also, for each author’s 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.

Finally, any free program is threatened constantly by software


patents. We wish to avoid the danger that redistributors of a free
program will individually obtain patent licenses, in effect making the
program proprietary. To prevent this, we have made it clear that any
patent must be licensed for everyone’s free use or not licensed at all.

The precise terms and conditions for copying, distribution and


modification follow.

GNU GENERAL PUBLIC LICENSE


TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION

0. This License applies to any program or other work which contains


a notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License. The "Program", below,
refers to any such program or work, and a "work based on the Program"
means either the Program or any derivative work under copyright law:
that is to say, a work containing the Program or a portion of it,
either verbatim or with modifications and/or translated into another
language. (Hereinafter, translation is included without limitation in
the term "modification".) Each licensee is addressed as "you".

Activities other than copying, distribution and modification are not


covered by this License; they are outside its scope. The act of
running the Program is not restricted, and the output from the Program
is covered only if its contents constitute a work based on the
Program (independent of having been made by running the Program).
Whether that is true depends on what the Program does.

1. You may copy and distribute verbatim copies of the Program’s


source code as you receive it, in any medium, provided that you
conspicuously and appropriately publish on each copy an appropriate
copyright notice and disclaimer of warranty; keep intact all the
notices that refer to this License and to the absence of any warranty;
and give any other recipients of the Program a copy of this License
along with the Program.

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.
Appendix H: License 135

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:

a) You must cause the modified files to carry prominent notices


stating that you changed the files and the date of any change.

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.

c) If the modified program normally reads commands interactively


when run, you must cause it, when started running for such
interactive use in the most ordinary way, to print or display an
announcement including an appropriate copyright notice and a
notice that there is no warranty (or else, saying that you provide
a warranty) and that users may redistribute the program under
these conditions, and telling the user how to view a copy of this
License. (Exception: if the Program itself is interactive but
does not normally print such an announcement, your work based on
the Program is not required to print an announcement.)

These requirements apply to the modified work as a whole. If


identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
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.

Thus, it is not the intent of this section to claim rights or contest


your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Program.

In addition, mere aggregation of another work not based on the Program


with the Program (or with a work based on the Program) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.

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:
136 GetDP 2.11

a) Accompany it with the complete corresponding machine-readable


source code, which must be distributed under the terms of Sections
1 and 2 above on a medium customarily used for software interchange; or,

b) Accompany it with a written offer, valid for at least three


years, to give any third party, for a charge no more than your
cost of physically performing source distribution, a complete
machine-readable copy of the corresponding source code, to be
distributed under the terms of Sections 1 and 2 above on a medium
customarily used for software interchange; or,

c) Accompany it with the information you received as to the offer


to distribute corresponding source code. (This alternative is
allowed only for noncommercial distribution and only if you
received the program in object code or executable form with such
an offer, in accord with Subsection b above.)

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
itself accompanies the executable.

If distribution of executable or object code is made by offering


access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.

4. You may not copy, modify, sublicense, or distribute the Program


except as expressly provided under this License. Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
void, and will automatically terminate your rights under this License.
However, parties who have received copies, or rights, from you under
this License will not have their licenses terminated so long as such
parties remain in full compliance.

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
Appendix H: License 137

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.

7. If, as a consequence of a court judgment or allegation of patent


infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Program at all. For example, if a patent
license would not permit royalty-free redistribution of the Program by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Program.

If any portion of this section is held invalid or unenforceable under


any particular circumstance, the balance of the section is intended to
apply and the section as a whole is intended to apply in other
circumstances.

It is not the purpose of this section to induce you to infringe any


patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system, which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.

This section is intended to make thoroughly clear what is believed to


be a consequence of the rest of this License.

8. If the distribution and/or use of the Program is restricted in


certain countries either by patents or by copyrighted interfaces, the
138 GetDP 2.11

original copyright holder who places the Program under this License
may add an explicit geographical distribution limitation excluding
those countries, so that distribution is permitted only in or among
countries not thus excluded. In such case, this License incorporates
the limitation as if written in the body of 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.

Each version is given a distinguishing version number. If the Program


specifies a version number of this License which applies to it and "any
later version", you have the option of following the terms and conditions
either of that version or of any later version published by the Free
Software Foundation. If the Program does not specify a version number of
this License, you may choose any version ever published by the Free Software
Foundation.

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.

NO WARRANTY

11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY


FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
REPAIR OR CORRECTION.

12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING


WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
Appendix H: License 139

POSSIBILITY OF SUCH DAMAGES.

END OF TERMS AND CONDITIONS

How to Apply These Terms to Your New Programs

If you develop a new program, and you want it to be of the greatest


possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.

To do so, attach the following notices to the program. It is safest


to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.

<one line to give the program’s name and a brief idea of what it does.>
Copyright (C) <year> <name of author>

This program is free software; you can redistribute it and/or modify


it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,


but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

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.

If the program is interactive, make it output a short notice like this


when it starts in an interactive mode:

Gnomovision version 69, Copyright (C) year name of author


Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type ‘show w’.
This is free software, and you are welcome to redistribute it
under certain conditions; type ‘show c’ for details.

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.
140 GetDP 2.11

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:

Yoyodyne, Inc., hereby disclaims all copyright interest in the program


‘Gnomovision’ (which makes passes at compilers) written by James Hacker.

<signature of Ty Coon>, 1 April 1989


Ty Coon, President of Vice

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 141

Concept index

. Differential operators . . . . . . . . . . . . . . . . . . . . . . . . . . 25
‘.msh’ file . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111 Discrete function spaces . . . . . . . . . . . . . . . . . . . . . . . 32
‘.pre’ file . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112 Discrete quantities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
‘.res’ file . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112 Discretized Geometry . . . . . . . . . . . . . . . . . . . . . . . . . . 29
Divergence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
Document syntax . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
A Download . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1, 3
Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131
Analytical integration . . . . . . . . . . . . . . . . . . . . . . . . . 35
Approximation spaces . . . . . . . . . . . . . . . . . . . . . . . . . 32 E
Arguments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 E-mail, authors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
Arguments, definition . . . . . . . . . . . . . . . . . . . . . . . . . . 24 Edge element space, example . . . . . . . . . . . . . . . . . . 84
Authors, e-mail . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 Efficiency, tips . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123
Axisymmetric, transformation . . . . . . . . . . . . . . . . . 34 Electromagnetism . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
Electrostatic formulation . . . . . . . . . . . . . . . . . . . . . . 83
Elementary matrices . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
B Entities, topological . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
Basis Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 Equations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
Binary operators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 Evaluation mechanism . . . . . . . . . . . . . . . . . . . . . . . . . 16
Boundary conditions . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 Evaluation, order . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
Boundary Element Method . . . . . . . . . . . . . . . . . . . . . 6 Examples, complete . . . . . . . . . . . . . . . . . . . . . . . . . . . 91
Bugs, reporting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 Examples, short . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75
Built-in functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 Exporting results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
Expression, definition . . . . . . . . . . . . . . . . . . . . . . . . . . 15
Exterior derivative . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
C
Change of coordinates . . . . . . . . . . . . . . . . . . . . . . . . . 34
Changelog . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125
F
Circuit equations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 FAQ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121
Command line options . . . . . . . . . . . . . . . . . . . . . . . . . 11 Fields . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
Comments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 File, ‘.msh’ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111
Complete examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91 File, ‘.pre’ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112
Complex-valued, system . . . . . . . . . . . . . . . . . . . . . . . 38 File, ‘.res’ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112
Concepts, index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 141 File, comment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
Conditionals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 File, include . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
Constant, definition . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 File, mesh . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111
Constant, evaluation . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 File, pre-processing . . . . . . . . . . . . . . . . . . . . . . . . . . . 112
Constraint, definition . . . . . . . . . . . . . . . . . . . . . . . . . . 31 File, result . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112
Constraint, examples . . . . . . . . . . . . . . . . . . . . . . . . . . 77 Finite Difference Method . . . . . . . . . . . . . . . . . . . . . . . 6
Constraint, types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53 Finite Element Method . . . . . . . . . . . . . . . . . . . . . . . . . 6
Contact information . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 Finite Volume Method . . . . . . . . . . . . . . . . . . . . . . . . . . 6
Contributors, list . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131 Floating point numbers . . . . . . . . . . . . . . . . . . . . . . . . 16
Coordinate change . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 Floating potential, example . . . . . . . . . . . . . . . . . . . . 84
Copyright . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3, 131 Format, output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
Credits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131 Formulation, definition . . . . . . . . . . . . . . . . . . . . . . . . 36
Curl . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 Formulation, electrostatics . . . . . . . . . . . . . . . . . . . . . 83
Current values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 Formulation, examples . . . . . . . . . . . . . . . . . . . . . . . . . 83
Formulation, types . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
Frequency . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
D Frequently asked questions . . . . . . . . . . . . . . . . . . . 121
Dependences, objects . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 Function groups . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
Derivative, exterior . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 Function space, definition . . . . . . . . . . . . . . . . . . . . . . 32
Derivative, time . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36 Function space, examples . . . . . . . . . . . . . . . . . . . . . . 78
Developments, future . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 Function space, types . . . . . . . . . . . . . . . . . . . . . . . . . . 54
142 GetDP 2.11

Function, definition . . . . . . . . . . . . . . . . . . . . . . . . 22, 30 Loops . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27


Function, examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75
Future developments . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
M
Macros . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
G Mailing list . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3, 7
Gauss, integration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 Maps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
Geometric transformations . . . . . . . . . . . . . . . . . . . . . 34 Matrices, elementary . . . . . . . . . . . . . . . . . . . . . . . . . . 36
Global quantity. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36 Mechanics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
Global quantity, example . . . . . . . . . . . . . . . . . . . . . . 84 Mesh . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
Gmsh, examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115 Mesh, examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115
Gmsh, file format . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111 Mesh, file format . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111
Gradient . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 Metasyntactic variables, index . . . . . . . . . . . . . . . . 145
Grid. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 Method of Moments . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
Group, definition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
Group, examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75
Group, types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43 N
Networks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
Newmark, time scheme . . . . . . . . . . . . . . . . . . . . . . . . 38
H Newton, nonlinear scheme . . . . . . . . . . . . . . . . . . . . . 38
Hierarchical basis functions . . . . . . . . . . . . . . . . . . . . 32 Nodal function space, example . . . . . . . . . . . . . . . . . 83
History, versions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125 Nonlinear system solving . . . . . . . . . . . . . . . . . . . . . . 38
Numbers, integer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
Numbers, real . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
I Numerical integration. . . . . . . . . . . . . . . . . . . . . . . . . . 35
Includes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
Index, concepts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 141
Index, metasyntactic variables . . . . . . . . . . . . . . . . 145 O
Index, syntax . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 147 Objects, definition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
Input file format. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111 Objects, dependences . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
Integer numbers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 Objects, types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
Integral Equation Method . . . . . . . . . . . . . . . . . . . . . . 6 Operating system . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
Integral quantity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36 Operation, priorities . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
Integration, definition. . . . . . . . . . . . . . . . . . . . . . . . . . 35 Operators, definition . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
Integration, examples . . . . . . . . . . . . . . . . . . . . . . . . . . 83 Operators, differential . . . . . . . . . . . . . . . . . . . . . . . . . 25
Integration, types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57 Options, command line . . . . . . . . . . . . . . . . . . . . . . . . 11
Internet address . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1, 3 Order of evaluation . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
Interpolation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25, 32 Output file format . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
Iterative loop . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
P
J Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
Jacobian, definition . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 Parse . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
Jacobian, examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82 Philosophy, general . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
Jacobian, types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56 Physical problems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
Picard, nonlinear scheme . . . . . . . . . . . . . . . . . . . . . . 38
Piecewise functions . . . . . . . . . . . . . . . . . . . . . . . . 22, 30
K Platforms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
Keywords, index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 147 Post-operation, definition . . . . . . . . . . . . . . . . . . . . . . 41
Post-operation, examples . . . . . . . . . . . . . . . . . . . . . . 88
Post-operation, types . . . . . . . . . . . . . . . . . . . . . . . . . . 67
L Post-processing, definition . . . . . . . . . . . . . . . . . . . . . 39
Post-processing, examples. . . . . . . . . . . . . . . . . . . . . . 88
License . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3, 133
Post-processing, types . . . . . . . . . . . . . . . . . . . . . . . . . 67
Linear system solving . . . . . . . . . . . . . . . . . . . . . . . . . . 38
Priorities, operations . . . . . . . . . . . . . . . . . . . . . . . . . . 22
Linking, objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
Processing cycle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
Local quantity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
Concept index 143

Q Syntax, index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 147


Quantities, discrete . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 Syntax, rules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
Quantity, global . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36 System, definition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
Quantity, integral . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
Quantity, local . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
Quantity, post-processing . . . . . . . . . . . . . . . . . . . . . . 39
T
Questions, frequently asked . . . . . . . . . . . . . . . . . . . 121 Ternary operators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
Thermics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
Theta, time scheme . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
R Time derivative . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
Time stepping . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
Reading, guidelines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
Time, discretization . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
Real numbers. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 Tips. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123
Region groups . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 Tools, order of definition . . . . . . . . . . . . . . . . . . . . . . . . 5
Registers, definition . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 Topology . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
Relaxation factor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38 Transformations, geometric . . . . . . . . . . . . . . . . . . . . 34
Reporting bugs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 Tree . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
Resolution, definition . . . . . . . . . . . . . . . . . . . . . . . . . . 38 Tricks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123
Resolution, examples . . . . . . . . . . . . . . . . . . . . . . . . . . 85 Types, definition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
Resolution, types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
Results, exploitation . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
Results, export . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 U
Rules, syntactic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
Unary operators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
Run-time variables, definition . . . . . . . . . . . . . . . . . . 24 User-defined functions . . . . . . . . . . . . . . . . . . . . . . . . . 30
Running GetDP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11

V
S Values, current . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
Scope of GetDP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 Variables, index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 145
Sections . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 Versions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125
Short examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75
Solving, system . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
Spaces, discrete . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 W
String . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 Web site . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1, 3
Symmetry, integral kernel . . . . . . . . . . . . . . . . . . . . . . 36 Wiki . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91
Metasyntactic variable index 145

Metasyntactic variable index

. formulation-list . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 formulation-type . . . . . . . . . . . . . . . . . . . . . . . . . 36, 58
function-id . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
function-space-id . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
: function-space-type . . . . . . . . . . . . . . . . . . . . . 32, 54
:............................................... 9
G
< global-quantity-id . . . . . . . . . . . . . . . . . . . . . . . . . . 32
<, > . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 global-quantity-type . . . . . . . . . . . . . . . . . . . . 32, 54
green-function-id . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
group-def . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
| group-id . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
|............................................... 9 group-list . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
group-list-item . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
group-sub-type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
A group-type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29, 43
affectation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
argument . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
I
integer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
B integral-value . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
basis-function-id . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 integration-id . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
basis-function-list . . . . . . . . . . . . . . . . . . . . . . . . . 32 integration-type . . . . . . . . . . . . . . . . . . . . . . . . . 35, 57
basis-function-type . . . . . . . . . . . . . . . . . . . . . 32, 54
built-in-function-id . . . . . . . . . . . . . . . . . . . . . . . . 22
J
jacobian-id . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
C jacobian-type . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34, 56
coef-id . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
constant-def . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
constant-id . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 L
constraint-case-id . . . . . . . . . . . . . . . . . . . . . . . . . . 31 local-term-type . . . . . . . . . . . . . . . . . . . . . . . . . . 36, 58
constraint-case-val . . . . . . . . . . . . . . . . . . . . . . . . . 31 local-value . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
constraint-id . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 loop . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
constraint-type . . . . . . . . . . . . . . . . . . . . . . . . . . 31, 53
constraint-val . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
coord-function-id . . . . . . . . . . . . . . . . . . . . . . . . . . . 50 M
math-function-id . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
E misc-function-id . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
element-type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35, 57
etc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 O
expression . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
expression-char . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 operator-binary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
expression-cst . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 operator-ternary-left . . . . . . . . . . . . . . . . . . . . . . . 20
expression-cst-list . . . . . . . . . . . . . . . . . . . . . . . . . 16 operator-ternary-right . . . . . . . . . . . . . . . . . . . . . . 20
expression-cst-list-item . . . . . . . . . . . . . . . . . . . 16 operator-unary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
expression-list . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
extended-math-function-id . . . . . . . . . . . . . . . . . . 46
P
post-operation-fmt . . . . . . . . . . . . . . . . . . . . . . 41, 72
F post-operation-id . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
formulation-id . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36 post-operation-op . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
146 GetDP 2.11

post-processing-id . . . . . . . . . . . . . . . . . . . . . . . . . . 39 resolution-id . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
post-quantity-id . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 resolution-op . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38, 59
post-quantity-type . . . . . . . . . . . . . . . . . . . . . . . . . . 39
post-value . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39, 67
print-option . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41, 68 S
print-support . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41, 67 string . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
string-id . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
sub-space-id . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
Q system-id . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
quantity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 system-type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
quantity-dof . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
quantity-id . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
quantity-operator . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 T
quantity-type . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36, 58 term-op-type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36, 58
type-function-id . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48

R
real . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 V
register-get . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 variable-get . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
register-set . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 variable-set . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
Syntax index 147

Syntax index

! -
! . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 -.............................................. 20
!= . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 -adapt . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
-bin . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
-cache . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
# -cal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
#expression-cst . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 -check . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
#include . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 -cpu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
-gmshread . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
-help . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
$ -info . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
-msh . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
$A . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 -name . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
$B . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 -onelab . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
$Breakpoint . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 -order . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
$C . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 -p . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
$DTime . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 -pos . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
$EigenvalueImag . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 -pre . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
$EigenvalueReal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 -progress . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
$integer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 -res . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
$Iteration. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 -restart . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
$Theta . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 -setnumber. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
$Time . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 -setstring. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
$TimeStep . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 -slepc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
$X . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 -solve . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
$XS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 -solver . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
$Y . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 -split . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
$YS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 -v . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
$Z . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 -v2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
$ZS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 -verbose . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
-version . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13

% /
% . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
/.............................................. 20
/*, */. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
// . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
& /\ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
& . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
&& . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
<
< . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
( << . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 <= . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20

* =
= . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16, 29, 30
* . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 == . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20

+ >
+ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 > . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
>= . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
148 GetDP 2.11

>> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 B
BasisFunction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
? BF . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
BF_CurlEdge . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
25
54
?: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 BF_CurlGroupOfEdges . . . . . . . . . . . . . . . . . . . . . . . . . 55
BF_CurlGroupOfPerpendicularEdge . . . . . . . . . . . 55
^ BF_CurlPerpendicularEdge . . . . . . . . . . . . . . . . . . . 55
BF_dGlobal. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
^ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 BF_DivFacet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
BF_DivPerpendicularFacet . . . . . . . . . . . . . . . . . . . 55
| BF_Edge . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
BF_Facet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
| . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 BF_Global . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
|| . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 BF_GradGroupOfNodes . . . . . . . . . . . . . . . . . . . . . . . . . 55
BF_GradNode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
~ BF_GroupOfEdges . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
BF_GroupOfNodes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
~ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 BF_GroupOfPerpendicularEdge . . . . . . . . . . . . . . . . 55
BF_Node . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
0 BF_NodeX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
BF_NodeY . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
0D . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 BF_NodeZ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
BF_One . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
BF_PerpendicularEdge . . . . . . . . . . . . . . . . . . . . . . . . 55
1 BF_PerpendicularFacet . . . . . . . . . . . . . . . . . . . . . . . 55
1D . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 BF_Region . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
BF_RegionX. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
BF_RegionY. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
2 BF_RegionZ. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
2D . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 BF_Volume . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
BF_Zero . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
Break . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
3
3D . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
C
Call string | expression-char ; . . . . . . . . . . . . . 27
A Cart2Cyl . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
Abs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45 Cart2Pol . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
Acos . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45 Cart2Sph . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
Adapt . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70 Case . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31, 34, 35
Adaptation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73 Ceil . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
AliasOf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56 ChangeOfCoordinates . . . . . . . . . . . . . . . . . . . . . . . . . 71
All . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29, 34 ChangeOfValues . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
Analytic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 Closed . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70
Append . . . . . . . . . . . . . . . 31, 32, 34, 35, 36, 38, 39, 41 Color . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70
AppendExpressionFormat . . . . . . . . . . . . . . . . . . . . . . 69 CompElementNum . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
AppendExpressionToFileName . . . . . . . . . . . . . . . . . 69 Complex . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
AppendStringToFileName . . . . . . . . . . . . . . . . . . . . . . 70 Complex_MH. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
AppendTimeStepToFileName . . . . . . . . . . . . . . . . . . . 69 ComplexScalarField . . . . . . . . . . . . . . . . . . . . . . . . . . 52
AppendToExistingFile . . . . . . . . . . . . . . . . . . . . . . . . 68 ComplexTensorField . . . . . . . . . . . . . . . . . . . . . . . . . . 52
Apply . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61 ComplexVectorField . . . . . . . . . . . . . . . . . . . . . . . . . . 52
Asin . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44 CompX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
Assign . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53 CompXX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
AssignFromResolution . . . . . . . . . . . . . . . . . . . . . . . . 53 CompXY . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
AssociatedWith . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56 CompXZ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
Atan . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45 CompY . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
Atan2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45 CompYX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
AtIndex . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51 CompYY . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
Syntax index 149

CompYZ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49 EigenvalueLegend . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72
CompZ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49 ElementsOf. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
CompZX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49 ElementVol. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
CompZY . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49 Else . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
CompZZ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49 ElseIf ( expression-cst ) . . . . . . . . . . . . . . . . . . . 28
Conj . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48 ENABLE_ARPACK . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119
Constraint . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31, 32 ENABLE_BLAS_LAPACK . . . . . . . . . . . . . . . . . . . . . . . . . 119
CopyResidual . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61 ENABLE_BUILD_ANDROID . . . . . . . . . . . . . . . . . . . . . . . 119
CopyRightHandSide. . . . . . . . . . . . . . . . . . . . . . . . . . . . 61 ENABLE_BUILD_DYNAMIC . . . . . . . . . . . . . . . . . . . . . . . 119
CopySolution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61 ENABLE_BUILD_IOS. . . . . . . . . . . . . . . . . . . . . . . . . . . . 119
Cos . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44 ENABLE_BUILD_LIB. . . . . . . . . . . . . . . . . . . . . . . . . . . . 119
Cos_wt_p . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47 ENABLE_BUILD_SHARED . . . . . . . . . . . . . . . . . . . . . . . . 119
Cosh . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45 ENABLE_CONTRIB_ARPACK . . . . . . . . . . . . . . . . . . . . . . 119
CreateDir | CreateDirectory . . . . . . . . . . . . . . . . . 66 ENABLE_FORTRAN . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119
CreateSolution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60 ENABLE_GMSH . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119
Criterion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 ENABLE_GSL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119
Cross . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46 ENABLE_LEGACY . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119
Curl . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 ENABLE_MPI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120
ENABLE_MULTIHARMONIC . . . . . . . . . . . . . . . . . . . . . . . 120
ENABLE_NR . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120
D ENABLE_NX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120
d.............................................. 25 ENABLE_OCTAVE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120
D1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 ENABLE_OPENMP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120
D2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 ENABLE_PETSC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120
DecomposeInSimplex . . . . . . . . . . . . . . . . . . . . . . . . . . 71 ENABLE_PYTHON . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120
DefineConstant . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 ENABLE_SLEPC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120
DefineFunction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 ENABLE_SMALLFEM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120
DefineGroup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 ENABLE_SPARSKIT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120
DeleteFile. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66 ENABLE_WRAP_PYTHON . . . . . . . . . . . . . . . . . . . . . . . . . 120
Depth . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69 ENABLE_ZITSOL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120
deRham . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58 EndFor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
DestinationSystem. . . . . . . . . . . . . . . . . . . . . . . . . . . . 38 EndIf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
Det . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46 Entity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
dFunction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 EntitySubType . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
Dimension . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69 EntityType. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
dInterpolationAkima . . . . . . . . . . . . . . . . . . . . . . . . . 51 Equation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
dInterpolationBilinear . . . . . . . . . . . . . . . . . . . . . . 51 Error . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
dInterpolationLinear . . . . . . . . . . . . . . . . . . . . . . . . 51 Evaluate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
Div . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 Exp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
dJn . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
Dof . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
Dt . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58 F
DtDof . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58 Fabs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
DtDofJacNL. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58 FacetsOf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
DtDt . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58 FacetsOfTreeIn . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
DtDtDof . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58 FemEquation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
DualEdgesOf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44 Field . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
DualFacetsOf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44 File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
DualNodesOf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44 Floor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
DualVolumesOf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44 Fmod . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
dYn . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46 For ( expression-cst : expression-cst ) . . . . 27
For ( expression-cst : expression-cst :
expression-cst ) . . . . . . . . . . . . . . . . . . . . . . . . 27
E For string In { expression-cst :
EdgesOf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43 expression-cst : expression-cst } . . . . . 27
EdgesOfTreeIn . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44 For string In { expression-cst :
Eig . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58 expression-cst } . . . . . . . . . . . . . . . . . . . . . . . . 27
EigenSolve. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63 Form0 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
150 GetDP 2.11

Form1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54 Helmholtz . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
Form1P . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54 Hexahedron. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
Form2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54 Hidden . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70
Form2P . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54 Hypot . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
Form3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
Format. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41, 70
Formulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32, 36 I
FourierTransform . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63 If ( expression-cst ) . . . . . . . . . . . . . . . . . . . . . . . . 28
Frequency . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38, 70 Im . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
FrequencyLegend . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72 In . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36, 39
Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30, 32 Include . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
FunctionSpace . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 IndexOfSystem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
Init . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
InitFromResolution . . . . . . . . . . . . . . . . . . . . . . . . . . 53
G InitSolution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
Galerkin . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58 InitSolution1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
Gauss . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57 Integral . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39, 58, 67
GaussLegendre . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57 Integration . . . . . . . . . . . . . . . . . . . . . . . . . . . 35, 36, 39
Generate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59 InterpolationAkima . . . . . . . . . . . . . . . . . . . . . . . . . . 51
GenerateGroup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59 InterpolationBilinear . . . . . . . . . . . . . . . . . . . . . . . 51
GenerateJac . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59 InterpolationLinear . . . . . . . . . . . . . . . . . . . . . . . . . 51
GenerateOnly . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59 Interval . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
GenerateOnlyJac . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59 Inv . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
GenerateRightHandSideGroup . . . . . . . . . . . . . . . . . 59 Iso . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
GenerateSeparate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59 IterativeLinearSolver . . . . . . . . . . . . . . . . . . . . . . . 65
GeoElement. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 IterativeLoop . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
GetCpuTime. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52 IterativeLoopN . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
GetMemory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
GetNormSolution | GetNormRightHandSide |
GetNormResidual | GetNormIncrement . . . . 60 J
GetNumberRunTime . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53 JacNL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
GetNumElements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51 Jacobian . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34, 36, 39
GetResidual . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60 Jn . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
GetVariable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
GetVolume . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
GetWallClockTime . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53 L
Global. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43, 58 Lanczos . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
GlobalEquation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36 Laplace . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
GlobalQuantity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 LastTimeStepOnly . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
GlobalTerm. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36 LevelTest . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
Gmsh . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72 Lin . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
GmshClearAll . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66 Line . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
GmshParsed. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72 Link . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
GmshRead . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66 LinkCplx . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
GmshWrite . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66 List . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
Gnuplot . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73 ListAlt . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
Grad . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 Local . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39, 58, 67
GradHelmholtz . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47 Log . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
GradLaplace . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47 Log10 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
Group . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29, 32 Loop . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
GroupOfRegionsOf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
GroupsOfEdgesOf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
GroupsOfEdgesOnNodesOf . . . . . . . . . . . . . . . . . . . . . . 43 M
GroupsOfNodesOf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43 Macro string | expression-char . . . . . . . . . . . . . 27
Max . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
Min . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
H MPI_Barrier . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
HarmonicToTime . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69 MPI_BroadcastFields . . . . . . . . . . . . . . . . . . . . . . . . . 67
Syntax index 151

MPI_BroadcastVariables . . . . . . . . . . . . . . . . . . . . . . 67 Q
MPI_SetCommSelf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66 Quadrangle. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
MPI_SetCommWorld . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66 Quantity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32, 36, 39

N R
Name . . . . . . . . . . . . . . . . . 31, 32, 34, 35, 36, 38, 39, 41 Rand . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
Name | Label . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68 Re . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
NameOfBasisFunction . . . . . . . . . . . . . . . . . . . . . . . . . 32 Region . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31, 34, 43
NameOfCoef. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 RemoveLastSolution . . . . . . . . . . . . . . . . . . . . . . . . . . 62
NameOfConstraint . . . . . . . . . . . . . . . . . . . . . . . . . 32, 36 RenameFile. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
NameOfFormulation . . . . . . . . . . . . . . . . . . . . . . . . 38, 39 Residual . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
NameOfMesh. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38 Resolution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32, 38
NameOfPostProcessing . . . . . . . . . . . . . . . . . . . . . . . . 41 Return . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
NameOfSpace . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36 Rot . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
NameOfSystem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 Rotate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
Network . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36, 53
NeverDt . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
Node . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36 S
NodesOf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43 SaveSolution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
NodeTable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73 SaveSolutions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
NoMesh . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70 Scalar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
NoNewLine . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71 ScalarField . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
Norm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46 SendToServer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70
Normal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50 SetDTime . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
NormalSource . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50 SetFrequency . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
NumberOfPoints . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 SetNumberRunTime . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
SetRightHandSideAsSolution . . . . . . . . . . . . . . . . . 61
SetSolutionAsRightHandSide . . . . . . . . . . . . . . . . . 61
O SetTime . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
OnBox . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68 SetTimeStep . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
OnElementsOf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67 SetVariable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
OnGlobal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67 Sign . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
OnGrid . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67 SimpleTable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73
OnLine . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68 Sin . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
OnPlane . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68 Sin_wt_p . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
OnPoint . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68 Sinh . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
OnRegion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67 Skin . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
Sleep . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
OnSection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
Smoothing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38, 41
Solve . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
Order . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
SolveAgain. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
OriginSystem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
SolveJac . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
OverrideTimeStepValue . . . . . . . . . . . . . . . . . . . . . . . 70
Solver . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
Sort . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
Sqrt . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
P SquDyadicProduct . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
Parse [ expression-char ]; . . . . . . . . . . . . . . . . . . 28 SquNorm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
Period . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47 StoreInField . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72
Pi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 StoreInMeshBasedField . . . . . . . . . . . . . . . . . . . . . . . 72
Point . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57 StoreInRegister . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
PostOperation . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41, 65 StoreInVariable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
PostProcessing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 StoreMaxInRegister . . . . . . . . . . . . . . . . . . . . . . . . . . 71
Print . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41, 63 StoreMaxXinRegister . . . . . . . . . . . . . . . . . . . . . . . . . 72
Printf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50 StoreMaxYinRegister . . . . . . . . . . . . . . . . . . . . . . . . . 72
Prism . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57 StoreMaxZinRegister . . . . . . . . . . . . . . . . . . . . . . . . . 72
Pyramid . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57 StoreMinInRegister . . . . . . . . . . . . . . . . . . . . . . . . . . 71
StoreMinXinRegister . . . . . . . . . . . . . . . . . . . . . . . . . 72
152 GetDP 2.11

StoreMinYinRegister . . . . . . . . . . . . . . . . . . . . . . . . . 72 U
StoreMinZinRegister . . . . . . . . . . . . . . . . . . . . . . . . . 72 Unit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
SubRegion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 Units . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70
SubSpace . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 UnitVectorX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
Support . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 UnitVectorY . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
Sur . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
UnitVectorZ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
SurAxi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
Update. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59, 60
SurfaceArea . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
UpdateConstraint . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
SwapSolutionAndResidual . . . . . . . . . . . . . . . . . . . . . 60
UsingPost . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
SwapSolutionAndRightHandSide . . . . . . . . . . . . . . . 60
Symmetry . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
SystemCommand . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
V
Value . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39, 71
Vector. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48, 54
T VectorField . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
Table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72 Vol . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
Tan . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45 VolAxi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
Tangent . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50 VolAxiRectShell . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
TangentSource . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50 VolAxiSphShell . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
Tanh . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45 VolAxiSqu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
TanhC2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45 VolAxiSquRectShell . . . . . . . . . . . . . . . . . . . . . . . . . . 57
Target . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70 VolAxiSquSphShell. . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
Tensor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48 VolCylShell . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
TensorDiag. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48 VolRectShell . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
TensorField . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52 VolSphShell . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
TensorSym . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48 VolumesOf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
TensorV . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
Test . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62, 63
Tetrahedron . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
W
TimeFunction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 While . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
TimeImagValue . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
TimeLegend. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72
TimeLoopAdaptive . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64 X
TimeLoopNewmark . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64 X . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
TimeLoopTheta . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64 XYZ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
TimeStep . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
TimeTable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73
TimeValue . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69 Y
TransferInitSolution . . . . . . . . . . . . . . . . . . . . . . . . 62 Y . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
TransferSolution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62 Yn . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
Transpose . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
Triangle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
TTrace . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46 Z
Type . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31, 32, 35, 36, 38 Z . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
Gmsh
Gmsh Reference Manual
The documentation for Gmsh 3.0
A finite element mesh generator with built-in pre- and post-processing facilities

5 November 2017

Christophe Geuzaine
Jean-François Remacle
Copyright
c 1997-2017 Christophe Geuzaine, Jean-François 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 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105
A Tutorial . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123
B Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 153
C Compiling the source code . . . . . . . . . . . . . . . . . . . . . . . . . . . . 233
D Information for developers . . . . . . . . . . . . . . . . . . . . . . . . . . . . 237
E Frequently asked questions . . . . . . . . . . . . . . . . . . . . . . . . . . . . 239
F Version history . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 247
G Copyright and credits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 263
H License . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 267
Concept index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 275
Syntax index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 277
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

2 How to read this reference manual? . . . . . . . . . . . 9


2.1 Syntactic rules used in the manual. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9

3 Running Gmsh on your system . . . . . . . . . . . . . . 11


3.1 Interactive mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
3.2 Non-interactive mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
3.3 Command-line options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
3.4 Mouse actions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
3.5 Keyboard shortcuts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16

4 General tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
4.1 Comments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
4.2 Expressions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
4.2.1 Floating point expressions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
4.2.2 Character expressions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
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 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
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

9 File formats . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105


9.1 MSH ASCII file format . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105
9.2 MSH binary file format . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111
9.3 Node ordering . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112
9.3.1 Low order elements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112
9.3.2 High order elements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115
9.4 Legacy formats . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115
9.4.1 MSH file format version 1.0 (Legacy) . . . . . . . . . . . . . . . . . . . . 115
9.4.2 POS ASCII file format (Legacy) . . . . . . . . . . . . . . . . . . . . . . . . . 117
9.4.3 POS binary file format (Legacy) . . . . . . . . . . . . . . . . . . . . . . . . . 120
v

Appendix A Tutorial . . . . . . . . . . . . . . . . . . . . . . . . . . 123


A.1 t1.geo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123
A.2 t2.geo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125
A.3 t3.geo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 127
A.4 t4.geo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 129
A.5 t5.geo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132
A.6 t6.geo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 135
A.7 t7.geo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 137
A.8 t8.geo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 137
A.9 t9.geo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 140
A.10 t10.geo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 142
A.11 t11.geo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 144
A.12 t12.geo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 145
A.13 t13.geo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 146
A.14 t14.geo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 147
A.15 t15.geo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 149
A.16 t16.geo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 150

Appendix B Options . . . . . . . . . . . . . . . . . . . . . . . . . . 153


B.1 General options list . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 153
B.2 Geometry options list . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 181
B.3 Mesh options list . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 189
B.4 Solver options list . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 207
B.5 Post-processing options list . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 213

Appendix C Compiling the source code . . . . . 233

Appendix D Information for developers . . . . . 237


D.1 Source code structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 237
D.2 Coding style . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 237
D.3 Adding a new option . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 238

Appendix E Frequently asked questions . . . . . 239


E.1 The basics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 239
E.2 Installation problems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 239
E.3 General questions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 240
E.4 Geometry module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 240
E.5 Mesh module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 241
E.6 Solver module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 243
E.7 Post-processing module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 243

Appendix F Version history . . . . . . . . . . . . . . . . . . 247

Appendix G Copyright and credits . . . . . . . . . . . 263


vi Gmsh 3.0

Appendix H License . . . . . . . . . . . . . . . . . . . . . . . . . . . 267

Concept index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 275

Syntax index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 277


Obtaining Gmsh 1

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 267).
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 263.
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 Gmsh’s 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.

1.1 Geometry: geometrical entity definition


Gmsh uses a boundary representation (“BRep”) to describe geometries. Models are created
in a bottom-up flow by successively defining points, oriented lines (line segments, circles,
ellipses, splines, . . . ), oriented surfaces (plane surfaces, surfaces, triangulated surfaces, . . . )
and volumes. Groups of geometrical entities (called “physical groups”) can also be de-
fined, based on these elementary geometric entities. Gmsh’s scripting language allows all
geometrical entities to be fully parametrized.

1.2 Mesh: finite element mesh generation


A finite element mesh is a tessellation of a given subset of the three-dimensional space
by elementary geometrical elements of various shapes (in Gmsh’s case: lines, triangles,
quadrangles, tetrahedra, prisms, hexahedra and pyramids), arranged in such a way that if
two of them intersect, they do so along a face, an edge or a node, and never otherwise.
All the finite element meshes produced by Gmsh are considered as “unstructured”, even
if they were generated in a “structured” way (e.g., by extrusion). This implies that the
elementary geometrical elements are defined only by an ordered list of their nodes but that
no predefined order relation is assumed between any two elements.
The mesh generation is performed in the same bottom-up flow as the geometry creation:
lines are discretized first; the mesh of the lines is then used to mesh the surfaces; then the
mesh of the surfaces is used to mesh the volumes. In this process, the mesh of an entity
is only constrained by the mesh of its boundary. For example, in three dimensions, the
triangles discretizing a surface will be forced to be faces of tetrahedra in the final 3D mesh
only if the surface is part of the boundary of a volume; the line elements discretizing a
curve will be forced to be edges of tetrahedra in the final 3D mesh only if the curve is
part of the boundary of a surface, itself part of the boundary of a volume; a single node
discretizing a point in the middle of a volume will be forced to be a vertex of one of the
tetrahedra in the final 3D mesh only if this point is connected to a curve, itself part of the
boundary of a surface, itself part of the boundary of a volume. This automatically assures
the conformity of the mesh when, for example, two surfaces share a common line. But this
also implies that the discretization of an “isolated” (n-1)-th dimensional entity inside an
n-th dimensional entity does not constrain the n-th dimensional mesh—unless it is explicitly
told to do so (see Section 6.3.3 [Miscellaneous mesh commands], page 66). Every meshing
step is constrained by a “size field” (sometimes called “characteristic length field”), which
6 Gmsh 3.0

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 .

1.3 Solver: external solver interface


External solvers can be interfaced with Gmsh through Unix or TCP/IP sockets, which
permits to modify solver parameters, launch external computations and process the results
directly from within Gmsh’s post-processing module. The default solver interfaced with
Gmsh is GetDP (http://getdp.info). Examples on how to interface other solvers are
available in the source distribution (in the utils/solvers directory).

1.4 Post-processing: scalar, vector and tensor field


visualization
Gmsh can load and manipulate multiple post-processing scalar, vector or tensor maps along
with the geometry and the mesh. Scalar fields are represented by iso-value lines/surfaces or
color maps, while vector fields are represented by three-dimensional arrows or displacement
maps. Post-processing functions include section computation, offset, elevation, boundary
and component extraction, color map and range modification, animation, vector graphic
output, etc. All the post-processing options can be accessed either interactively or through
the input script files. Scripting permits to automate all post-processing operations, as for
example to create animations. User-defined operations can also be performed on post-
processing views through dynamically loadable plugins.

1.5 What Gmsh is pretty good at . . .


Here is a tentative list of what Gmsh does best:
• quickly describe simple and/or “repetitive” geometries, thanks to user-defined macros,
loops, conditionals and includes (see Section 4.5 [User-defined macros], page 28,
Section 4.6 [Loops and conditionals], page 28, and Section 4.7 [General commands],
page 29);
• parametrize these geometries. Gmsh’s scripting language enables all commands and
command arguments to depend on previous calculations (see Section 4.2 [Expressions],
page 21, and Section 5.1 [Geometry commands], page 35). Using the OpenCASCADE
geometry kernel, Gmsh gives access to all usual constructive solid geometry operations;
• generate 1D, 2D and 3D simplicial (i.e., using line segments, triangles and tetrahedra)
finite element meshes for CAD models in their native format (without translations)
when linked with the appropriate CAD kernel (see Chapter 6 [Mesh module], page 45);
• specify target element sizes accurately. Gmsh provides several mechanisms to control
the size of the elements in the final mesh: through interpolation from sizes specified at
1
Note that mixing structured volume grids with unstructured volume grids generated with the default 3D
Delaunay algorithm can result, in certain cases, to non-conform surface meshes on their shared boundary.
If this happens, you may consider using the frontal algorithm for the unstructured part.
Chapter 1: Overview 7

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 153), and can
generate complex animations (see Chapter 4 [General tools], page 21, and Section A.8
[t8.geo], page 137);
• 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 233), 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 153);
• 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.

1.6 . . . and what Gmsh is not so good at


As of version 3.0, here are some known weaknesses of Gmsh:
• Gmsh is not a multi-bloc mesh generator: all meshes produced by Gmsh are conforming
in the sense of finite element meshes;
• Gmsh’s user interface is only exposing a limited number of the available features, and
many aspects of the interface could be enhanced (especially manipulators).
• Gmsh’s scripting language is quite limited, providing only very crude loop controls and
user-defined macros, with no local variables. We will at some point create a C API so
that you can access Gmsh features with your language of choice.
If you have the skills and some free time, feel free to join the project: we gladly accept any
code contributions (see Appendix D [Information for developers], page 237) to remedy the
aforementioned (and all other) shortcomings!

1.7 Bug reports


If you think you have found a bug in Gmsh, you can report it by email to the public Gmsh
mailing list at gmsh@onelab.info, or file it directly into the bug tracking database. Please
send as precise a description of the problem as you can, including sample input files that
produce the bug. Don’t forget to mention both the version of Gmsh and the version of your
8 Gmsh 3.0

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 239, and the bug tracking system to see
which problems we already know about.
Chapter 2: How to read this reference manual? 9

2 How to read this reference manual?


Gmsh can be used at three levels:
1. as a stand-alone graphical program, driven by an interactive graphical user interface
(GUI);
2. as a stand-alone script-driven program;
3. as a library.
You can skip most of this reference manual if you only want to use Gmsh at the first
level (i.e., interactively with the GUI). Just read the next chapter (see Chapter 3 [Run-
ning Gmsh on your system], page 11) to learn how to launch Gmsh on your system, then
go experiment with the GUI and the tutorial files (see Appendix A [Tutorial], page 123)
provided in the distribution. Screencasts that show how to use the GUI are available here:
http://gmsh.info/screencasts/.
The aim of the reference manual is to explain everything you need to use Gmsh at the
second level, i.e., using the built-in scripting language. A Gmsh script file is an ASCII
text file that contains instructions in Gmsh’s built-in scripting language. Such a file is
interpreted by Gmsh’s parser, and can be given any extension (or no extension at all). By
convention, Gmsh uses the ‘.geo’ extension for geometry scripts, and the ‘.pos’ extension
for parsed post-processing datasets. Once you master the tutorial (read the source files:
they are heavily commented!), start reading chapter Chapter 4 [General tools], page 21,
then proceed with the next four chapters, which detail the syntax of the geometry, mesh,
solver and post-processing scripting commands. You will see that most of the interactive
actions in the GUI have a direct equivalent in the scripting language. If you want to use
Gmsh as a pre- or post-processor for your own software, you will also want to learn about the
non-scripting input/output files that Gmsh can read/write. In addition to Gmsh’s native
“MSH” file format (see Chapter 9 [File formats], page 105), Gmsh can read/write many
standard mesh files, depending on how it was built: check the ‘File->Export’ menu for a
list of available formats.
Finally, to use Gmsh at the third level (i.e., to link the Gmsh library with your own code),
you will need to learn the internal Gmsh Application Programming Interface (API). No
complete documentation of this API is available yet; a good starting point is Section D.1
[Source code structure], page 237, which gives a short introduction to Gmsh’s internal source
code structure. Then have a look e.g. at the examples in the utils/api demos directory in
the source code. To build the library see the instructions in Appendix C [Compiling the
source code], page 233 and in the top-level README.txt file in the source distribution.

2.1 Syntactic rules used in the manual


Here are the rules we tried to follow when writing this reference manual. Note that meta-
syntactic variable definitions stay valid throughout the manual (and not only in the sections
where the definitions appear).
1. Keywords and literal symbols are printed like this.
2. Metasyntactic variables (i.e., text bits that are not part of the syntax, but stand for
other text bits) are printed like this.
3. A colon (:) after a metasyntactic variable separates the variable from its definition.
10 Gmsh 3.0

4. Optional rules are enclosed in < > pairs.


5. Multiple choices are separated by |.
6. Three dots (. . . ) indicate a possible (multiple) repetition of the preceding rule.
Chapter 3: Running Gmsh on your system 11

3 Running Gmsh on your system

3.1 Interactive mode


To launch Gmsh in interactive mode, just double-click on the Gmsh icon, or type
> gmsh
at your shell prompt in a terminal. This will open the main Gmsh window, with a tree-like
menu on the left, a graphic area on the right, and a status bar at the bottom. (You can
detach the tree menu using ‘Window->Attach/Detach Menu’.)
To open the first tutorial file (see Appendix A [Tutorial], page 123), select the ‘File->Open’
menu, and choose t1.geo. When using a terminal, you can specify the file name directly on
the command line, i.e.:
> gmsh t1.geo
To perform the mesh generation, go to the mesh module (by selecting ‘Mesh’ in the tree)
and choose the dimension (‘1D’ will mesh all the lines; ‘2D’ will mesh all the surfaces—as
well as all the lines if ‘1D’ was not called before; ‘3D’ will mesh all the volumes—and all
the surfaces if ‘2D’ was not called before). To save the resulting mesh in the current mesh
format click on ‘Save’, or select the appropriate format and file name with the ‘File->Export’
menu. The default mesh file name is based on the name of the current active model, with
an appended extension depending on the mesh format1 .
To create a new geometry or to modify an existing geometry, select ’Geometry’ in the tree.
For example, to create a spline, select ‘Elementary’, ‘Add’, ‘New’ and ‘Spline’. You will
then be asked to select a list of points, and to type e to finish the selection (or q to abort it).
Once the interactive command is completed, a text string is automatically added at the end
of the current script file. You can edit the script file by hand at any time by pressing the
‘Edit’ button in the ‘Geometry’ menu and then reloading the model by pressing ‘Reload’.
For example, it is often faster to define variables and points directly in the script file, and
then use the GUI to define the lines, the surfaces and the volumes interactively.
Several files can be loaded simultaneously in Gmsh. When specified on the command line,
the first one defines the active model and the others are ‘merged’ into this model. You can
merge such files with the ‘File->Merge’ menu. For example, to merge the post-processing
views contained in the files view1.pos and view5.msh together with the geometry of the first
tutorial Section A.1 [t1.geo], page 123, you can type the following command:
> gmsh t1.geo view1.pos view5.msh
In the Post-Processing module (select ‘Post-Processing’ in the tree), three items will appear,
respectively labeled ‘A scalar map’, ‘Nodal scalar map’ and ‘Element 1 vector’. In this
example the views contain several time steps: you can loop through them with the small
“remote-control” icons in the status bar. A mouse click on the view name will toggle the
visibility of the selected view, while a click on the arrow button on the right will provide
access to the view’s options.
1
Nearly all the interactive commands have keyboard shortcuts: see Section 3.5 [Keyboard shortcuts], page 16,
or select ‘Help->Keyboard and Mouse Usage’ in the menu. For example, to quickly save a mesh, you can
press Ctrl+Shift+s.
12 Gmsh 3.0

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 153. A full list of options with their current values is also
available in the ‘Help->Current Options’ menu.

3.2 Non-interactive mode


Gmsh can be run non-interactively in ‘batch’ mode, without GUI2 . For example, to mesh
the first tutorial in batch mode, just type:
> gmsh t1.geo -2
To mesh the same example, but with the background mesh available in the file bgmesh.pos,
type:
> gmsh t1.geo -2 -bgm bgmesh.pos
For the list of all command-line options, see Section 3.3 [Command-line options], page 12.
In particular, any complicated workflow can be written in a .geo file, and this file can be
executed as a script using
> gmsh script.geo -
The script can contain e.g. meshing commands, like Mesh 3;.

3.3 Command-line options


Geometry options:
-0 Output model, then exit
-tol float
Set geometrical tolerance
-match Match geometries and meshes
Mesh options:
-1, -2, -3
Perform 1D, 2D or 3D mesh generation, then exit
-o file Specify output file name
-format string
Select output mesh format (auto (default), msh, msh1, msh2, unv, vrml, ply2,
stl, mesh, bdf, cgns, p3d, diff, med, neu, ...)
2
If you compile Gmsh without the GUI (see Appendix C [Compiling the source code], page 233), this is the
only mode you have access to.
Chapter 3: Running Gmsh on your system 13

-bin Use binary format when available


-refine Perform uniform mesh refinement, then exit
-reclassify
Reclassify mesh, then exit
-part int Partition after batch mesh generation
-partWeight tri|quad|tet|prism|hex int
Weight of a triangle/quad/etc. during partitioning
-save_all
Save all elements (discard physical group definitions)
-save_parametric
Save vertices with their parametric coordinates
-save_topology
Save model topology
-algo string
Select mesh algorithm (meshadapt, del2d, front2d, delquad, del3d, front3d,
mmg3d, pack)
-smooth int
Set number of mesh smoothing steps
-order int
Set mesh order (1, ..., 5)
-optimize[_netgen]
Optimize quality of tetrahedral elements
-optimize_threshold
Optimize tetrahedral elements that have a qulaity less than a threshold
-optimize_ho
Optimize high order meshes
-ho_[min,max,nlayers]
High-order optimization parameters
-optimize_lloyd
Optimize 2D meshes using Lloyd algorithm
-clscale float
Set global mesh element size scaling factor
-clmin float
Set minimum mesh element size
-clmax float
Set maximum mesh element size
-anisoMax float
Set maximum anisotropy (only used in bamg for now)
14 Gmsh 3.0

-smoothRatio float
Set smoothing ration between mesh sizes at nodes of a same edge (only used in
bamg)
-clcurv Automatically compute element sizes from curvatures
-epslc1d Set accuracy of evaluation of LCFIELD for 1D mesh
-swapangle
Set the threshold angle (in degree) between two adjacent faces below which a
swap is allowed
-rand float
Set random perturbation factor
-bgm file Load background mesh from file
-check Perform various consistency checks on mesh
-ignorePartBound
Ignore partition boundaries
-ignorePeriocity
Ignore periodic boundaries
-oneFilePerPart
Save mesh partitions in separate files
Post-processing options:
-link int Select link mode between views (0, 1, 2, 3, 4)
-combine Combine views having identical names into multi-time-step views
Solver options:
-listen Always listen to incoming connection requests
-minterpreter string
Name of Octave interpreter
-pyinterpreter string
Name of Python interpreter
-run Run ONELAB solver(s)
Display options:
-n Hide all meshes and post-processing views on startup
-nodb Disable double buffering
-numsubedges
Set num of subdivisions for high order element display
-fontsize int
Specify the font size for the GUI
-theme string
Specify FLTK GUI theme
Chapter 3: Running Gmsh on your system 15

-display string
Specify display
-camera Use camera mode view;
-stereo OpenGL quad-buffered stereo rendering (requires special graphic card)
-gamepad Use gamepad controller if available
Other options:
-, -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 Don’t 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
-nt int Set number of threads
-cpu Report CPU times for all operations
-version Show version number
-info Show detailed version information
-help Show command line usage
16 Gmsh 3.0

3.4 Mouse actions


Move - Highlight the entity under the mouse pointer and display its properties
- Resize a lasso zoom or a lasso (un)selection
Left button
- Rotate
- Select an entity
- Accept a lasso zoom or a lasso selection
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.

3.5 Keyboard shortcuts


(On Mac Ctrl is replaced by Cmd (the ‘Apple key’) in the shortcuts below.)
Left arrow
Go to previous time step
Right arrow
Go to next time step
Up arrow Make previous view visible
Down arrow
Make next view visible
0 Reload geometry
Ctrl+0 Reload full project
1 or F1 Mesh lines
Chapter 3: Running Gmsh on your system 17

2 or F2 Mesh surfaces
3 or F3 Mesh volumes
Escape Cancel lasso zoom/selection, toggle mouse selection ON/OFF
e End/accept selection in geometry creation mode
g Go to geometry module
m Go to mesh module
p Go to post-processing module
q Abort selection in geometry creation mode
s Go to solver module
x Toogle x coordinate freeze in geometry creation mode
y Toogle y coordinate freeze in geometry creation mode
z Toogle z coordinate freeze in geometry creation mode
Shift+a Bring all windows to front
Shift+g Show geometry options
Shift+m Show mesh options
Shift+o Show general options
Shift+p Show post-processing options
Shift+s Show solver options
Shift+u Show post-processing view plugins
Shift+w Show post-processing view options
Shift+x Move only along x coordinate in geometry creation mode
Shift+y Move only along y coordinate in geometry creation mode
Shift+z Move only along z coordinate in geometry creation mode
Shift+Escape
Enable full mouse selection
Ctrl+d Attach/detach menu
Ctrl+e Export project
Ctrl+f Enter full screen
Ctrl+i Show statistics window
Ctrl+j Save model options
Ctrl+l Show message console
Ctrl+m Minimize window
Ctrl+n Create new project file
18 Gmsh 3.0

Ctrl+o Open project file


Ctrl+q Quit
Ctrl+r Rename project file
Ctrl+s Save mesh in default format
Shift+Ctrl+c
Show clipping plane window
Shift+Ctrl+h
Show current options and workspace window
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
Chapter 3: Running Gmsh on your system 19

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
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 Gmsh’s 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 won’t 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.

4.2.1 Floating point expressions


Floating point expressions (or, more simply, “expressions”) are denoted by the metasyn-
tactic variable expression (remember the definition of the syntactic rules in Section 2.1
[Syntactic rules], page 9), and are evaluated during the parsing of the script file:
expression :
real |
string |
string ~ { expression }
string [ expression ] |
# string [ ] |
( expression ) |
operator-unary-left expression |
expression operator-unary-right |
expression operator-binary expression |
expression operator-ternary-left expression operator-ternary-right ex-
pression |
built-in-function |
real-option |
Find(expression-list-item, expression-list-item ) |
StrFind(char-expression, char-expression ) |
StrCmp(char-expression, char-expression ) |
StrLen(char-expression ) |
TextAttributes(char-expression <,char-expression ...>) |
Exists(string ) | Exists(string ~{ expression }) |
22 Gmsh 3.0

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 Gmsh’s 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 153. 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 153), 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 } |
BoundingBox Point|Line|Surface|Volume { expression } |
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
next two cases allow to retrieve entities in a given bounding box, or get the bounding box of
a given entity. 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 123. 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.
24 Gmsh 3.0

4.2.2 Character expressions


Character expressions are defined as:
char-expression :
"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 153. 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). StrReplace’s 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.
Chapter 4: General tools 25

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.
Character expressions are mostly used to specify non-numeric options and input/output file
names. See Section A.8 [t8.geo], page 137, for an interesting usage of char-expressions in
an animation script.
List of character expressions are defined as:
char-expression-list :
char-expression <,...>

4.2.3 Color expressions


Colors expressions are hybrids between fixed-length braced expression-lists and strings:
color-expression :
char-expression |
{ expression, expression, expression } |
{ expression, expression, expression, expression } |
color-option
The first case permits to use the X Windows names to refer to colors, e.g., Red, SpringGreen,
LavenderBlush3, . . . (see Common/Colors.h in the source code for a complete list). The
second case permits to define colors by using three expressions to specify their red, green
and blue components (with values comprised between 0 and 255). The third case permits
to define colors by using their red, green and blue color components as well as their alpha
channel. The last case permits to use the value of a color-option as a color-expression. The
various color-options are listed in Appendix B [Options], page 153.
See Section A.3 [t3.geo], page 127, for an example of the use of color expressions.

4.3 Operators
Gmsh’s 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.
26 Gmsh 3.0

+ Addition.
- Subtraction.
== Equality.
!= Inequality.
> Greater.
>= Greater or equality.
< Less.
<= Less or equality.
&& Logical ‘and’.
|| 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 only ternary operator, formed by operator-ternary-left and operator-


ternary-right, returns the value of its second argument if the first argument is
non-zero; otherwise it returns the value of its third argument.

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

4.4 Built-in functions


A built-in function is composed of an identifier followed by a pair of parentheses containing
an expression-list, the list of its arguments. This list of arguments can also be provided in
between brackets, instead of parentheses. Here is the list of the built-in functions currently
implemented:
build-in-function:
Acos ( expression )
Arc cosine (inverse cosine) of an expression in [-1,1]. Returns a value in [0,Pi].
Asin ( expression )
Arc sine (inverse sine) of an expression in [-1,1]. Returns a value in [-Pi/2,Pi/2].
Atan ( expression )
Arc tangent (inverse tangent) of expression. Returns a value in [-Pi/2,Pi/2].
Atan2 ( expression, expression )
Arc tangent (inverse tangent) of the first expression divided by the second.
Returns a value in [-Pi,Pi].
Ceil ( expression )
Rounds expression up to the nearest integer.
Cos ( expression )
Cosine of expression.
Cosh ( expression )
Hyperbolic cosine of expression.
Exp ( expression )
Returns the value of e (the base of natural logarithms) raised to the power of
expression.
Fabs ( expression )
Absolute value of expression.
Fmod ( expression, expression )
Remainder of the division of the first expression by the second, with the sign
of the first.
Floor ( expression )
Rounds expression down to the nearest integer.
Hypot ( expression, expression )
Returns the square root of the sum of the square of its two arguments.
Log ( expression )
Natural logarithm of expression (expression > 0).
Log10 ( expression )
Base 10 logarithm of expression (expression > 0).
Modulo ( expression, expression )
see Fmod( expression, expression ).
28 Gmsh 3.0

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.

4.5 User-defined macros


User-defined macros take no arguments, and are evaluated as if a file containing the macro
body was included at the location of the Call statement.
Macro string | char-expression
Begins the declaration of a user-defined macro named string. The body of
the macro starts on the line after ‘Macro string ’, and can contain any Gmsh
command. A synonym for Macro is Function.
Return Ends the body of the current user-defined macro. Macro declarations cannot
be imbricated.
Call string | char-expression ;
Executes the body of a (previously defined) macro named string.
See Section A.5 [t5.geo], page 132, for an example of a user-defined macro. A shortcoming
of Gmsh’s scripting language is that all variables are “public”. Variables defined inside the
body of a macro will thus be available outside, too!

4.6 Loops and conditionals


Loops and conditionals are defined as follows, and can be imbricated:
For ( expression : expression )
Iterates from the value of the first expression to the value of the second expres-
sion, with a unit incrementation step. At each iteration, the commands com-
prised between ‘For ( expression : expression )’ and the matching EndFor
are executed.
For ( expression : expression : expression )
Iterates from the value of the first expression to the value of the second expres-
sion, with a positive or negative incrementation step equal to the third expres-
sion. At each iteration, the commands comprised between ‘For ( expression
: expression : expression )’ and the matching EndFor are executed.
Chapter 4: General tools 29

For string In { expression : expression }


Iterates from the value of the first expression to the value of the second expres-
sion, with a unit incrementation step. At each iteration, the value of the iterate
is affected to an expression named string, and the commands comprised between
‘For string In { expression : expression }’ and the matching EndFor are
executed.
For string In { expression : expression : expression }
Iterates from the value of the first expression to the value of the second ex-
pression, with a positive or negative incrementation step equal to the third
expression. At each iteration, the value of the iterate is affected to an ex-
pression named string, and the commands comprised between ‘For string In
{ expression : expression : expression }’ and the matching EndFor are
executed.
EndFor Ends a matching For command.
If ( expression )
The body enclosed between ‘If ( expression )’ and the matching ElseIf,
Else or EndIf, is evaluated if expression is non-zero.
ElseIf ( expression )
The body enclosed between ‘ElseIf ( expression )’ and the next matching
ElseIf, Else or EndIf, is evaluated if expression is non-zero and none of the
expression of the previous matching codes If and ElseIf were non-zero.
Else The body enclosed between Else and the matching EndIf is evaluated if none
of the expression of the previous matching codes If and ElseIf were non-zero.
EndIf Ends a matching If command.
See Section A.5 [t5.geo], page 132, for an example of For and If commands. Gmsh does
not provide any Else (or similar) command at the time of this writing.

4.7 General commands


The following commands can be used anywhere in a Gmsh script:
string = expression ;
Creates a new expression identifier string, or affects expression to an existing
expression identifier. Thirteen expression identifiers are predefined (hardcoded
in Gmsh’s parser):
Pi Returns 3.1415926535897932.
GMSH_MAJOR_VERSION
Returns Gmsh’s major version number.
GMSH_MINOR_VERSION
Returns Gmsh’s minor version number.
GMSH_PATCH_VERSION
Returns Gmsh’s patch version number.
30 Gmsh 3.0

MPI_Size Returns the number of processors on which Gmsh is running. It


is always 1, except if you compiled Gmsh with ENABLE_MPI (see
Appendix C [Compiling the source code], page 233).
MPI_Rank Returns the rank of the current processor.
Cpu Returns the current CPU time (in seconds).
Memory Returns the current memory usage (in Mb).
TotalMemory
Returns the total memory available (in Mb).
newp Returns the next available point number. As explained in Chapter 5
[Geometry module], page 35, a unique number must be associated
with every geometrical point: newp permits to know the highest
number already attributed (plus one). This is mostly useful when
writing user-defined macros (see Section 4.5 [User-defined macros],
page 28) or general geometric primitives, when one does not know
a priori which numbers are already attributed, and which ones are
still available.
newl Returns the next available line number.
news Returns the next available surface number.
newv Returns the next available volume number.
newll Returns the next available line loop number.
newsl Returns the next available surface loop number.
newreg Returns the next available region number. That is, newreg returns
the maximum of newp, newl, news, newv, newll, newsl and all
physical entity numbers2 .
string = { };
Creates a new expression list identifier string with an empty list.
string [] = { expression-list };
Creates a new expression list identifier string with the list expression-list, or
affects expression-list to an existing expression list identifier. Parentheses are
also allowed instead of square brackets; although not recommended, brackets
and parentheses can also be completely ommitted.
string [ { expression-list } ] = { expression-list };
Affects each item in the right hand side expression-list to the elements (indexed
by the left hand side expression-list) of an existing expression list identifier.
The two expression-lists must contain the same number of items. Parentheses
can also be used instead of brackets.
string += expression ;
Adds and affects expression to an existing expression identifier.
2
For compatibility purposes, the behavior of newl, news, newv and newreg can be modified with the
Geometry.OldNewReg option (see Section B.2 [Geometry options list], page 181).
Chapter 4: General tools 31

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

http://onelab.info/wiki/ONELAB_Syntax_for_Gmsh_and_GetDP for more


information.
SetNumber( char-expression , expression );
Sets the value a numeric ONELAB variable char-expression.
SetString( char-expression , char-expression );
Sets the value a string ONELAB variable char-expression.
real-option = expression ;
Affects expression to a real option.
char-option = char-expression ;
Affects char-expression to a character option.
color-option = color-expression ;
Affects color-expression to a color option.
real-option += expression ;
Adds and affects expression to a real option.
real-option -= expression ;
Subtracts and affects expression to a real option.
real-option *= expression ;
Multiplies and affects expression to a real option.
real-option /= expression ;
Divides and affects expression to a real option.
Abort; Aborts the current script.
Exit; Exits Gmsh.
CreateDir char-expression ;
Create the directory char-expression.
Printf ( char-expression <, expression-list > );
Prints a character expression in the information window and/or on the ter-
minal. Printf is equivalent to the printf C function: char-expression is a
format string that can contain formatting characters (%f, %e, etc.). Note that
all expressions are evaluated as floating point values in Gmsh (see Section 4.2
[Expressions], page 21), so that only valid floating point formatting charac-
ters make sense in char-expression. See Section A.5 [t5.geo], page 132, for an
example of the use of Printf.
Printf ( char-expression , expression-list ) > char-expression ;
Same as Printf above, but output the expression in a file.
Printf ( char-expression , expression-list ) >> char-expression ;
Same as Printf above, but appends the expression at the end of the file.
Error ( char-expression <, expression-list > );
Same as Printf, but raises an error.
Chapter 4: General tools 33

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 153). If the path in
34 Gmsh 3.0

char-expression is not absolute, char-expression is appended to the path of the


current file.
Sleep expression ;
Suspends the execution of Gmsh during expression seconds.
SystemCall char-expression ;
Executes a (blocking) system call.
NonBlockingSystemCall char-expression ;
Executes a (non-blocking) system call.
OnelabRun ( char-expression <, char-expression > )
Runs a ONELAB client (first argument is the client name, second optional
arguement is the command line).
SetName char-expression ;
Changes the name of the current model.
SetFactory(char-expression );
Changes the current geometry kernel. Currently available kernels: "Built-in"
and "OpenCASCADE".
SyncModel;
Forces an immediate transfer from the old geometrical database into the new
one (this transfer normally occurs right after a file is read).
NewModel;
Creates a new current model.
Include char-expression ;
Includes the file named char-expression at the current position in the input
file. The include command should be given on a line of its own. If the path in
char-expression is not absolute, char-expression is appended to the path of the
current file.

4.8 General options


The list of all the general char-options, real-options and color-options (in that order—check
the default values to see the actual types) is given in Section B.1 [General options list],
page 153. Most of these options are accessible in the GUI, but not all of them. When
running Gmsh interactively, changing an option in the script file will modify the option in
the GUI in real time. This permits for example to resize the graphical window in a script,
or to interact with animations in the script and in the GUI at the same time.
Chapter 5: Geometry module 35

5 Geometry module

Gmsh’s 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 Gmsh’s 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”
entities. These physical entities cannot be modified by geometry commands: their only
purpose is to assemble elementary entities into larger groups 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 Geometry commands


The next subsections describe all the available geometry commands. These commands can
be used anywhere in a Gmsh script file. Note that the following general syntax rule is
followed for the definition of geometrical entities: “If an expression defines a new entity, it
is enclosed between parentheses. If an expression refers to a previously defined entity, it is
enclosed between braces.”

5.1.1 Points
Point ( expression ) = { expression, expression, expression <, expression > };
Creates an elementary point. The expression inside the parentheses is the
point’s 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

Physical Point ( expression | char-expression <, expression > ) <+|->= {


expression-list };
Creates a physical point. The expression inside the parentheses is the physical
point’s identification number; the expression-list on the right hand side should
contain the identification numbers of all the elementary points that need to be
grouped inside the physical point. If a char-expression is given instead instead of
expression inside the parentheses, a string label is associated with the physical
identification number, which can be either provided explicitly (after the comma)
or not (in which case a unique identification number is automatically created).

5.1.2 Lines
Line ( expression ) = { expression, expression };
Creates a straight line segment. The expression inside the parentheses is the
line segment’s 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
loop’s 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.)

Wire ( expression ) = { expression-list };


Creates a path made of lines. Wires are only available with the OpenCASCADE
kernel. They are used to create ThruSections and extrusions along paths.

Compound Line ( expression ) = { expression-list };


Creates a compound line from several elementary lines. When meshed, a com-
pound line will be reparametrized as a single line, whose mesh can thus cross
internal boundaries. The expression inside the parentheses is the compound
line’s identification number; the expression-list on the right hand side contains
the identification number of the elementary lines that should be reparametrized
as a single line. See Compound Surface for additional information on compound
entities.

Physical Line ( expression | char-expression <, expression > ) <+|->= {


expression-list };
Creates a physical line. The expression inside the parentheses is the physical
line’s identification number; the expression-list on the right hand side should
contain the identification numbers of all the elementary lines that need to be
grouped inside the physical line. If a char-expression is given instead instead of
expression inside the parentheses, a string label is associated with the physical
identification number, which can be either provided explicitly (after the comma)
or not (in which case a unique identification number is automatically created).
Specifying negative identification numbers in the expression-list will reverse the
orientation of the mesh elements belonging to the corresponding elementary
lines in the saved mesh file.

5.1.3 Surfaces
Plane Surface ( expression ) = { expression-list };
Creates a plane surface. The expression inside the parentheses is the plane
surface’s 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

Surface ( expression ) = { expression-list } < In Sphere { expression } >;


Creates a surface filling. With the built-in kernel, the first line loop should be
composed of either three or four elementary lines. With the built-in kernel, the
optional In Sphere argument forces the surface to be a spherical patch (the
extra parameter gives the identification number of the center of the sphere).
Disk ( expression ) = { expression-list };
Creates a disk. When four expressions are provided on the right hand side (3
coordinates of the center and the radius), the disk is circular. A fifth expression
defines the radius along Y, leading to an ellipse. Disk is only available with the
OpenCASCADE kernel.
Rectangle ( expression ) = { expression-list };
Creates a rectangle. The 3 first expressions define the lower-left corner; the
next 2 define the width and height. If a 6th expression is provided, it defines
a radius to round the rectangle corners. Rectangle is only available with the
OpenCASCADE kernel.
Surface Loop ( expression ) = { expression-list };
Creates a surface loop (a shell). The expression inside the parentheses is the
surface loop’s identification number; the expression-list on the right hand side
should contain the identification numbers of all the elementary surfaces that
constitute the surface loop. A surface loop must always represent a closed shell,
and the elementary surfaces should be oriented consistently (using negative
identification numbers to specify reverse orientation). (Surface loops are used
to create volumes: see Section 5.1.4 [Volumes], page 39.)
Compound Surface ( expression ) = { expression-list } < Boundary { {
expression-list }, { expression-list }, { expression-list }, { expression-list
}}>;
Creates a compound surface from several elementary surfaces. When meshed,
a compound surface will be reparametrized as a single surface, whose mesh
can thus cross internal boundaries. Compound surfaces are mostly useful for
remeshing discrete models; see “J.-F. Remacle, C. Geuzaine, G. Compere and
E. Marchandise, High Quality Surface Remeshing Using Harmonic Maps, In-
ternational Journal for Numerical Methods in Engineering, 2009” for details as
well as the wiki for more examples. The expression inside the parentheses is the
compound surface’s identification number; the mandatory expression-list on the
right hand side contains the identification number of the elementary surfaces
that should be reparametrized as a single surface.
Physical Surface ( expression | char-expression <, expression > ) <+|->= {
expression-list };
Creates a physical surface. The expression inside the parentheses is the physical
surface’s identification number; the expression-list on the right hand side should
contain the identification numbers of all the elementary surfaces that need to
be grouped inside the physical surface. If a char-expression is given instead
instead of expression inside the parentheses, a string label is associated with the
physical identification number, which can be either provided explicitly (after the
comma) or not (in which case a unique identification number is automatically
Chapter 5: Geometry module 39

created). Specifying negative identification numbers in the expression-list will


reverse the orientation of the mesh elements belonging to the corresponding
elementary surfaces in the saved mesh file.

5.1.4 Volumes
Volume ( expression ) = { expression-list };
Creates a volume. The expression inside the parentheses is the volume’s 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.
Box ( expression ) = { expression-list };
Creates a box, defined by the 3 coordinates of a point and the 3 extents. Box
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, the 3 components of the vector defining its axis and its radius. 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

Ruled ThruSections ( expression ) = { expression-list };


Same as ThruSections, but the surfaces creates on the boundary are forced
to be ruled. Ruled ThruSections is only available with the OpenCASCADE
kernel.
Compound Volume ( expression ) = { expression-list };
Creates a compound volume from several elementary volumes. When meshed,
a compound volume will be reparametrized as a single volume, whose mesh
can thus cross internal boundaries. The expression inside the parentheses is the
compound volume’s identification number; the expression-list on the right hand
side contains the identification number of the elementary volumes that should
be reparametrized as a single volume. See Compound Surface for additional
information on compound entities.
Physical Volume ( expression | char-expression <, expression > ) <+|->= {
expression-list };
Creates a physical volume. The expression inside the parentheses is the physical
volume’s identification number; the expression-list on the right hand side should
contain the identification numbers of all the elementary volumes that need to be
grouped inside the physical volume. If a char-expression is given instead instead
of expression inside the parentheses, a string label is associated with the physical
identification number, which can be either provided explicitly (after the comma)
or not (in which case a unique identification number is automatically created).

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. ThruSections is only
available with the OpenCASCADE kernel.
Ruled ThruSections { expression-list }
Creates ruled surfaces through the given line loops or wires. Ruled
ThruSections is 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 181).

5.1.6 Boolean operations


Boolean operations can be applied on lines, surfaces and volumes. All boolean operation act
on two lists of elementary entities. The first list represents the object; the second represents
the tool. The general syntax for boolean operations is as follows:
boolean:
BooleanIntersection { boolean-list } { boolean-list }
Computes the intersection of the object and the tool.
42 Gmsh 3.0

BooleanUnion { boolean-list } { boolean-list }


Computes the union of the object and the tool.
BooleanDifference { boolean-list } { boolean-list }
Subtract the tool from the object.
BooleanFragments { boolean-list } { boolean-list }
Computes all the fragments resulting from the intersection of the entities in the
object and in the tool, and makes all interfaces unique.

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:

BooleanIntersection ( expression ) = { boolean-list } { boolean-list };


Computes the intersection of the object and the tool and assign the result the
identification number expression.
BooleanUnion { boolean-list } { boolean-list }
Computes the union of the object and the tool and assign the result the iden-
tification number expression.
BooleanDifference { boolean-list } { boolean-list }
Subtract the tool from the object and assign the result the identification number
expression.

Again, see demos/boolean for examples.


Boolean operations are only available with the OpenCASCADE geometry kernel.

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:

Dilate { { expression-list }, expression } { transform-list }


Scales all elementary entities in transform-list by a factor expression. The
expression-list should contain three expressions giving the X, Y, and Z coordi-
nates of the center of the homothetic transformation.
Chapter 5: Geometry module 43

Dilate { { expression-list }, { expression, expression, expression } } {


transform-list }
Scales all elementary entities in transform-list using different factors along X,
Y and Z (the three expressions). The expression-list should contain three
expressions giving the X, Y, and Z coordinates of the center of the homoth-
etic transformation.
Rotate { { expression-list }, { expression-list }, expression } {
transform-list }
Rotates all elementary entities in transform-list by an angle of expression radi-
ans. 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.
Symmetry { expression-list } { transform-list }
Transforms all elementary entities symmetrically to a plane. The expression-list
should contain four expressions giving the coefficients of the plane’s equation.
Translate { expression-list } { transform-list }
Translates all elementary entities in transform-list. The expression-list should
contain three expressions giving the X, Y and Z components of the translation
vector.
Boundary { transform-list }
(Not a transformation per-se.) Returns the entities on the boundary of the ele-
mentary entities in transform-list, with signs indicating their orientation in the
boundary. To get unsigned tags (e.g. to reuse the output in other commands),
apply the Abs function on the returned list.
CombinedBoundary { transform-list }
(Not a transformation per-se.) Returns the boundary of the elementary entities,
combined as if a single entity, in transform-list. Useful to compute the boundary
of a complex part.
PointsOf { transform-list }
(Not a transformation per-se.) Returns all the geometrical points on the bound-
ary of the elementary entities. Useful to compute the boundary of a complex
part.
with
transform-list :
Point | Line | Surface | Volume { expression-list }; ... |
Duplicata { Point | Line | Surface | Volume { expression-list }; ... } |
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 with the built-in geometry kernel Gmsh executes
44 Gmsh 3.0

the Coherence command automatically after each geometrical transformation,


unless Geometry.AutoCoherence is set to zero (see Section B.2 [Geometry op-
tions list], page 181). With the OpenCASCADE geoemtry kernel, Coherence
is simply a shortcut for a BooleanFragments operation on all entities.
< Recursive > Delete { Point | Line | Surface | Volume { expression-list }; ... }
Deletes all elementary entities whose identification numbers are given in
expression-list. If an entity is linked to another entity (for example, if a point
is used as a control point of a curve), Delete has no effect (the line will have
to be deleted before the point can). The Recursive variant deletes the entities
as well as all its sub-entities of lower dimension.
< Recursive > Hide { Point | Line | Surface | Volume { expression-list }; ... }
Hide the entities listed in expression-list, if General.VisibilityMode is set to
0 or 1.
Hide char-expression ;
Hide the entity char-expression, if General.VisibilityMode is set to 0 or 1
(char-expression can for example be "*").
< Recursive > Show { Point | Line | Surface | Volume { expression-list }; ... }
Show the entities listed in expression-list, if General.VisibilityMode is set to
0 or 1.
Show char-expression ;
Show the entity char-expression, if General.VisibilityMode is set to 0 or 1
(char-expression can for example be "*").

5.2 Geometry options


The list of all the options that control the behavior of geometry commands, as well as the
way geometrical entities are handled in the GUI, is give in Section B.2 [Geometry options
list], page 181.
Chapter 6: Mesh module 45

6 Mesh module
Gmsh’s 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 66). 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 66).
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 189).
However, beware that the quality of subdivided elements initially generated with an un-
structured algorithm can be quite poor.

6.1 Choosing the right unstructured algorithm


Gmsh currently provides a choice between three 2D unstructured algorithms and between
two 3D unstructured algorithms. Each algorithm has its own advantages and disadvantages.
For all 2D unstructured algorithms a Delaunay mesh that contains all the points of the
1D mesh is initially constructed using a divide-and-conquer algorithm1 . Missing edges are
recovered using edge swaps2 . After this initial step three different algorithms can be applied
to generate the final mesh:
1. The “MeshAdapt” algorithm3 is based on local mesh modifications. This technique
makes use of edge swaps, splits, and collapses: long edges are split, short edges are
collapsed, and edges are swapped if a better geometrical configuration is obtained.
2. The “Delaunay” algorithm is inspired by the work of the GAMMA team at INRIA4 .
New points are inserted sequentially at the circumcenter of the element that has the
largest adimensional circumradius. The mesh is then reconnected using an anisotropic
Delaunay criterion.
3. The “Frontal” algorithm is inspired by the work of S. Rebay5 .
These algorithms can be ranked as follows:
1
R. A. Dwyer, A simple divide-and-conquer algorithm for computing Delaunay triangulations in O(n log
n) expected time, In Proceedings of the second annual symposium on computational geometry, Yorktown
Heights, 2–4 June 1986.
2
N. P. Weatherill, The integrity of geometrical boundaries in the two-dimensional Delaunay triangulation,
Commun. Appl. Numer. Methods 6(2), pp. 101–109, 1990.
3
C. Geuzaine and J.-F. Remacle, Gmsh: a three-dimensional finite element mesh generator with built-in
pre- and post-processing facilities, International Journal for Numerical Methods in Engineering 79(11), pp.
1309–1331, 2009.
4
P.-L. George and P. Frey, Mesh generation, Hermes, Lyon, 2000.
5
S. Rebay, Efficient unstructured mesh generation by means of Delaunay triangulation and Bowyer-Watson
algorithm, J. Comput. Phys. 106, pp. 25–138, 1993.
46 Gmsh 3.0

Robustness Performance Element quality


MeshAdapt 1 3 2
Delaunay 2 1 2
Frontal 3 2 1
For very complex curved surfaces the “MeshAdapt” algorithm is the best choice. When
high element quality is important, the “Frontal” algorithm should be tried. For very large
meshes of plane surfaces the “Delaunay” algorithm is the fastest.
The “Automatic” algorithm tries to select the best algorithm automatically for each surface
in the model. As of Gmsh 2.8, the “Automatic” algorithm selects “Delaunay” for plane
surfaces and “MeshAdapt” for all other surfaces.
In 3D two unstructured algorithms are available:
1. The “Delaunay” algorithm is split into two separate steps. First, an initial mesh of the
union of all the volumes in the model is performed using H. Si’s Tetgen algorithm6 .
Then a three-dimensional version of the 2D Delaunay algorithm described above is
applied.
2. The “Frontal” algorithm uses J. Schoeberl’s Netgen algorithm7 .
The “Delaunay” algorithm is the most robust and the fastest, and is the only one that
supports the Field mechanism to specify element sizes (see Section 6.3.1 [Specifying mesh
element sizes], page 47). However, this algorithm will sometimes modify the surface mesh,
and is thus not suitable for producing hybrid structured/unstructured grids. In that case
the “Frontal” algorithm should be preferred. The quality of the elements produced by both
algorithms is comparable. If element quality is important the mesh optimizer(s) should be
applied.

6.2 Elementary vs. physical entities


If only elementary geometrical entities are defined (or if the Mesh.SaveAll option is set;
see Section B.3 [Mesh options list], page 189), the grid produced by the mesh module will
be saved “as is”. That is, all the elements in the grid will be saved using the identification
number of the elementary entities they discretize as their elementary region number (and 0
as their physical region number8 ; Chapter 9 [File formats], page 105). This can sometimes
be inconvenient:
• mesh elements cannot be duplicated;
• the orientation of the mesh elements (the ordering of their nodes) is determined by the
orientation of their “parent” elementary entities;
• elements belonging to different elementary entities cannot be linked as being part of
a larger group having a physical or mathematical meaning (like ‘Left wing’, ‘Metallic
part’, ‘Dirichlet boundary condition’, . . . ).
To remedy these problems, the geometry module (see Chapter 5 [Geometry module],
page 35) introduces the notion of “physical” entities (also called “physical groups”).
6
H. Si, Tetgen: a quality tetrahedral mesh generator and three-dimensional Delaunay triangulator, 2004.
7
J. Schoeberl, Netgen, an advancing front 2d/3d-mesh generator based on abstract rules, Comput. Visual.
Sci., 1, pp. 41–52, 1997.
8
This behaviour was introduced in Gmsh 2.0. In older versions, both the elementary and the physical region
numbers would be set to the identification number of the elementary region.
Chapter 6: Mesh module 47

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 when
they are save into a mesh file. 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 105), 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.
Note that in some mesh file formats 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 can thus differ from the ones saved in the mesh
files, depending on the format. To check the actual numbers saved in the output file just
load the file back using ‘File->Open’.

6.3 Mesh commands


The mesh module commands mostly permit to modify the mesh element sizes and specify
structured grid parameters. The actual mesh “actions” (i.e., “mesh the lines”, “mesh the
surfaces” and “mesh the volumes”) cannot be specified in the script files. They have to be
given either in the GUI or on the command line (see Chapter 3 [Running Gmsh on your
system], page 11, and Section 3.3 [Command-line options], page 12).

6.3.1 Specifying mesh element sizes


There are three ways to specify the size of the mesh elements for a given geometry:
1. First, if Mesh.CharacteristicLengthFromPoints is set (it is by default), you can
simply specify desired mesh element sizes at the geometrical points of the model (with
the Point command: see Section 5.1.1 [Points], page 35). The size of the mesh elements
will then be computed by linearly interpolating these values on the initial mesh (see
Section 1.2 [Mesh], page 5). This might sometimes lead to over-refinement in some
areas, so that you may have to add “dummy” geometrical entities in the model in
order to get the desired element sizes.
This method works with all the algorithms implemented in the mesh module. The final
element sizes are of course constrained by the structured algorithms for which the ele-
ment sizes are explicitly specified (e.g., transfinite and extruded grids: see Section 6.3.2
[Structured grids], page 63).
2. Second, if Mesh.CharacteristicLengthFromCurvature is set (it is not by default),
the mesh will be adapted with respect to the curvature of the geometrical entities.
3. Finally, you can specify general mesh size “fields”. Various fields exist:
• A PostView field specifies an explicit background mesh in the form of a scalar
post-processing view (see Section 8.1 [Post-processing commands], page 72, and
Chapter 9 [File formats], page 105) in which the nodal values are the target element
sizes. This method is very general but it requires a first (usually rough) mesh and a
way to compute the target sizes on this mesh (usually through an error estimation
procedure, in an iterative process of mesh adaptation). Warning: only parsed
(‘.pos’) files can currently be used as background meshes (‘.msh’ files cannot be
48 Gmsh 3.0

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 189)
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

||dX||^2 < R^2 &&


dX = (X - XC)^2 + (Y-YC)^2 + (Z-ZC)^2
Options:

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

YCenter Y coordinate of the ball center


type: float
default value: 0
ZCenter Z coordinate of the ball center
type: float
default value: 0
BoundaryLayer
hwall * ratio^(dist/hwall)
Options:

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

type: list double


default value: {}
ratio Size Ratio Between Two Successive Layers
type: float
default value: 1.1
thickness
Maximal thickness of the boundary layer
type: float
default value: 0.01
Box The value of this field is VIn inside the box, VOut outside the box. The box is
given by

Xmin <= x <= XMax &&


YMin <= y <= YMax &&
ZMin <= z <= ZMax
Options:

VIn Value inside the box


type: float
default value: 0
VOut Value outside the box
type: float
default value: 0
XMax Maximum X coordinate of the box
type: float
default value: 0
XMin Minimum X coordinate of the box
type: float
default value: 0
YMax Maximum Y coordinate of the box
type: float
default value: 0
YMin Minimum Y coordinate of the box
type: float
default value: 0
ZMax Maximum Z coordinate of the box
type: float
default value: 0
ZMin Minimum Z coordinate of the box
type: float
default value: 0
Chapter 6: Mesh module 53

Curvature
Compute the curvature of Field[IField]:

F = div(norm(grad(Field[IField])))
Options:

Delta Step of the finite differences


type: float
default value: 0
IField Field index
type: integer
default value: 1
Cylinder The value of this field is VIn inside a frustrated cylinder, VOut outside. The
cylinder is given by

||dX||^2 < R^2 &&


(X-X0).A < ||A||^2
dX = (X - X0) - ((X - X0).A)/(||A||^2) . A
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

ZAxis Z component of the cylinder axis


type: float
default value: 1
ZCenter Z coordinate of the cylinder center
type: float
default value: 0
Distance 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:

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: {}
ExternalProcess
**This Field is experimental**
Call an external process that received coordinates triple (x,y,z) as binary double
precision numbers on stdin and is supposed to write the field value on stdout
Chapter 6: Mesh module 55

as a binary double precision number.


NaN,NaN,NaN is sent as coordinate to indicate the end of the process.

Example of client (python2):


import os
import struct
import math
import sys
if sys.platform == "win32" :
import msvcrt
msvcrt.setmode(0, os.O BINARY)
msvcrt.setmode(1, os.O BINARY)
while(True):
xyz = struct.unpack("ddd", os.read(0,24))
if math.isnan(xyz[0]):
break
f = 0.001 + xyz[1]*0.009
os.write(1,struct.pack("d",f))

Example of client (python3):


import struct
import sys
import math
while(True):
xyz = struct.unpack("ddd", sys.stdin.buffer.read(24))
if math.isnan(xyz[0]):
break
f = 0.001 + xyz[1]*0.009
sys.stdout.buffer.write(struct.pack("d",f))
sys.stdout.flush()

Example of client (c, unix):


#include <unistd.h>
int main(int argc, char **argv) {
double xyz[3];
while(read(STDIN FILENO, &xyz, 3*sizeof(double)) == 3*sizeof(double))
{
if (xyz[0] != xyz[0]) break; //nan
double f = 0.001 + 0.009 * xyz[1];
write(STDOUT FILENO, &f, sizeof(double));
}
return 0;
}

Example of client (c, windows):


#include <stdio.h>
#include <io.h>
56 Gmsh 3.0

#include <fcntl.h>
int main(int argc, char **argv) {
double xyz[3];
setmode(fileno(stdin),O BINARY);
setmode(fileno(stdout),O BINARY);
while(read(fileno(stdin), &xyz, 3*sizeof(double)) == 3*sizeof(double)) {
if (xyz[0] != xyz[0])
break;
double f = f = 0.01 + 0.09 * xyz[1];
write(fileno(stdout), &f, sizeof(double));
}
}

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:

R1_inner Inner radius of Frustum at endpoint 1


type: float
default value: 0

R1_outer Outer radius of Frustum at endpoint 1


type: float
default value: 1

R2_inner Inner radius of Frustum at endpoint 2


type: float
default value: 0

R2_outer Outer radius of Frustum at endpoint 2


type: float
default value: 1

V1_inner Element size at point 1, inner radius


type: float
default value: 0.1
Chapter 6: Mesh module 57

V1_outer Element size at point 1, outer radius


type: float
default value: 1
V2_inner Element size at point 2, inner radius
type: float
default value: 0.1
V2_outer Element size at point 2, outer radius
type: float
default value: 1
X1 X coordinate of endpoint 1
type: float
default value: 0
X2 X coordinate of endpoint 2
type: float
default value: 0
Y1 Y coordinate of endpoint 1
type: float
default value: 0
Y2 Y coordinate of endpoint 2
type: float
default value: 0
Z1 Z coordinate of endpoint 1
type: float
default value: 1
Z2 Z coordinate of endpoint 2
type: float
default value: 1.455171629957881e-152
Gradient Compute the finite difference gradient of Field[IField]:

F = (Field[IField](X + Delta/2) - Field[IField](X - Delta/2)) / Delta


Options:

Delta Finite difference step


type: float
default value: 0
IField Field index
type: integer
default value: 1
Kind Component of the gradient to evaluate: 0 for X, 1 for Y, 2 for Z, 3
for the norm
type: integer
default value: 0
58 Gmsh 3.0

IntersectAniso
Take the intersection of 2 anisotropic fields according to Alauzet.
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),

where G=Field[IField] and d=Delta


Options:

Delta Finite difference step


type: float
default value: 0.1
IField Field index
type: integer
default value: 1
LonLat Evaluate Field[IField] in geographic coordinates (longitude, latitude):

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
IField Index of the field to evaluate.
type: integer
default value: 1
RadiusStereo
radius of the sphere of the stereograpic coordinates
type: float
default value: 6371000
MathEval Evaluate a mathematical expression. The expression can contain x, y, z for
spatial coordinates, F0, F1, ... for field values, and and mathematical functions.
Chapter 6: Mesh module 59

Options:

F Mathematical function to evaluate.


type: string
default value: "F2 + Sin(z)"
MathEvalAniso
Evaluate a metric expression. The expressions can contain x, y, z for spatial
coordinates, F0, F1, ... for field values, and and mathematical functions.
Options:

m11 element 11 of the metric tensor.


type: string
default value: "F2 + Sin(z)"
m12 element 12 of the metric tensor.
type: string
default value: "F2 + Sin(z)"
m13 element 13 of the metric tensor.
type: string
default value: "F2 + Sin(z)"
m22 element 22 of the metric tensor.
type: string
default value: "F2 + Sin(z)"
m23 element 23 of the metric tensor.
type: string
default value: "F2 + Sin(z)"
m33 element 33 of the metric tensor.
type: string
default value: "F2 + Sin(z)"
Max Take the maximum value of a list of fields.
Options:

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:
60 Gmsh 3.0

Delta Step used for the finite differences


type: float
default value: 0
IField Field index
type: integer
default value: 1
Mean Simple smoother:

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:

Delta Distance used to compute the mean value


type: float
default value: 0.0001
IField Field index
type: integer
default value: 0
Min Take the minimum value of a list of fields.
Options:

FieldsList
Field indices
type: list
default value: {}
MinAniso Take the intersection of a list of possibly anisotropic fields.
Options:

FieldsList
Field indices
type: list
default value: {}
Octree Pre compute another field on an octree to speed-up evalution
Options:

InField Id of the field to use as x coordinate.


type: integer
default value: 1752631850
Chapter 6: Mesh module 61

Param Evaluate Field IField in parametric coordinates:

F = Field[IField](FX,FY,FZ)

See the MathEval Field help to get a description of valid FX, FY and FZ
expressions.
Options:

FX X component of parametric function


type: string
default value: ""
FY Y component of parametric function
type: string
default value: ""
FZ Z component of parametric function
type: string
default value: ""
IField Field index
type: integer
default value: 1
PostView Evaluate the post processing view IView.
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.
Options:

EdgesList
Curve indices
type: list
default value: {}
FacesList
Surface indices
type: list
default value: {}
62 Gmsh 3.0

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.

The format of the input file is:

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:

FileName Name of the input file


type: path
default value: ""

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
Chapter 6: Mesh module 63

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
DistMin Distance from entity up to which element size will be LcMin
type: float
default value: 1
IField Index of the field to evaluate
type: integer
default value: 0
LcMax Element size outside DistMax
type: float
default value: 1
LcMin Element size inside DistMin
type: float
default value: 0.1
Sigmoid True to interpolate between LcMin and LcMax using a sigmoid,
false to interpolate linearly
type: boolean
default value: 0
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

6.3.2 Structured grids


Extrude { expression-list } { extrude-list layers }
Extrudes both the geometry and the mesh using a translation (see Section 5.1.5
[Extrusions], page 40). The layers option determines how the mesh is extruded
and has the following syntax:
64 Gmsh 3.0

layers :
Layers { expression } |
Layers { { expression-list }, { expression-list } } |
Recombine < expression >; ...
QuadTriNoNewVerts <RecombLaterals>; |
QuadTriAddVerts <RecombLaterals>; ...
In the first Layers form, expression gives the number of elements to be cre-
ated in the (single) layer. In the second form, the first expression-list defines
how many elements should be created in each extruded layer, and the second
expression-list gives the normalized height of each layer (the list should contain
a sequence of n numbers 0 < h1 < h2 < . . . < hn <= 1). See Section A.3 [t3.geo],
page 127, for an example.
For line extrusions, the Recombine option will recombine triangles into quadran-
gles when possible. For surface extrusions, the Recombine option will recombine
tetrahedra into prisms, hexahedra or pyramids.
Please note that, starting with Gmsh 2.0, region numbers cannot be specified
explicitly anymore in Layers commands. Instead, as with all other geometry
commands, you must use the automatically created entity identifier created by
the extrusion command. For example, the following extrusion command will
return the id of the new “top” surface in num[0] and the id of the new volume
in num[1]:
num[] = Extrude {0,0,1} { Surface{1}; Layers{10}; };
QuadTriNoNewVerts and QuadTriAddVerts allow to connect structured, ex-
truded volumes containing quadrangle-faced elements to structured or unstruc-
tured tetrahedral volumes, by subdividing into triangles any quadrangles on
boundary surfaces shared with tetrahedral volumes. (They have no effect for
1D or 2D extrusions.) QuadTriNoNewVerts subdivides any of the region’s quad-
faced 3D elements that touch these boundary triangles into pyramids, prisms, or
tetrahedra as necessary, all WITHOUT adding new vertices. QuadTriAddVerts
works in a simular way, but subdivides 3D elements touching the boundary tri-
angles by adding a new vertex inside each element at the vertex-based centroid.
Either method results in a structured extrusion with an outer layer of subdi-
vided elements that interface the inner, unmodified elements to the triangle-
meshed region boundaries.
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
Chapter 6: Mesh module 65

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 normal’s 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 element–edges
actually touching the source vertex are counted twice). This allows the height
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.
Transfinite Line { expression-list } | "*" = expression < Using Progression |
Bump expression >;
Selects the lines in expression-list to be meshed with the 1D transfinite algo-
rithm. The expression on the right hand side gives the number of nodes that will
66 Gmsh 3.0

be created on the line (this overrides any other mesh element size prescription—
see Section 6.3.1 [Specifying mesh element sizes], page 47). The optional argu-
ment ‘Using Progression expression ’ instructs the transfinite algorithm to
distribute the nodes following a geometric progression (Progression 2 mean-
ing for example that each line element in the series will be twice as long as the
preceding one). The optional argument ‘Using Bump expression ’ instructs the
transfinite algorithm to distribute the nodes with a refinement at both ends of
the line.
Transfinite Surface { expression-list } | "*" < = { expression-list } > < Left |
Right | Alternate | AlternateRight | AlternateLeft > ;
Selects surfaces to be meshed with the 2D transfinite algorithm. The expression-
list on the right-hand-side should contain the identification numbers of three
or four points on the boundary of the surface that define the corners of the
transfinite interpolation. If no identification numbers are given, the transfinite
algorithm will try to find the corners automatically. The optional argument
specifies the way the triangles are oriented when the mesh is not recombined.
(Alternate is a synonym for AlternateRight).
Transfinite Volume { expression-list } | "*" < = { expression-list } > ;
Selects five- or six-face volumes to be meshed with the 3D transfinite algorithm.
The expression-list on the right-hand-side should contain the identification num-
bers of the six or eight points on the boundary of the volume that define the
corners of the transfinite interpolation. If no identification numbers are given,
the transfinite algorithm will try to find the corners automatically.
TransfQuadTri { expression-list } | "*";
Applies the transfinite QuadTri algorithm on the expression-list list of volumes
("*" can be used to apply TransfQuadTri to all existing volumes). A transfi-
nite volume with any combination of recombined and un-recombined transfinite
boundary surfaces is valid when meshed with TransfQuadTri. When applied
to non-Transfinite volumes, TransfQuadTri has no effect on those volumes.

6.3.3 Miscellaneous
Here is a list of all other mesh commands currently available:
Mesh expression ;
Generates expression-D mesh.
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.
Chapter 6: Mesh module 67

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.
SetPartition expression { Point | Line | Surface | Volume { expression-list };
... }
Sets the partition tag of the mesh elements in the entities in expression-list to
expression.
< Recursive > Color color-expression { Point | Line | Surface | Volume {
expression-list }; ... }
Sets the mesh color of the entities in expression-list to color-expression.
< Recursive > Hide { Point | Line | Surface | Volume { expression-list }; ... }
Hides the mesh of the entities in expression-list, if General.VisibilityMode
is set to 0 or 2.
Hide char-expression ;
Hides the mesh of the entity char-expression, if General.VisibilityMode is
set to 0 or 2 (char-expression can for example be "*").
68 Gmsh 3.0

Recombine Surface { expression-list } | "*" < = expression >;


Recombines the triangular meshes of the surfaces listed in expression-list into
mixed triangular/quadrangular meshes. The optional expression on the right
hand side specifies the maximum difference (in degrees) allowed between the
largest angle of a quadrangle and a right angle (a value of 0 would only accept
quadrangles with right angles; a value of 90 would allow degenerate quadrangles;
default value is 45).
MeshAlgorithm Surface { expression-list } = expression ;
Forces the meshing algorithm per surface.
Reverse Line | Surface { expression-list } | "*" ;
Reverses the mesh of the given line(s) or surface(s).
Save char-expression ;
Saves the mesh in a file named char-expression, using the current Mesh.Format
(see Section B.3 [Mesh options list], page 189). If the path in char-expression
is not absolute, char-expression is appended to the path of the current file.
< Recursive > Show { Point | Line | Surface | Volume { expression-list }; ... }
Shows the mesh of the entities in expression-list, if General.VisibilityMode
is set to 0 or 2.
Show char-expression ;
Shows the mesh of the entity char-expression, if General.VisibilityMode is
set to 0 or 2 (char-expression can for example be "*").
Smoother Surface { expression-list } = expression ;
Sets number of elliptic smoothing steps for the surfaces listed in expression-list
(smoothing only applies to transfinite meshes at the moment).
Homology ( { expression-list } ) { { expression-list } , { expression-list } };
Compute a basis representation for homology spaces after a mesh has been
generated. The first expression-list is a list of dimensions whose homology bases
are computed; if empty, all bases are computed. The second expression-list is
a list physical groups that constitute the computation domain; if empty, the
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.

6.4 Mesh options


The list of all the options that control the behavior of mesh commands, as well as the way
meshes are displayed in the GUI, is given in Section B.3 [Mesh options list], page 189.
Chapter 7: Solver module 69

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 207).
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.

7.1 Solver options


The list of all the solver options is given in Section B.4 [Solver options list], page 207.
Chapter 8: Post-processing module 71

8 Post-processing module

Gmsh’s 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 105), 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 Gmsh’s 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 213).
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 137, and
Section A.9 [t9.geo], page 140).
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 Gmsh’s 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 105.
72 Gmsh 3.0

8.1 Post-processing commands


Alias View[expression ];
Creates an alias of the expression-th post-processing view.
Note that Alias creates a logical duplicate of the view without actually du-
plicating the data in memory. This is very useful when you want multiple
simultaneous renderings of the same large dataset (usually with different dis-
play options), but you cannot afford to store all copies in memory. If what you
really want is multiple physical copies of the data, just merge the file containing
the post-processing view multiple times.
AliasWithOptions View[expression ];
Creates an alias of the expression-th post-processing view and copies all the
options of the expression-th view to the new aliased view.
CopyOptions View[expression, expression ];
Copy all the options from the first expression-th post-processing view to the
second one.
Combine ElementsByViewName;
Combines all the post-processing views having the same name into new views.
The combination is done “spatially”, i.e., simply by appending the elements at
the end of the new views.
Combine ElementsFromAllViews | Combine Views;
Combines all the post-processing views into a single new view. The combination
is done “spatially”, i.e., simply by appending the elements at the end of the
new view.
Combine ElementsFromVisibleViews;
Combines all the visible post-processing views into a single new view. The
combination is done “spatially”, i.e., simply by appending the elements at the
end of the new view.
Combine TimeStepsByViewName | Combine TimeSteps;
Combines the data from all the post-processing views having the same name
into new multi-time-step views. The combination is done “temporally”, i.e., as
if the data in each view corresponds to a different time instant. The combination
will fail if the meshes in all the views are not identical.
Combine TimeStepsFromAllViews;
Combines the data from all the post-processing views into a new multi-time-
step view. The combination is done “temporally”, i.e., as if the data in each
view corresponds to a different time instant. The combination will fail if the
meshes in all the views are not identical.
Combine TimeStepsFromVisibleViews;
Combines the data from all the visible post-processing views into a new multi-
time-step view. The combination is done “temporally”, i.e., as if the data in
each view corresponds to a different time instant. The combination will fail if
the meshes in all the views are not identical.
Chapter 8: Post-processing module 73

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 140, 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 129), 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 Gmsh’s 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 105, 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

Vector point VP 3 3 * nb-time-steps


Tensor point TP 3 9 * nb-time-steps
Scalar line SL 6 2 * nb-time-steps
Vector line VL 6 6 * nb-time-steps
Tensor line TL 6 18 * nb-time-steps
Scalar triangle ST 9 3 * nb-time-steps
Vector triangle VT 9 9 * nb-time-steps
Tensor triangle TT 9 27 * nb-time-steps
Scalar quadrangle SQ 12 4 * nb-time-steps
Vector quadrangle VQ 12 12 * nb-time-steps
Tensor quadrangle TQ 12 36 * nb-time-steps
Scalar tetrahedron SS 12 4 * nb-time-steps
Vector tetrahedron VS 12 12 * nb-time-steps
Tensor tetrahedron TS 12 36 * nb-time-steps
Scalar hexahedron SH 24 8 * nb-time-steps
Vector hexahedron VH 24 24 * nb-time-steps
Tensor hexahedron TH 24 72 * nb-time-steps
Scalar prism SI 18 6 * nb-time-steps
Vector prism VI 18 18 * nb-time-steps
Tensor prism TI 18 54 * nb-time-steps
Scalar pyramid SY 15 5 * nb-time-steps
Vector pyramid VY 15 15 * nb-time-steps
Tensor pyramid TY 15 45 * nb-time-steps
2D text T2 3 arbitrary
3D text T3 4 arbitrary
The coordinates are given ‘by node’, i.e.,
• (coord1, coord2, coord3 ) for a point,
• (coord1-node1, coord2-node1, coord3-node1,
coord1-node2, coord2-node2, coord3-node2 ) for a line,
• (coord1-node1, coord2-node1, coord3-node1,
coord1-node2, coord2-node2, coord3-node2,
coord1-node3, coord2-node3, coord3-node3 ) for a triangle,
• etc.
The ordering of the nodes is given in Section 9.3 [Node ordering], page 112.
The values are given by time step, by node and by component, i.e.:
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,
...
For the 2D text objects, the two first expressions in list-of-coords give the X-Y
position of the string in screen coordinates, measured from the top-left corner of
the window. If the first (respectively second) expression is negative, the position
is measured from the right (respectively bottom) edge of the window. If the
value of the first (respectively second) expression is larger than 99999, the string
is centered horizontally (respectively vertically). If the third expression is equal
to zero, the text is aligned bottom-left and displayed using the default font and
size. Otherwise, the third expression is converted into an integer whose eight
Chapter 8: Post-processing module 75

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 view’s 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 element’s 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

8.2 Post-processing plugins


Post-processing plugins permit to extend the functionality of Gmsh’s post-processing
module. The difference between regular post-processing options (see Section B.5
[Post-processing options list], page 213) and post-processing plugins is that regular
post-processing options only change the way the data is displayed, while post-processing
plugins either create new post-processing views, or modify the data stored in a view (in a
destructive, non-reversible way).
Plugins are available in the GUI by right-clicking on a view button (or by clicking on the
black arrow next to the view button) and then selecting the ‘Plugin’ submenu.
Here is the list of the plugins that are shipped by default with Gmsh:

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), the IGE quality measure (Inverse Gradient Error) and/or the ICN quality
measure (Inverse Condition Number). 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 ICN measure if asked oth-
erwise the IGE measure if asked otherwise the Jacobian determinant.

J is faster to compute but gives information only on validity while the other
measure gives also information on quality.
The IGE measure is related to the error on the gradient of the finite element
solution. It is the scaled Jacobian for quads and hexes and a new measure for
triangles and tetrahedra.
The ICN measure is related to the condition number of the stiffness matrix.
(See article "Efficient computation of the minimum of shape quality measures
on curvilinear finite elements" for details.)

Parameters:

- Jacobian determinant = {0, 1}

- IGE measure = {0, 1}

- ICN measure = {0, 1}

- Hidding threshold = [0, 1]: Hides all element for which min(mu) is strictly
greater than the threshold, where mu is the ICN if ICN measure == 1, oth-
erwise mu is the IGE it IGE measure == 1, otherwise mu is the Jacobian
determinant.
If threshold == 0, hides all elements except invalid.

- Draw PView = {0, 1}: Creates a PView of min(J)/max(J), min(IGE) and/or


min(ICN) according to what is asked. If ’Recompute’ = 1, new PViews are
created.
Chapter 8: Post-processing module 77

- Recompute = {0,1}: Should be 1 if the mesh has changed.

- Dimension = {-1, 1, 2, 3, 4}: If == -1, analyse element of the greater dimen-


sion. If == 4, analyse 2D and 3D elements. Numeric options:
Jacobian determinant
Default value: 1
IGE measure
Default value: 1
ICN measure
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 ‘ThreeD’ is equal to 1, the plugin inserts the string in model coordinates at


the position (‘X’,‘Y’,‘Z’). If ‘ThreeD’ is equal to 0, the plugin inserts the string
in screen coordinates at the position (‘X’,‘Y’).

If ‘View’ < 0, the plugin is run on the current view.

Plugin(Annotate) is executed in-place for list-based datasets or creates a new


view for other datasets. String options:
Text Default value: "My Text"
Font Default value: "Helvetica"
Align Default value: "Left"
Numeric options:
X Default value: 50
Y Default value: 30
Z Default value: 0
ThreeD Default value: 0
FontSize Default value: 14
78 Gmsh 3.0

View Default value: -1


Plugin(Bubbles)
Plugin(Bubbles) constructs a geometry consisting of ‘bubbles’ inscribed in the
Voronoi of an input triangulation. ‘ShrinkFactor’ allows to change the size of
the bubbles. The plugin expects a triangulation in the ‘z = 0’ plane to exist in
the current model.

Plugin(Bubbles) creates one ‘.geo’ file. String options:


OutputFile
Default value: "bubbles.geo"
Numeric options:
ShrinkFactor
Default value: 0
Plugin(Crack)
Plugin(Crack) creates a crack around the physical group ‘PhysicalGroup’ of
dimension ‘Dimension’ (1 or 2), embedded in a mesh of dimension ‘Dimension’
+ 1. The plugin duplicates the vertices and the elements on the crack and stores
them in a new discrete curve (‘Dimension’ = 1) or surface (‘Dimension’ = 2).
The elements touching the crack on the “negative” side are modified to use
the newly generated vertices.If ‘OpenBoundaryPhysicalGroup’ is given (> 0),
its vertices are duplicated and the crack will be left open on that (part of the)
boundary. Otherwise, the lips of the crack are sealed, i.e., its vertices are not
duplicated. For 1D cracks, ‘NormalX’, ‘NormalY’ and ‘NormalZ’ provide the
reference normal of the surface in which the crack is supposed to be embedded.
Numeric options:
Dimension
Default value: 1
PhysicalGroup
Default value: 1
OpenBoundaryPhysicalGroup
Default value: 0
NormalX Default value: 0
NormalY Default value: 0
NormalZ Default value: 1
Plugin(Curl)
Plugin(Curl) computes the curl of the field in the view ‘View’.

If ‘View’ < 0, the plugin is run on the current view.

Plugin(Curl) creates one new view. Numeric options:


View Default value: -1
Chapter 8: Post-processing module 79

Plugin(CurvedBndDist)
Plugin(CurvedBndDist) ...
Plugin(CutBox)
Plugin(CutBox) cuts the view ‘View’ with a rectangular box defined by the
4 points (‘X0’,‘Y0’,‘Z0’) (origin), (‘X1’,‘Y1’,‘Z1’) (axis of U), (‘X2’,‘Y2’,‘Z2’)
(axis of V) and (‘X3’,‘Y3’,‘Z3’) (axis of W).

The number of points along U, V, W is set with the options ‘NumPointsU’,


‘NumPointsV’ and ‘NumPointsW’.

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.

If ‘View’ < 0, the plugin is run on the current view.

Plugin(CutBox) creates one new view. 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
X3 Default value: 0
Y3 Default value: 0
Z3 Default value: 1
NumPointsU
Default value: 20
NumPointsV
Default value: 20
NumPointsW
Default value: 20
ConnectPoints
Default value: 1
80 Gmsh 3.0

Boundary Default value: 1


View Default value: -1
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’.

If ‘View’ < 0, the plugin is run on the current view.

Plugin(CutGrid) creates one new view. 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: 20
NumPointsV
Default value: 20
ConnectPoints
Default value: 1
View Default value: -1
Plugin(CutParametric)
Plugin(CutParametric) cuts the view ‘View’ with the parametric function
(‘X’(u,v), ‘Y’(u,v), ‘Z’(u,v)), using ‘NumPointsU’ values of the parameter u
in [‘MinU’, ‘MaxU’] and ‘NumPointsV’ values of the parameter v in [‘MinV’,
‘MaxV’].

If ‘ConnectPoints’ is set, the plugin creates surface or line elements; otherwise,


Chapter 8: Post-processing module 81

the plugin generates points.

If ‘View’ < 0, the plugin is run on the current view.

Plugin(CutParametric) creates one new view. String options:


X Default value: "2 * Cos(u) * Sin(v)"
Y Default value: "4 * Sin(u) * Sin(v)"
Z Default value: "0.1 + 0.5 * Cos(v)"
Numeric options:
MinU Default value: 0
MaxU Default value: 6.2832
NumPointsU
Default value: 180
MinV Default value: 0
MaxV Default value: 6.2832
NumPointsV
Default value: 180
ConnectPoints
Default value: 0
View Default value: -1
Plugin(CutPlane)
Plugin(CutPlane) cuts the view ‘View’ with the plane ‘A’*X + ‘B’*Y + ‘C’*Z +
‘D’ = 0.

If ‘ExtractVolume’ is nonzero, the plugin extracts the elements on one side of


the plane (depending on the sign of ‘ExtractVolume’).

If ‘View’ < 0, the plugin is run on the current view.

Plugin(CutPlane) creates one new view. Numeric options:


A Default value: 1
B Default value: 0
C Default value: 0
D Default value: -0.01
ExtractVolume
Default value: 0
RecurLevel
Default value: 4
82 Gmsh 3.0

TargetError
Default value: 0
View Default value: -1
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.

If ‘View’ < 0, the plugin is run on the current view.

Plugin(CutSphere) creates one new view. Numeric options:


Xc Default value: 0
Yc Default value: 0
Zc Default value: 0
R Default value: 0.25
ExtractVolume
Default value: 0
RecurLevel
Default value: 4
TargetError
Default value: 0
View Default value: -1
Plugin(DiscretizationError)
Plugin(DiscretizationError) computes the error between the mesh and the ge-
ometry. It does so by supersampling the elements and computing the distance
between the supersampled points dans their projection on the geometry. Nu-
meric options:
SuperSamplingNodes
Default value: 10
Plugin(Distance)
Plugin(Distance) computes distances to physical entities in a mesh.

Define the physical entities to which the distance is computed. If Point=0,


Line=0, and Surface=0, then the distance is computed to all the boundaries of
the mesh (edges in 2D and faces in 3D).

Computation<0. computes the geometrical euclidian distance (warning: differ-


ent than the geodesic distance), and Computation=a>0.0 solves a PDE on the
mesh with the diffusion constant mu = a*bbox, with bbox being the max size
Chapter 8: Post-processing module 83

of the bounding box of the mesh (see paper Legrand 2006).

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.

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’.

If ‘View’ < 0, the plugin is run on the current view.

Plugin(Divergence) creates one new view. Numeric options:


View Default value: -1
Plugin(DuplicateBoundaries)
Plugin(DuplicateBoundaries) is not documented yet. Numeric options:
Dummy Default value: 1
Plugin(Eigenvalues)
Plugin(Eigenvalues) computes the three real eigenvalues of each tensor in the
view ‘View’.

If ‘View’ < 0, the plugin is run on the current view.

Plugin(Eigenvalues) creates three new scalar views. Numeric options:


View Default value: -1
84 Gmsh 3.0

Plugin(Eigenvectors)
Plugin(Eigenvectors) computes the three (right) eigenvectors of each tensor in
the view ‘View’ and sorts them according to the value of the associated eigen-
values.

If ‘ScaleByEigenvalues’ is set, each eigenvector is scaled by its associated eigen-


value. The plugin gives an error if the eigenvectors are complex.

If ‘View’ < 0, the plugin is run on the current view.

Plugin(Eigenvectors) creates three new vector view. Numeric options:


ScaleByEigenvalues
Default value: 1
View Default value: -1
Plugin(ExtractEdges)
Plugin(ExtractEdges) extracts sharp edges from a triangular mesh.

Plugin(ExtractEdges) creates one new view. Numeric options:


Angle Default value: 40
IncludeBoundary
Default value: 1
Plugin(ExtractElements)
Plugin(ExtractElements) extracts some elements from the view ‘View’. If ‘Min-
Val’ != ‘MaxVal’, it extracts the elements whose ‘TimeStep’-th values (averaged
by element) are comprised between ‘MinVal’ and ‘MaxVal’. If ‘Visible’ != 0, it
extracts visible elements.

If ‘View’ < 0, the plugin is run on the current view.

Plugin(ExtractElements) creates one new view. Numeric options:


MinVal Default value: 0
MaxVal Default value: 0
TimeStep Default value: 0
Visible Default value: 1
Dimension
Default value: -1
View Default value: -1
Plugin(FaultZone)
Plugin(FaultZone) convert all the embedded lines of an existing surfacic mesh
to flat quadrangles. Flat quadrangles represent joint elements suitable to model
a fault zone with Code Aster.
Chapter 8: Post-processing module 85

‘SurfaceTag’ must be an existing plane surface containing embedded lines. Em-


bedded lines must have been added to the surface via the command Line In
Surface. The surface must be meshed with quadratic incomplete elements.

‘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.

The result is to be interpolated in a sufficiently fine mesh: ’MeshFile’.

Plugin(FieldFromAmplitudePhase) generates one new view. String options:


MeshFile Default value: "fine.msh"
Numeric options:
Wavenumber
Default value: 5
AmplitudeView
Default value: 0
PhaseView
Default value: 1
Plugin(GaussPoints)
Given an input mesh, Plugin(GaussPoints) creates a view containing the Gauss
points for a given polynomial ‘Order’.

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
86 Gmsh 3.0

PhysicalGroup
Default value: 0
Plugin(Gradient)
Plugin(Gradient) computes the gradient of the field in the view ‘View’.

If ‘View’ < 0, the plugin is run on the current view.

Plugin(Gradient) creates one new view. Numeric options:


View Default value: -1
Plugin(HarmonicToTime)
Plugin(HarmonicToTime) takes the values in the time steps ‘RealPart’ and
‘ImaginaryPart’ of the view ‘View’, and creates a new view containing

‘View’[‘RealPart’] * cos(p) +- ‘View’[‘ImaginaryPart’] * sin(p)

with p = 2*Pi*k/‘NumSteps’, k = 0, ..., ‘NumSteps’-1.


The + or - sign is controlled by ‘TimeSign’.

If ‘View’ < 0, the plugin is run on the current view.

Plugin(HarmonicToTime) creates one new view. Numeric options:


RealPart Default value: 0
ImaginaryPart
Default value: 1
NumSteps Default value: 20
TimeSign Default value: -1
View Default value: -1
Plugin(HomologyComputation)
Plugin(HomologyComputation) computes representative chains of basis ele-
ments of (relative) homology and cohomology spaces.

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.

Plugin(HomologyComputation) creates new views, one for each basis element.


The resulting basis chains of desired dimension together with the mesh are
saved to the given file. String options:
DomainPhysicalGroups
Default value: ""
SubdomainPhysicalGroups
Default value: ""
Chapter 8: Post-processing module 87

ReductionImmunePhysicalGroups
Default value: ""
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:

1. (co)homology basis transformation:


’TransformationMatrix’: Integer matrix of the transformation.
’PhysicalGroupsOfOperatedChains’: (Co)chains of a (co)homology space basis
to be transformed.
Results a new (co)chain basis that is an integer cobination of the given basis.

2. Make basis representations of a homology space and a cohomology space


compatible:
’PhysicalGroupsOfOperatedChains’: Chains of a homology space basis.
’PhysicalGroupsOfOperatedChains2’: Cochains of a cohomology space basis.
Results a new basis for the homology space such that the incidence matrix of
the new basis and the basis of the cohomology space is the identity matrix.
88 Gmsh 3.0

Options:
’PhysicalGroupsToTraceResults’: Trace the resulting (co)chains to the given
physical groups.
’PhysicalGroupsToProjectResults’: Project the resulting (co)chains to the com-
plement of the given physical groups.
’NameForResultChains’: Post-processing view name prefix for the results.
’ApplyBoundaryOperatorToResults’: Apply boundary operator to the result-
ing chains.

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 ‘View’ < 0, the plugin is run on the current view.

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(Integrate) creates one new view. Numeric options:


View Default value: -1
OverTime Default value: -1
Dimension
Default value: -1
Chapter 8: Post-processing module 89

Visible Default value: 1


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 ‘ExtractVolume’ is nonzero, the plugin extracts the isovolume with values


greater (if ‘ExtractVolume’ > 0) or smaller (if ‘ExtractVolume’ < 0) than the
isosurface ‘Value’.

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’ < 0, the plugin is run on the current view.

Plugin(Isosurface) creates as many views as there are time steps in ‘View’.


Numeric options:
Value Default value: 0
ExtractVolume
Default value: 0
RecurLevel
Default value: 4
TargetError
Default value: 0
View Default value: -1
OtherTimeStep
Default value: -1
OtherView
Default value: -1
Plugin(Lambda2)
Plugin(Lambda2) computes the eigenvalues Lambda(1,2,3) of the tensor (S ik
S kj + Om ik Om kj), where S ij = 0.5 (ui,j + uj,i) and Om ij = 0.5 (ui,j - uj,i)
are respectively the symmetric and antisymmetric parts of the velocity gradient
tensor.

Vortices are well represented by regions where Lambda(2) is negative.

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.
90 Gmsh 3.0

If ‘View’ < 0, the plugin is run on the current view.

Plugin(Lambda2) creates one new view. Numeric options:


Eigenvalue
Default value: 2
View Default value: -1
Plugin(LongitudeLatitude)
Plugin(LongituteLatitude) projects the view ‘View’ in longitude-latitude.

If ‘View’ < 0, the plugin is run on the current view.

Plugin(LongituteLatitude) is executed in place. Numeric options:


View Default value: -1
Plugin(MakeSimplex)
Plugin(MakeSimplex) decomposes all non-simplectic elements (quadrangles,
prisms, hexahedra, pyramids) in the view ‘View’ into simplices (triangles,
tetrahedra).

If ‘View’ < 0, the plugin is run on the current view.

Plugin(MakeSimplex) is executed in-place. Numeric options:


View Default value: -1
Plugin(MathEval)
Plugin(MathEval) creates a new view using data from the time step ‘TimeStep’
in the view ‘View’.

If only ‘Expression0’ is given (and ‘Expression1’, ..., ‘Expression8’ are all


empty), the plugin creates a scalar view. If ‘Expression0’, ‘Expression1’ and/or
‘Expression2’ are given (and ‘Expression3’, ..., ‘Expression8’ are all empty) the
plugin creates a vector view. Otherwise the plugin creates a tensor view.

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’;

- the symbols x, y and z, which represent the three spatial coordinates.

If ‘TimeStep’ < 0, the plugin extracts data from all the time steps in the view.

If ‘View’ < 0, the plugin is run on the current view.


Chapter 8: Post-processing module 91

Plugin(MathEval) creates one new view.If ‘PhysicalRegion’ < 0, the plugin is


run on all physical regions.

Plugin(MathEval) creates one new view. String options:


Expression0
Default value: "Sqrt(v0^2+v1^2+v2^2)"
Expression1
Default value: ""
Expression2
Default value: ""
Expression3
Default value: ""
Expression4
Default value: ""
Expression5
Default value: ""
Expression6
Default value: ""
Expression7
Default value: ""
Expression8
Default value: ""
Numeric options:
TimeStep Default value: -1
View Default value: -1
OtherTimeStep
Default value: -1
OtherView
Default value: -1
ForceInterpolation
Default value: 0
PhysicalRegion
Default value: -1
Plugin(MeshSubEntities)
Plugin(MeshSubEntities) creates mesh elements for the entities of dimension
‘OutputDimension’ (0 for vertices, 1 for edges, 2 for faces) of the ‘InputPhys-
icalGroup’ of dimension ‘InputDimension’. The plugin creates new elements
belonging to ‘OutputPhysicalGroup’. Numeric options:
92 Gmsh 3.0

InputDimension
Default value: 1
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.

Plugin(MinMax) creates two new views. Numeric options:


View Default value: -1
OverTime Default value: 0
Argument Default value: 0
Visible Default value: 1
Plugin(ModifyComponents)
Plugin(ModifyComponents) modifies the components of the ‘TimeStep’-th time
step in the view ‘View’, using the expressions provided in ‘Expression0’, ...,
‘Expression8’. If an expression is empty, the corresponding component in the
view is not modified.

The expressions can contain:

- the usual mathematical functions (Log, Sqrt, Sin, Cos, Fabs, ...) and operators
(+, -, *, /, ^);

- the symbols x, y and z, to retrieve the coordinates of the current node;

- 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’
Chapter 8: Post-processing module 93

is interpolated onto ‘View’.

If ‘TimeStep’ < 0, the plugin automatically loops over all the time steps in
‘View’ and evaluates the expressions for each one.

If ‘OtherTimeStep’ < 0, the plugin uses ‘TimeStep’ instead.

If ‘View’ < 0, the plugin is run on the current view.

If ‘OtherView’ < 0, the plugin uses ‘View’ instead.

Plugin(ModifyComponents) is executed in-place. String options:


Expression0
Default value: "v0 * Sin(x)"
Expression1
Default value: ""
Expression2
Default value: ""
Expression3
Default value: ""
Expression4
Default value: ""
Expression5
Default value: ""
Expression6
Default value: ""
Expression7
Default value: ""
Expression8
Default value: ""
Numeric options:
TimeStep Default value: -1
View Default value: -1
OtherTimeStep
Default value: -1
OtherView
Default value: -1
ForceInterpolation
Default value: 0
94 Gmsh 3.0

Plugin(ModulusPhase)
Plugin(ModulusPhase) interprets the time steps ‘realPart’ and ‘imaginaryPart’
in the view ‘View’ as the real and imaginary parts of a complex field and replaces
them with their corresponding modulus and phase.

If ‘View’ < 0, the plugin is run on the current view.

Plugin(ModulusPhase) is executed in-place. Numeric options:


RealPart Default value: 0
ImaginaryPart
Default value: 1
View Default value: -1
Plugin(NearToFarField)
Plugin(NearToFarField) computes the far field pattern from the near electric E
and magnetic H fields on a surface enclosing the radiating device (antenna).

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.

Plugin(NearToFarField) creates one new view. String options:


MatlabOutputFile
Default value: "farfield.m"
Numeric options:
Wavenumber
Default value: 1
PhiStart Default value: 0
PhiEnd Default value: 6.28319
NumPointsPhi
Default value: 60
ThetaStart
Default value: 0
ThetaEnd Default value: 3.14159
NumPointsTheta
Default value: 30
EView Default value: 0
Chapter 8: Post-processing module 95

HView Default value: 1


Normalize
Default value: 1
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.

If ‘View’ < 0, the plugin is run on the current view.

Plugin(NearestNeighbor) is executed in-place. Numeric options:


View Default value: -1
Plugin(NewView)
Plugin(NewView) creates a new view from a mesh.The parameter ‘Dimension’
gives the dimensionof the initialized to zero NodeData vector Numeric options:
View Default value: -1
Dimension
Default value: 1
Plugin(Particles)
Plugin(Particles) computes the trajectory of particules in the force field given
by the ‘TimeStep’-th time step of a vector view ‘View’.

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 particles along U and V that are to be transported is set with
the options ‘NumPointsU’ and ‘NumPointsV’. The equation

A2 * d^2X(t)/dt^2 + A1 * dX(t)/dt + A0 * X(t) = F

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.

If ‘View’ < 0, the plugin is run on the current view.

Plugin(Particles) creates one new view containing multi-step vector points.


Numeric options:
96 Gmsh 3.0

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
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’).

If ‘View’ < 0, the plugin is run on the current view.

Plugin(Probe) creates one new view. Numeric options:


X Default value: 0
Y Default value: 0
Z Default value: 0
View Default value: -1
Plugin(Remove)
Plugin(Remove) removes the marked items from the view ‘View’.

If ‘View’ < 0, the plugin is run on the current view.

Plugin(Remove) is executed in-place. Numeric options:


Chapter 8: Post-processing module 97

Text2D Default value: 1


Text3D Default value: 1
Points Default value: 0
Lines Default value: 0
Triangles
Default value: 0
Quadrangles
Default value: 0
Tetrahedra
Default value: 0
Hexahedra
Default value: 0
Prisms Default value: 0
Pyramids Default value: 0
Scalar Default value: 1
Vector Default value: 1
Tensor Default value: 1
View Default value: -1
Plugin(Scal2Tens)
Plugin(Scal2Tens) converts some scalar fields into a tensor field. The number of
components must be given (max. 9). The new view ’NameNewView’ contains
the new tensor field. If the number of a view is -1, the value of the corresponding
component is 0. String options:
NameNewView
Default value: "NewView"
Numeric options:
NumberOfComponents
Default value: 9
View0 Default value: -1
View1 Default value: -1
View2 Default value: -1
View3 Default value: -1
View4 Default value: -1
View5 Default value: -1
View6 Default value: -1
View7 Default value: -1
98 Gmsh 3.0

View8 Default value: -1


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

Visible Default value: 1


FromMesh Default value: 0
View Default value: -1
Plugin(Smooth)
Plugin(Smooth) averages the values at the nodes of the view ‘View’.

If ‘View’ < 0, the plugin is run on the current view.

Plugin(Smooth) is executed in-place. Numeric options:


View Default value: -1
Plugin(SphericalRaise)
Plugin(SphericalRaise) transforms the coordinates of the elements in the view
‘View’ using the values associated with the ‘TimeStep’-th time step.

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’).

To produce a standard radiation pattern, set ‘Offset’ to minus the radius of


the sphere the original data lives on.

If ‘View’ < 0, the plugin is run on the current view.

Plugin(SphericalRaise) is executed in-place. Numeric options:


Xc Default value: 0
Yc Default value: 0
Zc Default value: 0
Raise Default value: 1
Offset Default value: 0
TimeStep Default value: 0
View Default value: -1
Plugin(StreamLines)
Plugin(StreamLines) computes stream lines from the ‘TimeStep’-th time step
of a vector view ‘View’ and optionally interpolates the scalar view ‘OtherView’
on the resulting stream lines.

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.

If ‘View’ < 0, the plugin is run on the current view.

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’.

If ‘View’ < 0, the plugin is run on the current view.

Plugin(Tetrahedralize) creates one new view. Numeric options:


Chapter 8: Post-processing module 101

View Default value: -1


Plugin(ThinLayerFixMesh)
Fix the mesh in thin parts
Plugin(Transform)
Plugin(Transform) transforms the homogeneous node coordinates (x,y,z,1) of
the elements in the view ‘View’ by the matrix

[‘A11’ ‘A12’ ‘A13’ ‘Tx’]


[‘A21’ ‘A22’ ‘A23’ ‘Ty’]
[‘A31’ ‘A32’ ‘A33’ ‘Tz’].

If ‘SwapOrientation’ is set, the orientation of the elements is reversed.

If ‘View’ < 0, the plugin is run on the current view.

Plugin(Transform) is executed in-place. Numeric options:


A11 Default value: 1
A12 Default value: 0
A13 Default value: 0
A21 Default value: 0
A22 Default value: 1
A23 Default value: 0
A31 Default value: 0
A32 Default value: 0
A33 Default value: 1
Tx Default value: 0
Ty Default value: 0
Tz Default value: 0
SwapOrientation
Default value: 0
View Default value: -1
Plugin(Triangulate)
Plugin(Triangulate) triangulates the points in the view ‘View’, assuming that
all the points belong to a surface that can be projected one-to-one onto a plane.
Algorithm selects the old (0) or new (1) meshing algorithm.

If ‘View’ < 0, the plugin is run on the current view.

Plugin(Triangulate) creates one new view. Numeric options:


102 Gmsh 3.0

Algorithm
Default value: 0
View Default value: -1
Plugin(VoroMetal)
Plugin(VoroMetal) creates microstructures using Voronoi diagrams.

String options:
SeedsFile
Default value: "seeds.txt"
Numeric options:
ComputeBestSeeds
Default value: 0
ComputeMicrostructure
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 ‘View’ < 0, the plugin is run on the current view.

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.)

Plugin(Warp) is executed in-place. Numeric options:


Factor Default value: 1
TimeStep Default value: 0
SmoothingAngle
Default value: 180
View Default value: -1
OtherView
Default value: -1

8.3 Post-processing options


General post-processing option names have the form ‘PostProcessing.string ’. Options
peculiar to post-processing views take two forms.
1. options that should apply to all views can be set through ‘View.string ’, before any
view is loaded ;
Chapter 8: Post-processing module 103

2. options that should apply only to the n-th view take the form ‘View[n ].string ’ (n =
0, 1, 2, . . . ), after the n-th view is loaded.
The list of all post-processing and view options is given in Section B.5 [Post-processing
options list], page 213. See Section A.8 [t8.geo], page 137, and Section A.9 [t9.geo], page 140,
for some examples.
Chapter 9: File formats 105

9 File formats
This chapter describes Gmsh’s 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 Gmsh’s 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.)

9.1 MSH ASCII file format


The MSH ASCII file format contains one mandatory section giving information about the file
($MeshFormat), followed by several optional sections defining the nodes ($Nodes), elements
($Elements), region names ($PhysicalName), periodicity relations ($Periodic) and post-
processing datasets ($NodeData, $ElementData, $ElementNodeData).
When $Elements are given, $Nodes should also be provided, before the $Elements section.
Currently only one $Nodes and one $Elements section are allowed per file. (This might/will
change in the future.)
Important note about efficiency. Node and element tags can be "sparse", i.e., do not have
to constitute a continuous list of indexes starting at 1. However, using non-continuous tags
will lead to performance degradation. For meshes, non-continuous indexing forces Gmsh to
use a map instead of a vector to access nodes and elements. The performance hit is on speed.
For post-processing datasets, which always use vectors to access data, the performance hit
is on memory. A NodeData with two nodes, tagged 1 and 1000000, will allocate a (mostly
empty) vector of 1000000 elements.
Any section with an unrecognized header is simply ignored: you can thus add comments in
a ‘.msh’ file by putting them e.g. inside a $Comments/$EndComments section.
Sections can be repeated in the same file, and post-processing sections can be put into
separate files (e.g. one file per time step). Nodes are assumed to be defined before elements.
The format is defined as follows:
$MeshFormat
version-number file-type data-size
$EndMeshFormat
$PhysicalNames
number-of-names
physical-dimension physical-number "physical-name "
...
$EndPhysicalNames
$Nodes
number-of-nodes
node-number x-coord y-coord z-coord
...
$EndNodes
$Elements
106 Gmsh 3.0

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 107

elm-number number-of-nodes-per-element value ...


...
$EndElementNodeData
$InterpolationScheme
"name "
number-of-element-topologies
elm-topology
number-of-interpolation-matrices
num-rows num-columns value ...
...
$EndInterpolationScheme
where
version-number
is a real number equal to 2.2
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
(currently only data-size = sizeof(double) is supported).
number-of-nodes
is the number of nodes in the mesh.
node-number
is the number (index) of the n-th node in the mesh; node-number must be a
postive (non-zero) integer. Note that the node-numbers do not necessarily have
to form a dense nor an ordered sequence.
x-coord y-coord z-coord
are the floating point values giving the X, Y and Z coordinates of the n-th node.
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.
108 Gmsh 3.0

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 109

27 5-node fourth order edge (2 nodes associated with the vertices, 3


internal to the edge)
28 6-node fifth order edge (2 nodes associated with the vertices, 4
internal to the edge)
29 20-node third order tetrahedron (4 nodes associated with the ver-
tices, 12 with the edges, 4 with the faces)
30 35-node fourth order tetrahedron (4 nodes associated with the ver-
tices, 18 with the edges, 12 with the faces, 1 in the volume)
31 56-node fifth order tetrahedron (4 nodes associated with the ver-
tices, 24 with the edges, 24 with the faces, 4 in the volume)
92 64-node third order hexahedron (8 nodes associated with the ver-
tices, 24 with the edges, 24 with the faces, 8 in the volume)
93 125-node fourth order hexahedron (8 nodes associated with the
vertices, 36 with the edges, 54 with the faces, 27 in the volume)
See below for the ordering of the nodes.
number-of-tags
gives the number of integer tags that follow for the n-th element. By default,
the first tag is the number of the physical entity to which the element belongs;
the second is the number of the elementary geometrical entity to which the
element belongs; the third is the number of mesh partitions to which the element
belongs, followed by the partition ids (negative partition ids indicate ghost
cells). A zero tag is equivalent to no tag. Gmsh and most codes using the MSH
2 format require at least the first two tags (physical and elementary tags).
node-number-list
is the list of the node numbers of the n-th element. The ordering of the nodes
is given in Section 9.3 [Node ordering], page 112.
number-of-string-tags
gives the number of string tags that follow. By default the first string-tag
is interpreted as the name of the post-processing view and the second as the
name of the interpolation scheme. The interpolation scheme is provided in the
$InterpolationScheme section (see below).
number-of-real-tags
gives the number of real number tags that follow. By default the first real-tag
is interpreted as a time value associated with the dataset.
number-of-integer-tags
gives the number of integer tags that follow. By default the first integer-tag is
interpreted as a time step index (starting at 0), the second as the number of
field components of the data in the view (1, 3 or 9), the third as the number of
entities (nodes or elements) in the view, and the fourth as the partition index
for the view data (0 for no partition).
number-of-nodes-per-elements
gives the number of node values for an element in an element-based view.
110 Gmsh 3.0

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 111

6 0.4
$EndNodeData

9.2 MSH binary file format


The binary file format is similar to the ASCII format described above:
$MeshFormat
version-number file-type data-size
one-binary
$EndMeshFormat
$Nodes
number-of-nodes
nodes-binary
$EndNodes
$Elements
number-of-elements
element-header-binary
elements-binary
element-header-binary
elements-binary
...
$EndElements

[ All other sections are identical to ASCII, except that node-number,


elm-number, number-of-nodes-per-element and values are written in
binary format. Beware that all the $End tags must start on a new line. ]
where

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.
112 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);
}

9.3 Node ordering


Historically, Gmsh developers have started by implementing linear elements (lines, triangles,
quads, tets, prisms and hexes). Then, second and sometimes third order elements have been
hardcoded. We here distinguish “low order elements” that have been hardcoded initially
and “high order elements” that have been coded in a general fashion, theoretically valid for
any order.

9.3.1 Low order elements


For all mesh and post-processing file formats, the reference elements are defined as follows.
Chapter 9: File formats 113

Line: Line3: Line4:

0----------1 --> u 0-----2----1 0----2----3----1

Triangle: Triangle6: Triangle9/10: Triangle12/15:

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

Quadrangle: Quadrangle8: Quadrangle9:

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
114 Gmsh 3.0

Hexahedron: Hexahedron20: Hexahedron27:

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

Prism: Prism15: Prism18:

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

Pyramid: Pyramid13: Pyramid14:

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 115

9.3.2 High order elements


The node ordering of a higher order (possibly curved) element is compatible with the num-
bering of low order element (it is a generalization). We number nodes in the following
order:
– the element principal or corner vertices;
– the internal nodes for each edge;
– the internal nodes for each face;
– the volume internal nodes.
The numbering for internal nodes is recursive, ie. the numbering follows that of the nodes
of an embedded edge/face/volume of lower order. The higher order nodes are assumed
to be equispaced. Edges and faces are numbered following the lowest order template that
generates a single high-order on this edge/face. Furthermore, an edge is oriented from the
vertex with the lowest to the highest index. The orientation of a face is such that the
computed normal points outward; the starting point is the vertex with the lowest index.

9.4 Legacy formats


This section describes Gmsh’s older native file formats. Future versions of Gmsh will con-
tinue to support these formats, but we recommend that you do not use them in new appli-
cations.

9.4.1 MSH file format version 1.0 (Legacy)


The MSH file format version 1.0 is Gmsh’s old native mesh file format, now superseded by
the format described in Section 9.1 [MSH ASCII file format], page 105. It is defined as
follows:
$NOD
number-of-nodes
node-number x-coord y-coord z-coord
...
$ENDNOD
$ELM
number-of-elements
elm-number elm-type reg-phys reg-elem number-of-nodes node-number-list
...
$ENDELM
where
number-of-nodes
is the number of nodes in the mesh.
node-number
is the number (index) of the n-th node in the mesh; node-number must be a
postive (non-zero) integer. Note that the node-numbers do not necessarily have
to form a dense nor an ordered sequence.
x-coord y-coord z-coord
are the floating point values giving the X, Y and Z coordinates of the n-th node.
116 Gmsh 3.0

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 117

See below for the ordering of the nodes.


reg-phys is the number of the physical entity to which the element belongs; reg-phys
must be a postive integer, or zero. If reg-phys is equal to zero, the element is
considered not to belong to any physical entity.
reg-elem is the number of the elementary entity to which the element belongs; reg-elem
must be a postive (non-zero) integer.
number-of-nodes
is the number of nodes for the n-th element. This is redundant, but kept for
backward compatibility.
node-number-list
is the list of the number-of-nodes node numbers of the n-th element. The
ordering of the nodes is given in Section 9.3 [Node ordering], page 112.

9.4.2 POS ASCII file format (Legacy)


The POS ASCII file is Gmsh’s old native post-processing format, now superseded by the
format described in Section 9.1 [MSH ASCII file format], page 105. It is defined as follows:
$PostFormat
1.4 file-type data-size
$EndPostFormat
$View
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
nb-text2d nb-text2d-chars nb-text3d nb-text3d-chars
time-step-values
< scalar-point-value > ... < vector-point-value > ...
< tensor-point-value > ...
< scalar-line-value > ... < vector-line-value > ...
< tensor-line-value > ...
< scalar-triangle-value > ... < vector-triangle-value > ...
< tensor-triangle-value > ...
< scalar-quadrangle-value > ... < vector-quadrangle-value > ...
118 Gmsh 3.0

< tensor-quadrangle-value > ...


< scalar-tetrahedron-value > ... < vector-tetrahedron-value > ...
< tensor-tetrahedron-value > ...
< scalar-hexahedron-value > ... < vector-hexahedron-value > ...
< tensor-hexahedron-value > ...
< scalar-prism-value > ... < vector-prism-value > ...
< tensor-prism-value > ...
< scalar-pyramid-value > ... < vector-pyramid-value > ...
< tensor-pyramid-value > ...
< scalar-line2-value > ... < vector-line2-value > ...
< tensor-line2-value > ...
< scalar-triangle2-value > ... < vector-triangle2-value > ...
< tensor-triangle2-value > ...
< scalar-quadrangle2-value > ... < vector-quadrangle2-value > ...
< tensor-quadrangle2-value > ...
< scalar-tetrahedron2-value > ... < vector-tetrahedron2-value > ...
< tensor-tetrahedron2-value > ...
< scalar-hexahedron2-value > ... < vector-hexahedron2-value > ...
< tensor-hexahedron2-value > ...
< scalar-prism2-value > ... < vector-prism2-value > ...
< tensor-prism2-value > ...
< scalar-pyramid2-value > ... < vector-pyramid2-value > ...
< tensor-pyramid2-value > ...
< text2d > ... < text2d-chars > ...
< text3d > ... < text3d-chars > ...
$EndView
where

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 119

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 112.
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
120 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.

9.4.3 POS binary file format (Legacy)


The POS binary file format is the same as the POS ASCII file format described in
Section 9.4.2 [POS ASCII file format], page 117, except that:
1. file-type equals 1.
2. all lists of floating point numbers and characters are written in binary format
3. there is an additional integer, of value 1, written before time-step-values. 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 a post-processing file in binary format:
int one = 1;

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 121

nb-text2d, nb-text2d-chars, nb-text3d, nb-text3d-chars);


fwrite(&one, sizeof(int), 1, file);
fwrite(time-step-values, sizeof(double), nb-time-steps, file);
fwrite(all-scalar-point-values, sizeof(double), ..., file);
...
fprintf(file, "\n$EndView\n");
In this pseudo-code, all-scalar-point-values is the array of double precision numbers con-
taining all the scalar-point-value lists, put one after each other in order to form a long array
of doubles. The principle is the same for all other kinds of values.
Appendix A: Tutorial 123

Appendix A Tutorial
The following examples introduce new features gradually, starting with Section A.1 [t1.geo],
page 123. 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)
*
*********************************************************************/

// The simplest construction in Gmsh’s scripting language is the


// ‘affectation’. The following command defines a new variable ‘lc’:

lc = 1e-2;

// This variable can then be used in the definition of Gmsh’s simplest


// ‘elementary entity’, a ‘Point’. A Point is defined by a list of four numbers:
// three coordinates (X, Y and Z), and a characteristic length (lc) that sets
// the target element size at the point:

Point(1) = {0, 0, 0, lc};

// The distribution of the mesh element sizes is then obtained by interpolation


// of these characteristic lengths throughout the geometry. Another method to
// specify characteristic lengths is to use a background mesh (see ‘t7.geo’ and
// ‘bgmesh.pos’).

// We can then define some additional points as well as our first curve. Curves
// are Gmsh’s 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:

Point(2) = {.1, 0, 0, lc} ;


Point(3) = {.1, .3, 0, lc} ;
Point(4) = {0, .3, 0, lc} ;
124 Gmsh 3.0

Line(1) = {1,2} ;
Line(2) = {3,2} ;
Line(3) = {3,4} ;
Line(4) = {4,1} ;

// The third elementary entity is the surface. In order to define a simple


// rectangular surface from the four lines defined above, a line loop has first
// to be defined. A line loop is a list of connected lines, a sign being
// associated with each line (depending on the orientation of the line):

Line Loop(1) = {4,1,-2,3} ;

// We can then define the surface as a list of line loops (only one here, since
// there are no holes--see ‘t4.geo’):

Plane Surface(1) = {1} ;

// 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:

Physical Point(1) = {1,2} ;

// 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 125

//
// 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)
*
*********************************************************************/

// We first include the previous tutorial file, in order to use it as a basis


// for this one:

Include "t1.geo";

// We can then add new points and lines in the same way as we did in ‘t1.geo’:

Point(5) = {0, .4, 0, lc};


Line(5) = {4, 5};

// But Gmsh also provides tools to tranform (translate, rotate, etc.)


// elementary entities or copies of elementary entities. For example, the point
// 3 can be moved by 0.05 units to the left with:

Translate {-0.05, 0, 0} { Point{3}; }

// The resulting point can also be duplicated and translated by 0.1 along the y
// axis:
126 Gmsh 3.0

Translate {0, 0.1, 0} { Duplicata{ Point{3}; } }

// 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.:

Line(7) = {3, 6};


Line(8) = {6, 5};
Line Loop(10) = {5,-8,-7,3};
Plane Surface(11) = {10};

// 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[] = Translate {0.12, 0, 0} { Duplicata{ Surface{1, 11}; } };

// 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):

Printf("New surfaces ’%g’ and ’%g’", my_new_surfs[0], my_new_surfs[1]);

// 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};

Line(110) = {4, 100}; Line(111) = {3, 101};


Line(112) = {6, 102}; Line(113) = {5, 103};
Line(114) = {103, 100}; Line(115) = {100, 101};
Line(116) = {101, 102}; Line(117) = {102, 103};

Line Loop(118) = {115, -111, 3, 110}; Plane Surface(119) = {118};


Line Loop(120) = {111, 116, -112, -7}; Plane Surface(121) = {120};
Line Loop(122) = {112, 117, -113, -8}; Plane Surface(123) = {122};
Appendix A: Tutorial 127

Line Loop(124) = {114, -110, 5, 113}; Plane Surface(125) = {124};


Line Loop(126) = {115, 116, 117, 114}; Plane Surface(127) = {126};

Surface Loop(128) = {127, 119, 121, 123, 125, 11};


Volume(129) = {128};

// 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):

Extrude {0, 0, 0.12} { Surface{my_new_surfs[1]}; }

// The following command permits to manually assign a characteristic length to


// some of the new points:

Characteristic Length {103, 105, 109, 102, 28, 24, 6, 5} = lc * 3;

// Note that, if the transformation tools are handy to create complex


// geometries, it is also sometimes useful to generate the ‘flat’ geometry, with
// an explicit list of all elementary entities. This can be achieved by
// selecting the ‘File->Save as->Gmsh unrolled geometry’ menu or by typing
//
// > gmsh t2.geo -0
//
// on the command line.

// To save all the tetrahedra discretizing the volumes 129 and 130 with a common
// region number, we finally define a physical volume:

Physical Volume ("The volume", 1) = {129,130};

A.3 t3.geo
/*********************************************************************
*
* Gmsh tutorial 3
*
* Extruded meshes, parameters, options
*
*********************************************************************/

// Again, we start by including the first tutorial:

Include "t1.geo";
128 Gmsh 3.0

// As in ‘t2.geo’, we plan to perform an extrusion along the z axis. But here,


// instead of only extruding the geometry, we also want to extrude the 2D
// mesh. This is done with the same ‘Extrude’ command, but by specifying element
// ’Layers’ (2 layers in this case, the first one with 8 subdivisions and the
// second one with 2 subdivisions, both with a height of h/2):

h = 0.1;

Extrude {0,0,h} {
Surface{1}; Layers{ {8,2}, {0.5,1} };
}

// The extrusion can also be performed with a rotation instead of a translation,


// and the resulting mesh can be recombined into prisms (we use only one layer
// here, with 7 subdivisions). All rotations are specified by an axis direction
// ({0,1,0}), an axis point ({-0.1,0,0.1}) and a rotation angle (-Pi/2):

Extrude { {0,1,0} , {-0.1,0,0.1} , -Pi/2 } {


Surface{28}; Layers{7}; Recombine;
}

// Note that a translation ({-2*h,0,0}) and a rotation ({1,0,0}, {0,0.15,0.25},


// Pi/2) can also be combined. Here the angle is specified as a ’parameter’,
// using the ’DefineConstant’ syntax. This parameter can be modified
// insteractively in the GUI, and can be exchanged with other codes using the
// ONELAB framework:

DefineConstant[ angle = {90, Min 0, Max 120, Step 1,


Name "Parameters/Twisting angle"} ];

out[] = Extrude { {-2*h,0,0}, {1,0,0} , {0,0.15,0.25} , angle * Pi / 180 } {


Surface{50}; Layers{10}; Recombine;
};

// In this last extrusion command we retrieved the volume number programatically


// by using the return value (a list) of the Extrude command. This list contains
// the "top" of the extruded surface (in out[0]), the newly created volume (in
// out[1]) and the ids of the lateral surfaces (in out[2], out[3], ...)

// We can then define a new physical volume to save all the tetrahedra with a
// common region number (101):

Physical Volume(101) = {1, 2, out[1]};

// Let us now change some options... Since all interactive options are
// accessible in Gmsh’s scripting language, we can for example make point tags
// visible or redefine some colors directly in the input file:
Appendix A: Tutorial 129

Geometry.PointNumbers = 1;
Geometry.Color.Points = Orange;
General.Color.Text = White;
Mesh.Color.Points = {255,0,0};

// Note that all colors can be defined literally or numerically, i.e.


// ‘Mesh.Color.Points = Red’ is equivalent to ‘Mesh.Color.Points = {255,0,0}’;
// and also note that, as with user-defined variables, the options can be used
// either as right or left hand sides, so that the following command will set
// the surface color to the same color as the points:

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
*
*********************************************************************/

// As usual, we start by defining some variables:

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):

ccos = (-h5*R1 + e2 * Hypot(h5, Hypot(e2, R1))) / (h5^2 + e2^2);


ssin = Sqrt(1 - ccos^2);

// Then we define some points and some lines using these variables:
130 Gmsh 3.0

Point(1) = {-e1-e2, 0 , 0, Lc1}; Point(2) = {-e1-e2, h1 , 0, Lc1};


Point(3) = {-e3-r , h1 , 0, Lc2}; Point(4) = {-e3-r , h1+r , 0, Lc2};
Point(5) = {-e3 , h1+r , 0, Lc2}; Point(6) = {-e3 , h1+h2, 0, Lc1};
Point(7) = { e3 , h1+h2, 0, Lc1}; Point(8) = { e3 , h1+r , 0, Lc2};
Point(9) = { e3+r , h1+r , 0, Lc2}; Point(10)= { e3+r , h1 , 0, Lc2};
Point(11)= { e1+e2, h1 , 0, Lc1}; Point(12)= { e1+e2, 0 , 0, Lc1};
Point(13)= { e2 , 0 , 0, Lc1};

Point(14)= { R1 / ssin, h5+R1*ccos, 0, Lc2};


Point(15)= { 0 , h5 , 0, Lc2};
Point(16)= {-R1 / ssin, h5+R1*ccos, 0, Lc2};
Point(17)= {-e2 , 0.0 , 0, Lc1};

Point(18)= {-R2 , h1+h3 , 0, Lc2}; Point(19)= {-R2 , h1+h3+h4, 0, Lc2};


Point(20)= { 0 , h1+h3+h4, 0, Lc2}; Point(21)= { R2 , h1+h3+h4, 0, Lc2};
Point(22)= { R2 , h1+h3 , 0, Lc2}; Point(23)= { 0 , h1+h3 , 0, Lc2};

Point(24)= { 0, h1+h3+h4+R2, 0, Lc2}; Point(25)= { 0, h1+h3-R2, 0, Lc2};

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 circle’s 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:

Line(4) = {14,13}; Line(5) = {13,12}; Line(6) = {12,11};


Line(7) = {11,10}; Circle(8) = {8,9,10}; Line(9) = {8,7};
Line(10) = {7,6}; Line(11) = {6,5}; Circle(12) = {3,4,5};
Line(13) = {3,2}; Line(14) = {2,1}; Line(15) = {18,19};
Circle(16) = {21,20,24}; Circle(17) = {24,20,19};
Circle(18) = {18,23,25}; Circle(19) = {25,23,22};
Line(20) = {21,22};

Line Loop(21) = {17,-15,18,19,-20,16};


Plane Surface(22) = {21};

// But we still need to define the exterior surface. Since this surface has a
// hole, its definition now requires two lines loops:

Line Loop(23) = {11,-12,13,14,1,2,-3,4,5,6,7,-8,9,10};


Plane Surface(24) = {23,21};
Appendix A: Tutorial 131

// As a general rule, if a surface has N holes, it is defined by N+1 line loops:


// the first loop defines the exterior boundary; the other loops define the
// boundaries of the holes.

// Finally, we can add some comments by embedding a post-processing view


// containing some strings:

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" };

// If a string starts with ‘file://’, the rest is interpreted as an image


// file. For 3D annotations, the size in model coordinates can be specified
// after a ‘@’ symbol in the form ‘widthxheight’ (if one of ‘width’ or
// ‘height’ is zero, natural scaling is used; if both are zero, original image
// dimensions in pixels are used):
T3(0, 0.09, 0, TextAttributes("Align", "Center")){ "file://image.png@0.01x0" };

// The 3D orientation of the image can be specified by proving the direction


// of the bottom and left edge of the image in model space:
T3(-0.01, 0.09, 0, 0){ "file://image.png@0.01x0,0,0,1,0,1,0" };

// 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://image.png@0.01x0#" };

// The size of 2D annotations is given directly in pixels:


T2(350, -7, 0){ "file://image.png@20x0" };
};

// Views and geometrical entities can be made to respond to double-click events:

View[0].DoubleClickedCommand = "Printf(’View[0] has been double-clicked!’);";


Geometry.DoubleClickedLineCommand = "Printf(’Line %g has been double-clicked!’,
Geometry.DoubleClickedEntityTag);";

// We can also change the color of some mesh entities:

Color Grey50{ Surface{ 22 }; }


Color Purple{ Surface{ 24 }; }
Color Red{ Line{ 1:14 }; }
Color Yellow{ Line{ 15:20 }; }
132 Gmsh 3.0

A.5 t5.geo
/*********************************************************************
*
* Gmsh tutorial 5
*
* Characteristic lengths, arrays of variables, macros, loops
*
*********************************************************************/

// We start by defining some target mesh sizes:

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.

// We proceed by defining some elementary entities describing a truncated cube:

Point(1) = {0.5,0.5,0.5,lcar2}; Point(2) = {0.5,0.5,0,lcar1};


Point(3) = {0,0.5,0.5,lcar1}; Point(4) = {0,0,0.5,lcar1};
Point(5) = {0.5,0,0.5,lcar1}; Point(6) = {0.5,0,0,lcar1};
Point(7) = {0,0.5,0,lcar1}; Point(8) = {0,1,0,lcar1};
Point(9) = {1,1,0,lcar1}; Point(10) = {0,0,1,lcar1};
Point(11) = {0,1,1,lcar1}; Point(12) = {1,1,1,lcar1};
Point(13) = {1,0,1,lcar1}; Point(14) = {1,0,0,lcar1};

Line(1) = {8,9}; Line(2) = {9,12}; Line(3) = {12,11};


Line(4) = {11,8}; Line(5) = {9,14}; Line(6) = {14,13};
Line(7) = {13,12}; Line(8) = {11,10}; Line(9) = {10,13};
Line(10) = {10,4}; Line(11) = {4,5}; Line(12) = {5,6};
Line(13) = {6,2}; Line(14) = {2,1}; Line(15) = {1,3};
Appendix A: Tutorial 133

Line(16) = {3,7}; Line(17) = {7,2}; Line(18) = {3,4};


Line(19) = {5,1}; Line(20) = {7,8}; Line(21) = {6,14};

Line Loop(22) = {-11,-19,-15,-18}; Plane Surface(23) = {22};


Line Loop(24) = {16,17,14,15}; Plane Surface(25) = {24};
Line Loop(26) = {-17,20,1,5,-21,13}; Plane Surface(27) = {26};
Line Loop(28) = {-4,-1,-2,-3}; Plane Surface(29) = {28};
Line Loop(30) = {-7,2,-5,-6}; Plane Surface(31) = {30};
Line Loop(32) = {6,-9,10,11,12,21}; Plane Surface(33) = {32};
Line Loop(34) = {7,3,8,9}; Plane Surface(35) = {34};
Line Loop(36) = {-10,18,-16,-20,4,-8}; Plane Surface(37) = {36};
Line Loop(38) = {-14,-13,-12,19}; Plane Surface(39) = {38};

// Instead of using included files, we now use a user-defined macro in order


// to carve some holes in the cube:

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.)

p1 = newp; Point(p1) = {x, y, z, lcar3} ;


p2 = newp; Point(p2) = {x+r,y, z, lcar3} ;
p3 = newp; Point(p3) = {x, y+r,z, lcar3} ;
p4 = newp; Point(p4) = {x, y, z+r,lcar3} ;
p5 = newp; Point(p5) = {x-r,y, z, lcar3} ;
p6 = newp; Point(p6) = {x, y-r,z, lcar3} ;
p7 = newp; Point(p7) = {x, y, z-r,lcar3} ;

c1 = newreg; Circle(c1) = {p2,p1,p7}; c2 = newreg; Circle(c2) = {p7,p1,p5};


c3 = newreg; Circle(c3) = {p5,p1,p4}; c4 = newreg; Circle(c4) = {p4,p1,p2};
c5 = newreg; Circle(c5) = {p2,p1,p3}; c6 = newreg; Circle(c6) = {p3,p1,p5};
c7 = newreg; Circle(c7) = {p5,p1,p6}; c8 = newreg; Circle(c8) = {p6,p1,p2};
c9 = newreg; Circle(c9) = {p7,p1,p3}; c10 = newreg; Circle(c10) = {p3,p1,p4};
c11 = newreg; Circle(c11) = {p4,p1,p6}; c12 = newreg; Circle(c12) = {p6,p1,p7};

// We need non-plane surfaces to define the spherical holes. Here we use ruled
// surfaces, which can have 3 or 4 sides:

l1 = newreg; Line Loop(l1) = {c5,c10,c4}; Surface(newreg) = {l1};


l2 = newreg; Line Loop(l2) = {c9,-c5,c1}; Surface(newreg) = {l2};
l3 = newreg; Line Loop(l3) = {c12,-c8,-c1}; Surface(newreg) = {l3};
l4 = newreg; Line Loop(l4) = {c8,-c4,c11}; Surface(newreg) = {l4};
134 Gmsh 3.0

l5 = newreg; Line Loop(l5) = {-c10,c6,c3}; Surface(newreg) = {l5};


l6 = newreg; Line Loop(l6) = {-c11,-c3,c7}; Surface(newreg) = {l6};
l7 = newreg; Line Loop(l7) = {-c2,-c7,-c12}; Surface(newreg) = {l7};
l8 = newreg; Line Loop(l8) = {-c6,-c9,c2}; Surface(newreg) = {l8};

// 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 ;

Surface Loop(theloops[t]) = {l8+1,l5+1,l1+1,l2+1,l3+1,l7+1,l6+1,l4+1};

thehole = newreg ;
Volume(thehole) = theloops[t] ;

Return

// We can use a ‘For’ loop to generate five holes in the cube:

x = 0 ; y = 0.75 ; z = 0 ; r = 0.09 ;

For t In {1:5}

x += 0.166 ;
z += 0.166 ;

// We call the ‘CheeseHole’ macro:

Call CheeseHole ;

// We define a physical volume for each hole:

Physical Volume (t) = thehole ;

// 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.):

Printf("Hole %g (center = {%g,%g,%g}, radius = %g) has number %g!",


t, x, y, z, r, thehole) ;

EndFor

// We can then define the surface loop for the exterior surface of the cube:

theloops[0] = newreg ;
Appendix A: Tutorial 135

Surface Loop(theloops[0]) = {35,31,29,37,33,23,39,25,27} ;

// 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):

Physical Volume (10) = 186 ;

// 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
*
*********************************************************************/

// Let’s 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}; }

p1 = newp; Point(p1) = {-0.05, 0.05, 0, lc};


p2 = newp; Point(p2) = {-0.05, 0.1, 0, lc};

l1 = newl; Line(l1) = {1, p1};


l2 = newl; Line(l2) = {p1, p2};
l3 = newl; Line(l3) = {p2, 4};

// Create surface
Line Loop(2) = {2, -1, l1, l2, l3, -3};
136 Gmsh 3.0

Plane Surface(1) = {-2};

// Put 20 points with a refinement toward the extremities on curve 2


Transfinite Line{2} = 20 Using Bump 0.05;

// 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;

// Put 30 points following a geometric progression on curve 1 (reversed) and on


// curve 3
Transfinite Line{-1,3} = 30 Using Progression 1.2;

// Define the Surface as transfinite, by specifying the four corners of the


// transfinite interpolation
Transfinite Surface{1} = {1,2,3,4};

// (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.)

// Recombine the triangles into quads


Recombine Surface{1};

// Apply an elliptic smoother to the grid


Mesh.Smoothing = 100;

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).

Point(7) = {0.2, 0.2, 0, 1.0};


Point(8) = {0.2, 0.1, 0, 1.0};
Point(9) = {-0, 0.3, 0, 1.0};
Point(10) = {0.25, 0.2, 0, 1.0};
Point(11) = {0.3, 0.1, 0, 1.0};
Line(10) = {8, 11};
Line(11) = {11, 10};
Line(12) = {10, 7};
Line(13) = {7, 8};
Line Loop(14) = {13, 10, 11, 12};
Plane Surface(15) = {14};
Appendix A: Tutorial 137

Transfinite Line {10:13} = 10;


Transfinite Surface{15};

A.7 t7.geo
/*********************************************************************
*
* Gmsh tutorial 7
*
* Background mesh
*
*********************************************************************/

// Characteristic lengths can be specified very accuractely by providing a


// background mesh, i.e., a post-processing view that contains the target mesh
// sizes.

// Merge the first tutorial


Merge "t1.geo";

// Merge a post-processing view containing the target mesh sizes


Merge "bgmesh.pos";

// Apply the view as the current background mesh


Background Mesh View[0];

A.8 t8.geo
/*********************************************************************
*
* Gmsh tutorial 8
*
* Post-processing, scripting, animations, options
*
*********************************************************************/

// We first include ‘t1.geo’ as well as some post-processing views:

Include "t1.geo";
Include "view1.pos";
Include "view1.pos";
Include "view4.pos";

// We then set some general options:

General.Trackball = 0;
General.RotationX = 0; General.RotationY = 0; General.RotationZ = 0;
General.Color.Background = White; General.Color.Foreground = Black;
138 Gmsh 3.0

General.Color.Text = Black;
General.Orthographic = 0;
General.Axes = 0; General.SmallAxes = 0;

// We also set some options for each post-processing view:

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;

For num In {1:3}

View[v0].TimeStep = t;
View[v1].TimeStep = t;
View[v2].TimeStep = t;
View[v3].TimeStep = t;
Appendix A: Tutorial 139

t = (View[v0].TimeStep < View[v0].NbTimeStep-1) ? t+1 : 0;

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;

// It is possible to nest loops:


For num2 In {1:frames}

General.RotationX += 10;
General.RotationY = General.RotationX / 3;
General.RotationZ += 0.1;

Sleep 0.01; // sleep for 0.01 second


Draw; // draw the scene (one could use DrawForceChanged instead to force the
// reconstruction of the vertex arrays, e.g. if changing element
// clipping)

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 mpeg_encode (create parameter file first, then run encoder):


/*
Printf("PATTERN I") > "t8.par";
Printf("BASE_FILE_FORMAT PPM") >> "t8.par";
140 Gmsh 3.0

Printf("GOP_SIZE 1") >> "t8.par";


Printf("SLICES_PER_FRAME 1") >> "t8.par";
Printf("PIXEL HALF") >> "t8.par";
Printf("RANGE 10") >> "t8.par";
Printf("PSEARCH_ALG EXHAUSTIVE") >> "t8.par";
Printf("BSEARCH_ALG CROSS2") >> "t8.par";
Printf("IQSCALE 1") >> "t8.par";
Printf("PQSCALE 1") >> "t8.par";
Printf("BQSCALE 25") >> "t8.par";
Printf("REFERENCE_FRAME DECODED") >> "t8.par";
Printf("OUTPUT t8.mpg") >> "t8.par";
Printf("INPUT_CONVERT *") >> "t8.par";
Printf("INPUT_DIR .") >> "t8.par";
Printf("INPUT") >> "t8.par";
tmp = Sprintf("t8-*.ppm [01-%02g]", frames);
Printf(tmp) >> "t8.par";
Printf("END_INPUT") >> "t8.par";
System "mpeg_encode t8.par";
*/

// 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 141

// Plugins can be added to Gmsh in order to extend its capabilities. For


// example, post-processing plugins can modify a view, or create a new view
// based on previously loaded views. Several default plugins are statically
// linked with Gmsh, e.g. Isosurface, CutPlane, CutSphere, Skin, Transform or
// Smooth. Plugins can be controlled in the same way as other options: either
// from the graphical interface (right click on the view button, then
// ‘Plugins’), or from the command file.

// Let us for example include a three-dimensional scalar view:

Include "view3.pos" ;

// We then set some options for the ‘Isosurface’ plugin (which extracts an
// isosurface from a 3D scalar view), and run it:

Plugin(Isosurface).Value = 0.67 ; // iso-value level


Plugin(Isosurface).View = 0 ; // source view is View[0]
Plugin(Isosurface).Run ; // run the plugin!

// 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).Text = "A nice title" ;


Plugin(Annotate).X = 1.e5;
Plugin(Annotate).Y = 50 ;
Plugin(Annotate).Font = "Times-BoldItalic" ;
Plugin(Annotate).FontSize = 28 ;
Plugin(Annotate).Align = "Center" ;
Plugin(Annotate).View = 0 ;
Plugin(Annotate).Run ;

Plugin(Annotate).Text = "(and a small subtitle)" ;


Plugin(Annotate).Y = 70 ;
Plugin(Annotate).Font = "Times-Roman" ;
Plugin(Annotate).FontSize = 12 ;
142 Gmsh 3.0

Plugin(Annotate).Run ;

// We finish by setting some options:

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
*
*********************************************************************/

// In addition to specifying target mesh sizes at the points of the


// geometry (see t1) or using a background mesh (see t7), you can use
// general mesh size "Fields".

// Let’s create a simple rectangular geometry


lc = .15;
Point(1) = {0.0,0.0,0,lc}; Point(2) = {1,0.0,0,lc};
Point(3) = {1,1,0,lc}; Point(4) = {0,1,0,lc};
Point(5) = {0.2,.5,0,lc};

Line(1) = {1,2}; Line(2) = {2,3}; Line(3) = {3,4}; Line(4) = {4,1};

Line Loop(5) = {1,2,3,4}; Plane Surface(6) = {5};

// 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 143

// the attractors (i.e., around point 5 and line 1)


//
// LcMax - /------------------
// /
// /
// /
// LcMin -o----------------/
// | | |
// Attractor DistMin DistMax
Field[2] = Threshold;
Field[2].IField = 1;
Field[2].LcMin = lc / 30;
Field[2].LcMax = lc;
Field[2].DistMin = 0.15;
Field[2].DistMax = 0.5;

// 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, let’s 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, let’s use the minimum of all the fields as the background mesh field
144 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. Let’s define
// a simple geometry with an analytical mesh size field:

Point(1) = {-1.25, -.5, 0}; Point(2) = {1.25, -.5, 0};


Point(3) = {1.25, 1.25, 0}; Point(4) = {-1.25, 1.25, 0};

Line(1) = {1, 2}; Line(2) = {2, 3};


Line(3) = {3, 4}; Line(4) = {4, 1};

Line Loop(4) = {1, 2, 3, 4}; Plane Surface(100) = {4};

Field[1] = MathEval;
Field[1].F = "0.01*(1.0+30.*(y-x*x)*(y-x*x) + (1-x)*(1-x))";
Background Field = 1;

// To generate quadrangles instead of triangles, we can simply add


Recombine Surface{100};

// If we’d had several surfaces, we could have used ’Recombine Surface "*";’.
// Yet another way would be to specify the global option "Mesh.RecombineAll =
// 1;".

// The default recombination algorithm is called "Blossom": it uses a minimum


// cost perfect matching algorithm to generate fully quadrilateral meshes from
// triangulations. More details about the algorithm can be found in the
// following paper: J.-F. Remacle, J. Lambrechts, B. Seny, E. Marchandise,
// A. Johnen and C. Geuzaine, "Blossom-Quad: a non-uniform quadrilateral mesh
Appendix A: Tutorial 145

// generator using a minimum cost perfect matching algorithm", International


// Journal for Numerical Methods in Engineering, 2011 (in press).

// 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
*
*********************************************************************/

// Compound geometrical entities can be defined to compute a new parametrization


// of groups of elementary geometrical entities. This parametrization can then
// be used for remeshing the compound as if it were a single CAD entity.

lc = 0.1;

Point(1) = {0, 0, 0, lc}; Point(2) = {1, 0, 0, lc};


Point(3) = {1, 1, 0.5, lc}; Point(4) = {0, 1, 0.4, lc};
Point(5) = {0.3, 0.2, 0, lc}; Point(6) = {0, 0.01, 0.01, lc};
Point(7) = {0, 0.02, 0.02, lc}; Point(8) = {1, 0.05, 0.02, lc};
Point(9) = {1, 0.32, 0.02, lc};

Line(1) = {1, 2}; Line(2) = {2, 8}; Line(3) = {8, 9};


Line(4) = {9, 3}; Line(5) = {3, 4}; Line(6) = {4, 7};
Line(7) = {7, 6}; Line(8) = {6, 1}; Spline(9) = {7, 5, 9};
Line(10) = {6, 8};

Line Loop(11) = {5, 6, 9, 4}; Surface(12) = {11};


Line Loop(13) = {9, -3, -10, -7}; Surface(14) = {13};
Line Loop(15) = {10, -2, -1, -8}; Surface(16) = {15};

// Treat lines 2, 3 and 4 as a single line


Compound Line(100) = {2, 3, 4};
// Idem with lines 6, 7 and 8
Compound Line(101) = {6, 7, 8};

// Treat surfaces 12, 14 and 16 as a single surface


Compound Surface(200) = {12, 14, 16};
146 Gmsh 3.0

// Add option to toggle visibility of sub-entities


DefineConstant[ hide = {Geometry.HideCompounds, Choices{0,1},
Name "Hide compound sub-entities", GmshOption "Geometry.HideCompounds",
AutoCheck 0} ];

// More details about the reparametrization technique can be found in the


// following papers:
//
// * J.-F. Remacle, C. Geuzaine, G. Compre and E. Marchandise, "High-Quality
// Surface Remeshing Using Harmonic Maps", International Journal for Numerical
// Methods in Engineering, 83 (4), pp. 403-425, 2010.
//
// * E. Marchandise, G. Compre, M. Willemet, G. Bricteux, C. Geuzaine and J-F
// Remacle, "Quality meshing based on STL triangulations for biomedical
// simulations", International Journal for Numerical Methods in Biomedical
// Engineering", 26 (7), pp. 876-889, 2010.
//
// * E. Marchandise, C. Carton de Wiart, W. G. Vos, C. Geuzaine and
// J.-F. Remacle, "High Quality Surface Remeshing Using Harmonic Maps. Part
// II: Surfaces with High Genus and of Large Aspect Ratio", International
// Journal for Numerical Methods in Engineering, 86 (11), pp. 1303-1321, 2011.

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 there’s usually only a single
// elementary geometrical entity per compound.

// Let’s 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";

// Since the original mesh is a bit coarse, we refine it once


RefineMesh;

// Create the topology of the discrete model


CreateTopology;
Appendix A: Tutorial 147

// 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};

Physical Surface(1) = {s : s + #ss[]-1};


Physical Volume(1) = 1;
Physical Line(1) = {26 ... 37};

// element size imposed by a size field


Field[1] = MathEval;
Field[1].F = "2.0";
Background Field = 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
*
148 Gmsh 3.0

* Homology and cohomology computation


*
*********************************************************************/

// Homology computation in Gmsh finds representative chains of (relative)


// (co)homology space bases using a mesh of a model. The representative basis
// chains are stored in the mesh as physical groups of Gmsh, one for each chain.

// Create an example geometry

m = 0.5; // mesh characteristic length


h = 2; // height in the z-direction

Point(1) = {0, 0, 0, m}; Point(2) = {10, 0, 0, m};


Point(3) = {10, 10, 0, m}; Point(4) = {0, 10, 0, m};
Point(5) = {4, 4, 0, m}; Point(6) = {6, 4, 0, m};
Point(7) = {6, 6, 0, m}; Point(8) = {4, 6, 0, m};

Point(9) = {2, 0, 0, m}; Point(10) = {8, 0, 0, m};


Point(11) = {2, 10, 0, m}; Point(12) = {8, 10, 0, m};

Line(1) = {1, 9}; Line(2) = {9, 10}; Line(3) = {10, 2};


Line(4) = {2, 3}; Line(5) = {3, 12}; Line(6) = {12, 11};
Line(7) = {11, 4}; Line(8) = {4, 1}; Line(9) = {5, 6};
Line(10) = {6, 7}; Line(11) = {7, 8}; Line(12) = {8, 5};

Line Loop(13) = {6, 7, 8, 1, 2, 3, 4, 5};


Line Loop(14) = {11, 12, 9, 10};
Plane Surface(15) = {13, 14};

Extrude {0, 0, h}{ Surface{15}; }

// 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};

// Four "terminals" of the model


Physical Surface(70) = {36};
Physical Surface(71) = {44};
Physical Surface(72) = {52};
Physical Surface(73) = {60};

// Whole domain surface


bnd[] = Boundary{ Volume{1}; };
Appendix A: Tutorial 149

Physical Surface(80) = bnd[];

// Complement of the domain surface respect to the four terminals


bnd[] -= {36, 44, 52, 60};
Physical Surface(75) = bnd[];

// 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}};

// Find cohomology space bases isomorphic to the previous bases: cohomology


// spaces of the domain modulo the four terminals, a.k.a the thick cuts.
Cohomology {{1}, {70, 71, 72, 73}};

// More examples:
// Homology {1};
// Homology;
// Homology {{1}, {80}};
// Homology {{}, {80}};

A.15 t15.geo
/*********************************************************************
*
* Gmsh tutorial 15
*
* Embedded points, lines and surfaces
*
*********************************************************************/

// We start one again by including the first tutorial:


Include "t1.geo";

// We change the mesh size to generate coarser mesh


lc = lc * 4;
Characteristic Length {1:4} = lc;

// We define a new point


Point(5) = {0.02, 0.02, 0, lc};

// One can force this point to be included ("embedded") in the 2D mesh, using
// the "Point In Surface" command:
Point{5} In Surface{1};
150 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 151

// Instead of constructing a model in a bottom-up fashion with Gmsh’s built-in


// geometry kernel, starting with version 3 Gmsh allows you to directly use
// alternative geometry kernels. Let us use the OpenCASCADE kernel:

SetFactory("OpenCASCADE");

// And let’s build the same model as in t5.geo, but using constructive solid
// geometry:

Block(1) = {0,0,0, 1,1,1};


Block(2) = {0,0,0, 0.5,0.5,0.5};
BooleanDifference(3) = { Volume{1}; Delete; }{ Volume{2}; Delete; };
x = 0 ; y = 0.75 ; z = 0 ; r = 0.09 ;
For t In {1:5}
x += 0.166 ;
z += 0.166 ;
Sphere(3 + t) = {x,y,z,r};
EndFor
v() = BooleanFragments{ Volume{3}; Delete; }{ Volume{3+1:3+5}; Delete; };

s() = Unique(Abs(Boundary{ Volume{v()}; }));


l() = Unique(Abs(Boundary{ Surface{s()}; }));
p() = Unique(Abs(Boundary{ Line{l()}; }));
Characteristic Length{p()} = 0.055;

// Additional examples are available in the demos/boolean directory.


Appendix B: Options 153

Appendix B Options

This appendix lists all the available options. Gmsh’s 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.

B.1 General options list


General.AxesFormatX
Number format for X-axis (in standard C form)
Default value: "%.3g"
Saved in: General.OptionsFileName

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
154 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 155

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
156 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 157

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
158 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 159

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
160 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 161

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: -
162 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 163

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
164 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 165

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
166 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 167

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
168 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 169

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: -
170 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 171

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.NumThreads
Set (maximum) number of threads
Default value: 1
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
172 Gmsh 3.0

General.PluginHeight
Height (in pixels) of the plugin window
Default value: 320
Saved in: General.SessionFileName

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: -
Appendix B: Options 173

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)
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: -
174 Gmsh 3.0

General.Shininess
Material shininess
Default value: 0.4
Saved in: General.OptionsFileName
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
Appendix B: Options 175

General.Stereo
Use stereo rendering
Default value: 0
Saved in: General.OptionsFileName

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: -
176 Gmsh 3.0

General.TranslationX
X-axis translation (in model units)
Default value: 0
Saved in: -

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
Appendix B: Options 177

General.Color.Foreground
Foreground color
Default value: {85,85,85}
Saved in: General.OptionsFileName

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
178 Gmsh 3.0

Print.ParameterLast
Last value of print parameter in loop
Default value: 1
Saved in: General.OptionsFileName

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
Appendix B: Options 179

Print.EpsLineWidthFactor
Width factor for lines in PostScript/PDF output
Default value: 1
Saved in: General.OptionsFileName

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
180 Gmsh 3.0

Print.GifSort
Sort the colormap in GIF output
Default value: 1
Saved in: General.OptionsFileName
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.PostSICN
Save SICN (signed inverse condition number) quality measure in mesh statistics
exported as post-processing views
Default value: 0
Saved in: General.OptionsFileName
Appendix B: Options 181

Print.PostSICN
Save SIGE (signed inverse gradient error) 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
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

B.2 Geometry options list


Geometry.DoubleClickedPointCommand
Command parsed when double-clicking on a point
Default value: ""
Saved in: General.OptionsFileName
182 Gmsh 3.0

Geometry.DoubleClickedLineCommand
Command parsed when double-clicking on a line
Default value: ""
Saved in: General.OptionsFileName
Geometry.DoubleClickedSurfaceCommand
Command parsed when double-clicking on a surface
Default value: ""
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
Appendix B: Options 183

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

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
184 Gmsh 3.0

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

Geometry.NumSubEdges
Number of edge subdivisions between control points when displaying curves
Default value: 20
Saved in: General.OptionsFileName

Geometry.OCCAutoFix
Automatically fix orientation of wires, faces, shells and volumes when creating
new entities
Default value: 1
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
Appendix B: Options 185

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: -
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
186 Gmsh 3.0

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.ReparamOnFaceRobust
Use projection for reparametrization of a point classified on GEdge on a GFace
Default value: 0
Saved in: General.OptionsFileName

Geometry.ScalingFactor
Global geometry scaling factor
Default value: 1
Saved in: General.OptionsFileName

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
Appendix B: Options 187

Geometry.SurfaceType
Surface display type (0=cross, 1=wireframe, 2=solid)
Default value: 0
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

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: -
188 Gmsh 3.0

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: -

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
Appendix B: Options 189

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
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

B.3 Mesh options list


Mesh.Algorithm
2D mesh algorithm (1=MeshAdapt, 2=Automatic, 5=Delaunay, 6=Frontal,
7=BAMG, 8=DelQuad)
Default value: 2
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
190 Gmsh 3.0

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
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
Appendix B: Options 191

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

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
192 Gmsh 3.0

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

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
Appendix B: Options 193

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: -
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
194 Gmsh 3.0

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
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
Appendix B: Options 195

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

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.MaxNumThreads1D
Maximum number of threads for 1D meshing (0: use default number of threads)
Default value: 0
Saved in: General.OptionsFileName

Mesh.MaxNumThreads2D
Maximum number of threads for 2D meshing (0: use default number of threads)
Default value: 0
Saved in: General.OptionsFileName

Mesh.MaxNumThreads3D
Maximum number of threads for 3D meshing (0: use default number of threads)
Default value: 0
Saved in: General.OptionsFileName

Mesh.MeshOnlyVisible
Mesh only visible entities (experimental: use with caution!)
Default value: 0
Saved in: General.OptionsFileName
196 Gmsh 3.0

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
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
Appendix B: Options 197

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: -

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: -
198 Gmsh 3.0

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

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
Appendix B: Options 199

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
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=SICN~signed inverse condition number,
1=SIGE~signed inverse gradient error, 2=gamma~vol/sum face/max edge,
200 Gmsh 3.0

3=Disto~minJ/maxJ
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
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
Appendix B: Options 201

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
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 don’t support saving phys-
ical or partition ids (1=elementary, 2=physical, 3=partition)
Default value: 1
Saved in: General.OptionsFileName
202 Gmsh 3.0

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

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
Appendix B: Options 203

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

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 user’s 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
204 Gmsh 3.0

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

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
Appendix B: Options 205

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

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
206 Gmsh 3.0

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

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
Appendix B: Options 207

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
Mesh.Color.Nineteen
Color 19 in color carousel
Default value: {184,0,255}
Saved in: General.OptionsFileName

B.4 Solver options list


Solver.Executable0
System command to launch solver 0
Default value: ""
Saved in: General.SessionFileName
Solver.Executable1
System command to launch solver 1
Default value: ""
Saved in: General.SessionFileName
Solver.Executable2
System command to launch solver 2
Default value: ""
Saved in: General.SessionFileName
208 Gmsh 3.0

Solver.Executable3
System command to launch solver 3
Default value: ""
Saved in: General.SessionFileName

Solver.Executable4
System command to launch solver 4
Default value: ""
Saved in: General.SessionFileName

Solver.Executable5
System command to launch solver 5
Default value: ""
Saved in: General.SessionFileName

Solver.Executable6
System command to launch solver 6
Default value: ""
Saved in: General.SessionFileName

Solver.Executable7
System command to launch solver 7
Default value: ""
Saved in: General.SessionFileName

Solver.Executable8
System command to launch solver 8
Default value: ""
Saved in: General.SessionFileName

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
Appendix B: Options 209

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

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
210 Gmsh 3.0

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

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
Appendix B: Options 211

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
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
212 Gmsh 3.0

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)
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
Appendix B: Options 213

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

B.5 Post-processing options list


PostProcessing.DoubleClickedGraphPointCommand
Command parsed when double-clicking on a graph data point (e.g. Merge
Sprintf(’file %g.pos’, PostProcessing.GraphPointX);)
Default value: ""
Saved in: General.OptionsFileName
PostProcessing.GraphPointCommand
Synonym for ‘DoubleClickedGraphPointCommand’
Default value: ""
Saved in: General.OptionsFileName
PostProcessing.AnimationDelay
Delay (in seconds) between frames in automatic animation mode
Default value: 0.1
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: -
214 Gmsh 3.0

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: -
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
Appendix B: Options 215

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

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: -
216 Gmsh 3.0

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
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
Appendix B: Options 217

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

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
218 Gmsh 3.0

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
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
Appendix B: Options 219

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

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
220 Gmsh 3.0

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
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
Appendix B: Options 221

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

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: -
222 Gmsh 3.0

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

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
Appendix B: Options 223

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

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
224 Gmsh 3.0

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
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: -
Appendix B: Options 225

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: -
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: -
226 Gmsh 3.0

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: -
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: -
Appendix B: Options 227

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

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
228 Gmsh 3.0

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

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: -
Appendix B: Options 229

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: -

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
230 Gmsh 3.0

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

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
Appendix B: Options 231

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
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 233

Appendix C Compiling the source code


Stable releases and source snapshots are available from http://gmsh.info/src/. You can
also access the Git repository directly:
1. The first time you want to download the latest full source, type:
git clone http://gitlab.onelab.info/gmsh/gmsh.git
2. To update your local version to the latest and greatest, go in the gmsh directory and
type:
git pull
Once you have the source code, you need to run CMake to configure your build (see the
README.txt file in the top-level source directory for detailed information on how to run
CMake).
Each build can be configured using a series of options, to selectively enable optional modules
or features. Here is the list of CMake options:
ENABLE_3M
Enable proprietary 3M extension (default: OFF)
ENABLE_ACIS
Enable ACIS geometrical models (experimental) (default: ON)
ENABLE_ANN
Enable ANN (used for fast point search in mesh/post) (default: ON)
ENABLE_BAMG
Enable Bamg 2D anisotropic mesh generator (default: ON)
ENABLE_BFGS
Enable BFGS (used by some mesh optimizers) (default: ON)
ENABLE_BLAS_LAPACK
Enable BLAS/Lapack for linear algebra (required for meshing) (default: ON)
ENABLE_BLOSSOM
Enable Blossom algorithm (needed for full quad meshing) (default: ON)
ENABLE_BUILD_LIB
Enable ’lib’ target for building static Gmsh library (default: OFF)
ENABLE_BUILD_SHARED
Enable ’shared’ target for building shared Gmsh library (default: OFF)
ENABLE_BUILD_DYNAMIC
Enable dynamic Gmsh executable (linked with shared lib) (default: OFF)
ENABLE_BUILD_ANDROID
Enable Android NDK library target (experimental) (default: OFF)
ENABLE_BUILD_IOS
Enable iOS (ARM) library target (experimental) (default: OFF)
ENABLE_CGNS
Enable CGNS mesh export (experimental) (default: OFF)
234 Gmsh 3.0

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 235

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)
236 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 237

Appendix D Information for developers


Gmsh is written in C++, the scripting language is parsed using Lex and Yacc (actu-
ally, Flex and Bison), and the GUI relies on OpenGL for the 3D graphics and FLTK
(http://www.fltk.org) for the widget set. Gmsh’s build system is based on CMake
(http://www.cmake.org). Practical notes on how to compile Gmsh’s source code is pro-
vided in Appendix C [Compiling the source code], page 233 (see also Appendix E [Frequently
asked questions], page 239).

D.1 Source code structure


Gmsh’s code is structured in several subdirectories, roughly separated between the four
core modules (Geo, Mesh, Solver, Post) and associated utilities (Common, Numeric) on one
hand, and the graphics (Graphics) and interface (Fltk, Parser) code on the other.
The geometry and mesh modules are based on an object-oriented model class
(Geo/GModel.h), built upon abstract geometrical entity classes (Geo/GVertex.h,
Geo/GEdge.h, Geo/GFace.h and Geo/GRegion.h). Concrete implementations of the geo-
metrical entity classes are provided for each supported CAD kernel (e.g. Geo/gmshVertex.h
for geometry points in Gmsh’s native CAD format, or Geo/OCCVertex.h for geometry
points from OpenCASCADE). The post-processing module is based on the concept of
views (Post/PView.h) and abstract data containers (derived from Post/PViewData.h).

D.2 Coding style


If you plan to contribute code to the Gmsh project, here are some easy rules to make the
code easy to read/debug/maintain:
1. Please enable full warnings for your compiler (e.g. -Wall with g++) and don’t commit
until there is no warning left.
2. Use memory checking tools to detect memory leaks and other nasty memory problems.
For example, you can use
• Valgrind on Linux:
valgrind --leak-check=yes --show-reachable=yes gmsh file.geo -3
• GMALLOC on Mac OS X:
(gdb) set env DYLD_INSERT_LIBRARIES /usr/lib/libgmalloc.dylib
• LIBNJAMD:
export LD_PRELOAD=libnjamd.so
kill -USR1
• Purify
• Memprof
• ...
3. always use the Msg:: class to print information or errors
4. indent your files (2 spaces) and convert all tabs to spaces
5. follow the style used in the existing code when adding something new (spaces after
commas, opening braces for functions on a separate line, opening braces for loops and
tests on the same line, etc.)
238 Gmsh 3.0

D.3 Adding a new option


To add a new option in Gmsh:
1. create the option in the CTX class (Common/Context.h if it’s a classical option, or in the
PViewOptions class (Post/PViewOptions.h) if it’s a post-processing view-dependent
option;
2. in Common/DefaultOptions.h, give a name (for the parser to be able to access it), a
reference to a handling routine (i.e. opt_XXX) and a default value for this option;
3. create the handling routine opt_XXX in Common/Options.cpp (and add the prototype
in Common/Options.h);
4. optional: create the associated widget in Fltk/optionWindow.h;
Appendix E: Frequently asked questions 239

Appendix E Frequently asked questions

E.1 The basics


1. What is Gmsh?
Gmsh is an automatic three-dimensional finite element mesh generator with built-in
pre- and post-processing facilities. With Gmsh you can create or import 1D, 2D and
3D geometrical models, mesh them, launch external finite element solvers and visualize
solutions. Gmsh can be used either as a stand-alone program (graphical or not) or as
a C++ library.
2. What are the terms and conditions of use?
Gmsh is distributed under the terms of the GNU General Public License, with an
exception to allow for easier linking with external libraries. See Appendix H [License],
page 267 for more information.
3. What does ’Gmsh’ mean?
Nothing... The name was derived from a previous version called “msh” (a shortcut for
“mesh”), with the “g” prefix added to differentiate it. The default mesh file format
used by Gmsh still uses the ‘.msh’ extension.
In English people tend to pronounce ‘Gmsh’ as “gee-mesh”.
4. Where can I find more information?
http://gmsh.info is the primary location to obtain information about Gmsh. There
you will for example find the complete reference manual, a bug tracking database and
a searchable archive of the Gmsh mailing list (gmsh@onelab.info).

E.2 Installation problems


1. Which OSes does Gmsh run on?
Gmsh runs on Windows, Mac OS X, Linux and most Unix variants.
2. Are there additional requirements to run Gmsh?
You should have the OpenGL libraries installed on your system, and in the
path of the library loader. A free replacement for OpenGL can be found at
http://www.mesa3d.org.
3. How do I compile Gmsh from the source code?
You need cmake (http://www.cmake.org) and a C++ compiler. See Appendix C [Com-
piling the source code], page 233 and the README.txt file in the top-level source
directory for more information.
4. Where does Gmsh save its configuration files?
Gmsh will attempt to save temporary files and persistent configuration options first in
the $GMSH_HOME directory, then in $APPDATA (on Windows) or $HOME (on other OSes),
then in $TMP, and finally in $TEMP, in that order. If none of these variables are defined,
Gmsh will try to save/load its configuration files from the current working directory.
240 Gmsh 3.0

E.3 General questions


1. Gmsh (from a binary distribution) complains about missing libraries.
On Windows, if your system complains about missing ‘OPENGL32.DLL’ or ‘GLU32.DLL’
libraries, then OpenGL is not properly installed on your machine. You can download
OpenGL from Microsoft’s web site, or directly from http://www.opengl.org.
On Unix try ‘ldd gmsh’ (or ‘otool -L gmsh’ on Mac OS X) to check if all the required
shared libraries are installed on your system. If not, install them. If it still doesn’t
work, recompile Gmsh from the source code.
2. Gmsh keeps re-displaying its graphics when other windows partially hide the graphical
window.
Disable opaque move in your window manager.
3. The graphics display very slowly.
Are you are executing Gmsh from a remote host (via the network) without GLX? You
should turn double buffering off (with the ‘-nodb’ command line option).
4. There is an ugly “ghost triangulation” in the vector PostScript/PDF files generated by
Gmsh!
No, there isn’t. This “ghost triangulation” is due to the fact that most PostScript
previewers nowadays antialias the graphic primitives when they display the page on
screen. (For example, in gv, you can disable antialising with the ‘State->Antialias’
menu.) You should not see this ghost triangulation in the printed output (on paper).
5. How can I save GIF, JPEG, ..., images?
Just choose the appropriate format in ‘File->Export’. By default Gmsh guesses the
format from the file extension, so you can just type ‘myfile.jpg’ in the dialog and
Gmsh will automatically create a JPEG image file.
6. How can I save MPEG, AVI, ..., animations?
You can create simple MPEG animations by choosing MPEG as the format in ‘File-
>Export’: this allows you to loop over time steps or post-processing data sets, or to
change parameters according to Print.Parameter. To create fully customized anima-
tions or to use different output formats (AVI, MP4, etc.) you should write a script.
Have a look at Section A.8 [t8.geo], page 137 or demos/anim.script for some examples.
7. Can I change values in input fields with the mouse in the GUI?
Yes: dragging the mouse in a numeric input field slides the value! The left button
moves one step per pixel, the middle by ‘10*step’, and the right button by ‘100*step’.
8. Can I copy messages to the clipboard?
Yes: selecting the content of an input field, or lines in the message console (‘Tools-
>Message Console’), copies the selected text to the clipboard.

E.4 Geometry module


1. Does Gmsh support NURBS curves/surfaces?
Yes, but only via STEP, IGES or BREP model import (not in ‘.geo’ files). Gmsh has
to be compiled with OpenCASCADE support for this to work.
Appendix E: Frequently asked questions 241

2. Gmsh is very slow when I use many transformations (Translate, Rotate, Symmetry,
Extrude, etc. ). What’s 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.

E.5 Mesh module


1. What should I do when the 2D unstructured algorithm fails?
Verify that the curves in the model do not self-intersect. If ‘Mesh.RandomFactor*size(triangle)/size(model)
approaches machine accuracy, increase Mesh.RandomFactor.
If everything fails file a bug report with the version of your operating system and the
full geometry.
2. What should I do when the 3D unstructured algorithm fails?
Verify that the surfaces in your model do not self-intersect or partially overlap. If they
don’t, try the other 3D algorithms (‘Tool->Options->Mesh->General->3D algorithm’)
or try to adapt the mesh element sizes in your input file so that the surface mesh better
matches the geometrical details of the model.
If nothing works, file a bug report with the version of your operating system and and
the full geometry.
3. How can I only save tetrahedral elements (not triangles and lines)?
If physical entities are defined, the output mesh only contains those elements that
belong to physical entities. So to save only 3D elements, simply define one (or more)
physical volume(s) and don’t define any physical surfaces or lines.
242 Gmsh 3.0

4. My 2D meshes of IGES files present gaps between surfaces


IGES files do not contain the topology of the model, and tolerance problems can thus
appear when the OpenCASCADE importer cannot identify two (close) curves as actu-
ally being identical.
The best solution is to not use IGES and use STEP instead. If you really have to use
IGES, check that you don’t 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’).
5. The quality of the elements generated by the 3D algorithm is very bad.
Use ‘Optimize quality’ in the mesh menu.
6. 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.
7. 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.
8. 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.
9. 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).
10. 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.
11. 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.
12. 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 properties—this 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 123) for a detailed description and
some examples.
13. How can I display only the mesh associated with selected geometrical entities?
See “How can I display only selected parts of my model?”.
Appendix E: Frequently asked questions 243

14. 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
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.
15. What is the signification of SICN, Gamma and SIGE in Tools->Statistics?
They measure the quality of the tetrahedra in a mesh:
SICN ~signed inverse condition number
Gamma ~ inscribed radius / circumscribed radius
SIGE~signed inverse error on the gradient of FE solution
For the exact definitions, see Geo/MElement.cpp. The graphs plot the the number of
elements vs. the quality measure.
16. Why don’t 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’.

E.6 Solver module


1. How do I integrate my own solver with Gmsh?
Gmsh uses the ONELAB interface (http://www.onelab.info) to interact with exter-
nal solvers. Have a look at the GetDP finite element solver (http://getdp.info) to
see how this is done.
2. Can I launch Gmsh from my solver (instead of launching my solver from Gmsh) in
order to monitor a solution?
Sure. The simplest (but rather crude) approach if to re-launch Gmsh everytime you
want to visualize something (a simple C program showing how to do this is given in
utils/misc/callgmsh.c). A better approach is to modify your program so that it can
communicate with Gmsh over a socket (see “How do I integrate my own solver with
Gmsh?” above; you can skip the option file creation). Then select ‘Always listen
to incoming connection requests’ in the solver option panel (or run gmsh with the -
listen command line option) and Gmsh will always listen for your program on the
Solver.SocketName socket.

E.7 Post-processing module


1. How do I compute a section of a plot?
Use ‘Tools->Plugins->Cut Plane’.
2. Can I save an isosurface to a file?
Yes: first run ‘Tools->Plugins->Cut Map’ to extract the isosurface, then use ‘View-
>Save As’ to save the new view.
244 Gmsh 3.0

3. Can Gmsh generate isovolumes?


Yes, with the CutMap plugin (set the ExtractVolume option to -1 or 1 to extract the
negative or positive levelset).
4. How do I animate my plots?
If the views contain multiple time steps, you can press the ‘play’ button at the bottom
of the graphic window, or change the time step by hand in the view option panel. You
can also use the left and right arrow keys on your keyboard to change the time step in
all visible views in real time.
If you want to loop through different views instead of time steps, you can use the ‘Loop
through views instead of time steps’ option in the view option panel, or use the up and
down arrow keys on your keyboard.
5. How do I visualize a deformed mesh?
Load a vector view containing the displacement field, and set ‘Vector display’ to ‘Dis-
placement’ in ‘View->Options->Aspect’. If the displacement is too small (or too large),
you can scale it with the ‘Displacement factor’ option. (Remember that you can drag
the mouse in all numeric input fields to slide the value!)
Another option is to use the ‘General transformation expressions’ (in View->Options-
>Offset) on a scalar view, with the displacement map selected as the data source.
6. Can I visualize a field on a deformed mesh?
Yes, there are several ways to do that.
The easiest is to load two views: the first one containing a displacement field (a vector
view that will be used to deform the mesh), and the second one containing the field
you want to display (this view has to contain the same number of elements as the
displacement view). You should then set ‘Vector display’ to ‘Displacement’ in the first
view, as well as set ‘Data source’ to point to the second view. (You might want to
make the second view invisible, too. If you want to amplify or decrease the amount of
deformation, just modify the ‘Displacement factor’ option.)
Another solution is to use the ‘General transformation expressions’ (in ‘View->Options-
>Offset’) on the field you want to display, with the displacement map selected as the
data source.
And yet another solution is to use the Warp plugin.
7. Can I color the arrows representing a vector field with data from a scalar field?
Yes: load both the vector and the scalar fields (the two views must have the same
number of elements) and, in the vector field options, select the scalar view in ‘Data
source’.
8. Can I color isovalue surfaces with data from another scalar view?
Yes, using either the CutMap plugin (with the ‘dView’ option) or the Evaluate plugin.
9. Is there a way to save animations?
You can save simple MPEG animations directly from the ‘File->Export’ menu. For
other formats you should write a script. Have a look at Section A.8 [t8.geo], page 137
or demos/anim.script for some examples.
Appendix E: Frequently asked questions 245

10. Is there a way to visualize only certain components of vector/tensor fields?


Yes, by using either the “Force field” options in ‘Tools->Options->View->Visibility’, or
by using ‘Tools->Plugins->MathEval’.
11. Can I do arithmetic operations on a view? Can I perform operations involving different
views?
Yes, with the Evaluate plugin.
12. Some plugins seem to create empty views. What’s wrong?
There can be several reasons:
• the plugin might be written for specific element types only (for example, only for
scalar triangles or tetrahedra). In that case, you should transform your view before
running the plugin (you can use Plugin(DecomposeinSimplex) to transform all
quads, hexas, prisms and pyramids into triangles and tetrahedra).
• the plugin might expect a mesh while all you provide is a point cloud. In 2D,
you can use Plugin(Triangulate) to transform a point cloud into a triangulated
surface. In 3D you can use Plugin(Tetrahedralize).
• the input parameters are out of range.
In any case, you can automatically remove all empty views with ‘View->Remove-
>Empty Views’ in the GUI, or with Delete Empty Views; in a script.
13. How can I see “inside” a complicated post-processing view?
Use ‘Tools->Clipping Planes’.
When viewing 3D scalar fields, you can also modify the colormap (‘Tools->Options-
>View->Map’) to make the iso-surfaces “transparent”: either by holding ‘Ctrl’ while
dragging the mouse to draw the alpha channel by hand, or by using the ‘a’, ‘Ctrl+a’,
‘p’ and ‘Ctrl+p’ keyboard shortcuts.
Yet another (destructive) option is to use the ExtractVolume option in the CutSphere
or CutPlane plugins.
14. I am loading a valid 3D scalar view but Gmsh does not display anything!
If your dataset is constant per element make sure you don’t use the ‘Iso-values’ interval
type in ‘Tools->Options->View->Range’.
Appendix F: Version history 247

Appendix F Version history


3.0.6 (Novmeber 5, 2017): improved meshing of spheres; improved handling of mesh
size constraints with OpenCASCADE kernel; implemented "Coherence" for
OpenCASCADE kernel (shortcut for BooleanFragments); added GAMBIT Neutral File
export; small improvements and bug fixes.

3.0.5 (September 6, 2017): bug fixes.

3.0.4 (July 28, 2017): moved vorometal code to plugin; openmp improvements; bug
fixes.

3.0.3 (June 27, 2017): new element quality measures; Block->Box; minor fixes.

3.0.2 (May 13, 2017): improved handling of meshing constraints and entity
numbering after boolean operations; improved handling of fast coarseness
transitions in MeshAdapt; new TIKZ export; small bug fixes.

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.15.0 (December 4, 2016): fixed several regressions (multi-file partitioned


grid export, mesh subdivision, old compound mesher); improved 2D boundary layer
field & removed non-functional 3D boundary layer field; faster rendering of
large meshes.

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.
248 Gmsh 3.0

2.13.1 (July 15, 2016): small 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.12.0 (March 5, 2016): improved interactive definition of physical groups and


handling of ONELAB clients; improved full quad algorithm; added support for list
of strings, trihedra elements and X3D format; improved message console; new
colormaps; various bugs fixes and small improvements all over.

2.11.0 (November 7, 2015): new Else/ElseIf commands; new OptimizeMesh command;


Plugin(ModifyComponents) replaces Plugin(ModifyComponent); new VTK and X3D
outputs; separate 0/Ctrl+0 shortcuts for geometry/full model reload; small bug
fixes in homology solver, handling of embedded entities, and Plugin(Crack).

2.10.1 (July 30, 2015): minor fixes.

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.3 (April 18, 2015): updated versions of PETSc/SLEPc and OpenCASCADE/OCE


libraries used in official binary builds; new Find() command; miscellaneous code
cleanups and small fixes.

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.1 (March 18, 2015): minor bug fixes.

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.
Appendix F: Version history 249

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.4 (Feb 7, 2014): better reproductibility of 2D meshes; new mandatory ’Name’


attribute to define onelab variables in DefineConstant[] & co; new
-setnumber/-setstring command line arguments; small improvements and bug fixes.

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.

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.7.0 (Mar 9, 2013): new single-window GUI, with dynamically customizable


widget tree; faster STEP/BRep import; arbitrary size image export; faster 2D
Delaunay/Frontal algorithms; full option viewer/editor; many bug fixes.

2.6.1 (Jul 15, 2012): minor improvements and bug 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
250 Gmsh 3.0

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.

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).
Appendix F: Version history 251

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
algorithm; fixed various bugs.

2.1.1 (Mar 1, 2008): small bug fixes (second order meshes, combine views, divide
and conquer crash, ...).

2.1.0 (Feb 23, 2008): new post-processing database; complete rewrite of


post-processing drawing code; improved surface mesh algorithms; improved
STEP/IGES/BREP support; new 3D mesh optimization algorithm; new default native
file choosers; fixed ’could not find extruded vertex’ in extrusions; many
improvements and bug fixes all over the place.

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
252 Gmsh 3.0

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.

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
Appendix F: Version history 253

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
different mesh); generalized Plugin(CutGrid); new plugins (Eigenvalues,
Gradient, Curl, Divergence); changed default colormap to match Matlab’s "Jet"
colormap; new transformation matrix option for views (for non-destructive
rotations, symmetries, etc.); improved solver interface to keep the GUI
responsive during solver calls; new C++ and Python solver examples; simplified
Tools->Visibility GUI; transfinite lines with "Progression" now allow negative
line numbers to reverse the progression; added ability to retrieve Gmsh’s
version number in the parser (to help write backward compatible scripts); fixed
white space in unv mesh output; fixed various small bugs.

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;
254 Gmsh 3.0

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
for clipping planes; new interactive clipping/cutting plane definition;
reorganized the Options GUI; enhanced 3D iso computation; enhanced lighting;
many small bug fixes.

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;
Appendix F: Version history 255

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).

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
256 Gmsh 3.0

home directory if defined.

1.46 (Aug 23, 2003): fixed crash for very long command lines; new options for
setting the displacement factor and Triangle’s 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.

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.).
Appendix F: Version history 257

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
and additions (mostly in post-processing options); various small bug fixes.

1.33 (Jan 24, 2002): new parameterizable solver interface (allowing up to 5


user-defined solvers); enhanced 2D aniso algorithm; 3D initial mesh speedup.

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.26 (Sep 06, 2001): enhanced 2D anisotropic mesh generator (metric


258 Gmsh 3.0

intersections); fixed small bug in 3D initial mesh; added alternative syntax for
built-in functions (for GetDP compatibility); added line element display; Gmsh
now saves all the elements in the mesh if no physical groups are defined (or if
Mesh.SaveAll=1).

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
degenerated hexahedra and prisms for recombined+extruded meshes; added BSplines
creation in the GUI; integrated Jonathan Shewchuk’s Triangle as an alternative
isotropic 2D mesh generator; added AngleSmoothNormals to control sharp edge
display with smoothed normals; fixed random crash for lighted 3D iso surfaces.

1.23 (Aug, 2001): fixed duplicate elements generation + non-matching tetrahedra


faces in 3D extruded meshes; better display of displacement maps; fixed
interactive ellipsis construction; generalized boundary operator; added new
explode option for post-processing views; enhanced link view behavior (to update
only the changed items); added new default plugins: Skin, Transform, Smooth;
fixed various other small bugs (mostly in the post-processing module and for
extruded meshes).

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
Appendix F: Version history 259

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.

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.12: corrected vector lines in the post-processing parsed format; corrected


animation on Windows; corrected file creation in scripts on Windows; direct
affectation of variable arrays.

1.11 (Feb 07, 2001): corrected included file loading problem.

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
260 Gmsh 3.0

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.997 (Dec 14, 2000): corrected bug in interactive surface/volume selection;


Added interactive symmetry; corrected geometrical extrusion with rotation in
degenerated or partially degenerated cases; corrected bug in 2D mesh when
meshing in the mean plane.

0.996: arrays of variables; enhanced Printf and Sprintf; Simplified options


(suppression of option arrays).

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: that’s 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.990: bug fix in non-recombined 3D transfinite meshes.

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’
Appendix F: Version history 261

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.984: corrected bug in display lists; added some options in Opt->General.

0.983: corrected some seg. faults in interactive mode; corrected bug in


rotations; changed default window sizes for better match with 1024x768 screens
(default X resources can be changed: see ex03.geo).

0.982: lighting for mesh and post-processing; corrected 2nd order mesh on non
plane surfaces; added example 13.
Appendix G: Copyright and credits 263

Appendix G Copyright and credits


Gmsh is copyright (C) 1997-2017

Christophe Geuzaine
<cgeuzaine at ulg.ac.be>

and

Jean-Francois Remacle
<jean-francois.remacle at uclouvain.be>

Code contributions to Gmsh have been provided by David Colignon (colormaps),


Emilie Marchandise (compound geometrical entities), Gaetan Bricteux (Gauss
integration and levelsets), Jacques Lechelle (DIFFPACK mesh format), Jonathan
Lambrechts (fields, solver), Jozef Vesely (help with Tetgen integration), Koen
Hillewaert (high order elements, generalized periodic meshes), Laurent Stainier
(eigenvalue solvers, tensor display and MacOS bits), Marc Ume (original list
code), Mark van Doesburg (OpenCASCADE face connection), Matt Gundry (Plot3d mesh
format), Matti Pellikka (Cell complex and Homology solver), Nicolas Tardieu
(help with Netgen integration), Pascale Noyret (MED mesh format), Pierre Badel
(root finding and minimization), Ruth Sabariego (pyramids), Stephen Guzik (CGNS
and partitioners), Bastien Gorissen (parallel remote post-processing), Eric
Bechet (solver), Gilles Marckmann (camera and stero mode), Ashish Negi (Netgen
CAD healing), Trevor Strickler (structured/unstructured coupling with pyramids),
Amaury Johnen (Bezier), Benjamin Ruard (Java wrappers), Maxime Graulich
(iOS/Android port), Francois Henrotte (onelab metamodels), Sebastian Eiser (PGF
output), Alexis Salzman (compressed IO), Hang Si (TetGen/BR boundary recovery
code), Fernando Lorenzo (Tochnog support). See comments in the sources for more
information. If we forgot to list your contributions please send us an email!

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.

The picojson code (Common/picojson.h) is Copyright 2009-2010 Cybozu Labs, Inc.,


264 Gmsh 3.0

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 trackball code (Graphics/Trackball.{cpp.h}) is copyright (C) 1993, 1994,


Silicon Graphics, Inc. ALL RIGHTS RESERVED. Permission to use, copy, modify, and
distribute this software for any purpose and without fee is hereby granted,
provided that the above copyright notice appear in all copies and that both the
copyright notice and this permission notice appear in supporting documentation,
and that the name of Silicon Graphics, Inc. not be used in advertising or
publicity pertaining to distribution of the software without specific, written
prior permission.

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.

The colorbar widget (Fltk/Colorbar_Window.cpp) was inspired by code from the


Vis5d program for visualizing five dimensional gridded data sets, copyright (C)
1990-1995, Bill Hibbard, Brian Paul, Dave Santek, and Andre Battaiola.

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/Chaco written by Bruce Hendrickson and Robert Leland at Sandia


National Laboratories under US Department of Energy contract DE-AC04-76DP00789
Appendix G: Copyright and credits 265

and is copyrighted by Sandia Corporation.

* contrib/gmm copyright (C) 2002-2008 Yves Renard;

* contrib/kbipack copyright (C) 2005 Saku Suuriniemi;

* contrib/MathEx based in part on the work of the SSCILIB Library, copyright (C)
2000-2003 Sadao Massago;

* contrib/Metis written by George Karypis (karypis at cs.umn.edu), copyright (C)


1998 Regents of the University of Minnesota;

* contrib/mpeg_encode copyright (c) 1995 The Regents of the University of


California;

* contrib/Netgen subdirectory copyright (C) 1994-2004 Joachim Sch"oberl;

* contrib/Tetgen1.5 subdirectory) copyright (C) 2002-2007 Hang Si;

* contrib/bamg subdirectory) from Freefem++ copyright (C) Frederic Hecht;

* contrib/lbfgs subdirectory) (C) Sergey Bochkanov (ALGLIB project);

* contrib/mmg3d subdirectory) from MMG3D Version 4.0 (C) 2004-2011 Cecile


Dobrzynski and Pascal Frey (IPB - UPMC - INRIA);

* contrib/blossom subdirectory) copyright (C) 1995-1997 Bill Cook et al.;

* contrib/bamg subdirectory) from Freefem++ copyright (C) Frederic Hecht;

* contrib/taucs subdirectory) from TAUCS Version 2.0, November 29, 2001,


Copyright (c) 2001, 2002, 2003 by Sivan Toledo, Tel-Aviv Univesity,
stoledo@tau.ac.il. All Rights Reserved.

* contrib/voro++ subdirectory) from Voro++ Copyright (c) 2008, The Regents of


the University of California, through Lawrence Berkeley National Laboratory
(subject to receipt of any required approvals from the U.S. Dept. of
Energy). All rights reserved;

* contrib/zipper subdirectory) from MiniZip - Copyright (c) 1998-2010 - by


Gilles Vollant - version 1.1 64 bits from Mathias Svensson.

Check the configuration options to see which has been enabled.

Special thanks to Bill Spitzak, Michael Sweet, Matthias Melcher, Greg Ercolano
and others for the Fast Light Tool Kit on which Gmsh’s GUI is based. See
http://www.fltk.org for more info on this excellent object-oriented,
266 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 Fl’ejou, Xavier
Dardenne, Christophe Prud’homme, 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, Larry Price.
Appendix H: License 267

Appendix H License
Gmsh is provided under the terms of the GNU General Public License
(GPL), Version 2 or later, with the following exception:

The copyright holders of Gmsh give you permission to combine Gmsh


with code included in the standard release of TetGen (from Hang
Si), Netgen (from Joachim Sch"oberl), Chaco (from Bruce Hendrickson
and Robert Leland at Sandia National Laboratories), METIS (from
George Karypis at the University of Minnesota) and OpenCASCADE
(from Open CASCADE S.A.S) under their respective licenses. You may
copy and distribute such a system following the terms of the GNU
GPL for Gmsh and the licenses of the other code concerned, provided
that you include the source code of that other code when and as the
GNU GPL requires distribution of source code.

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.

GNU GENERAL PUBLIC LICENSE


Version 2, June 1991

Copyright (C) 1989, 1991 Free Software Foundation, Inc.


51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.

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
Foundation’s 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.

When we speak of free software, we are referring to freedom, not


price. Our General Public Licenses are designed to make sure that you
268 Gmsh 3.0

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.

To protect your rights, we need to make restrictions that forbid


anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.

For example, if you distribute copies of such a program, whether


gratis or for a fee, 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 show them these terms so they know their
rights.

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 author’s 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.

Finally, any free program is threatened constantly by software


patents. We wish to avoid the danger that redistributors of a free
program will individually obtain patent licenses, in effect making the
program proprietary. To prevent this, we have made it clear that any
patent must be licensed for everyone’s free use or not licensed at all.

The precise terms and conditions for copying, distribution and


modification follow.

GNU GENERAL PUBLIC LICENSE


TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION

0. This License applies to any program or other work which contains


a notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License. The "Program", below,
refers to any such program or work, and a "work based on the Program"
means either the Program or any derivative work under copyright law:
that is to say, a work containing the Program or a portion of it,
either verbatim or with modifications and/or translated into another
language. (Hereinafter, translation is included without limitation in
Appendix H: License 269

the term "modification".) Each licensee is addressed as "you".

Activities other than copying, distribution and modification are not


covered by this License; they are outside its scope. The act of
running the Program is not restricted, and the output from the Program
is covered only if its contents constitute a work based on the
Program (independent of having been made by running the Program).
Whether that is true depends on what the Program does.

1. You may copy and distribute verbatim copies of the Program’s


source code as you receive it, in any medium, provided that you
conspicuously and appropriately publish on each copy an appropriate
copyright notice and disclaimer of warranty; keep intact all the
notices that refer to this License and to the absence of any warranty;
and give any other recipients of the Program a copy of this License
along with the Program.

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:

a) You must cause the modified files to carry prominent notices


stating that you changed the files and the date of any change.

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.

c) If the modified program normally reads commands interactively


when run, you must cause it, when started running for such
interactive use in the most ordinary way, to print or display an
announcement including an appropriate copyright notice and a
notice that there is no warranty (or else, saying that you provide
a warranty) and that users may redistribute the program under
these conditions, and telling the user how to view a copy of this
License. (Exception: if the Program itself is interactive but
does not normally print such an announcement, your work based on
the Program is not required to print an announcement.)

These requirements apply to the modified work as a whole. If


identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
270 Gmsh 3.0

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.

Thus, it is not the intent of this section to claim rights or contest


your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Program.

In addition, mere aggregation of another work not based on the Program


with the Program (or with a work based on the Program) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.

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:

a) Accompany it with the complete corresponding machine-readable


source code, which must be distributed under the terms of Sections
1 and 2 above on a medium customarily used for software interchange; or,

b) Accompany it with a written offer, valid for at least three


years, to give any third party, for a charge no more than your
cost of physically performing source distribution, a complete
machine-readable copy of the corresponding source code, to be
distributed under the terms of Sections 1 and 2 above on a medium
customarily used for software interchange; or,

c) Accompany it with the information you received as to the offer


to distribute corresponding source code. (This alternative is
allowed only for noncommercial distribution and only if you
received the program in object code or executable form with such
an offer, in accord with Subsection b above.)

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 271

itself accompanies the executable.

If distribution of executable or object code is made by offering


access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.

4. You may not copy, modify, sublicense, or distribute the Program


except as expressly provided under this License. Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
void, and will automatically terminate your rights under this License.
However, parties who have received copies, or rights, from you under
this License will not have their licenses terminated so long as such
parties remain in full compliance.

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.

7. If, as a consequence of a court judgment or allegation of patent


infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Program at all. For example, if a patent
license would not permit royalty-free redistribution of the Program by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Program.

If any portion of this section is held invalid or unenforceable under


272 Gmsh 3.0

any particular circumstance, the balance of the section is intended to


apply and the section as a whole is intended to apply in other
circumstances.

It is not the purpose of this section to induce you to infringe any


patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system, which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.

This section is intended to make thoroughly clear what is believed to


be a consequence of the rest of this License.

8. If the distribution and/or use of the Program is restricted in


certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
may add an explicit geographical distribution limitation excluding
those countries, so that distribution is permitted only in or among
countries not thus excluded. In such case, this License incorporates
the limitation as if written in the body of 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.

Each version is given a distinguishing version number. If the Program


specifies a version number of this License which applies to it and "any
later version", you have the option of following the terms and conditions
either of that version or of any later version published by the Free
Software Foundation. If the Program does not specify a version number of
this License, you may choose any version ever published by the Free Software
Foundation.

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 273

NO WARRANTY

11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY


FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
REPAIR OR CORRECTION.

12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING


WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.

END OF TERMS AND CONDITIONS

How to Apply These Terms to Your New Programs

If you develop a new program, and you want it to be of the greatest


possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.

To do so, attach the following notices to the program. It is safest


to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.

<one line to give the program’s name and a brief idea of what it does.>
Copyright (C) <year> <name of author>

This program is free software; you can redistribute it and/or modify


it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,


but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
274 Gmsh 3.0

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.

If the program is interactive, make it output a short notice like this


when it starts in an interactive mode:

Gnomovision version 69, Copyright (C) year name of author


Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type ‘show w’.
This is free software, and you are welcome to redistribute it
under certain conditions; type ‘show c’ for details.

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:

Yoyodyne, Inc., hereby disclaims all copyright interest in the program


‘Gnomovision’ (which makes passes at compilers) written by James Hacker.

<signature of Ty Coon>, 1 April 1989


Ty Coon, President of Vice

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 275

Concept index

2 Evaluation order . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
2D plots . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71 Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123
Expressions, affectation . . . . . . . . . . . . . . . . . . . . . . . . 29
Expressions, character . . . . . . . . . . . . . . . . . . . . . . . . . 24
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 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 263 Extrusion, mesh . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
Authors, e-mail . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7

F
B FAQ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 239
Background mesh. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47 File format, mesh . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105
Binary operators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 File formats . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105
Bindings, keyboard . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 File, comments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
Bindings, mouse . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 Floating point numbers . . . . . . . . . . . . . . . . . . . . . . . . 21
Boolean operations, geometry . . . . . . . . . . . . . . . . . . 41 Frequently asked questions . . . . . . . . . . . . . . . . . . . 239
Bugs, reporting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 Functions, built-in . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27

C G
Changelog . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 247 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 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 275 Geometry, transformations . . . . . . . . . . . . . . . . . . . . . 42
Conditionals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 Geometry, union . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
Constants . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 Graphs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
Contact information . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
Contributors, list . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 263
Copyright . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3, 263 H
Credits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 263 History, versions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 247

D I
Developer, information . . . . . . . . . . . . . . . . . . . . . . . 237
Index, concepts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 275
Document syntax . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
Index, syntax . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 277
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 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 277
Elementary volumes . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
276 Gmsh 3.0

L Post-processing plugins . . . . . . . . . . . . . . . . . . . . . . . . 76
License . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3, 267 Post-processing, module . . . . . . . . . . . . . . . . . . . . . . . 71
Lines, elementary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36 Post-processing, options . . . . . . . . . . . . . . . . . . . . . . 102
Lines, physical . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36 Precedence, operators. . . . . . . . . . . . . . . . . . . . . . . . . . 26
Loops . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 Programming, notes . . . . . . . . . . . . . . . . . . . . . . . . . . 237

M Q
Macros, user-defined . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 Questions, frequently asked . . . . . . . . . . . . . . . . . . . 239
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 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105 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 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 Size, elements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
MSH file . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105 Solver commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
Solver, module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
Strings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
N Surfaces, elementary . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
Nodes, ordering . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112 Surfaces, physical . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
Non-interactive mode . . . . . . . . . . . . . . . . . . . . . . . . . . 12 Symmetry . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
Numbers, real . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 Syntax, index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 277
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 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123
Options, post-processing . . . . . . . . . . . . . . . . . . . . . . 102
Order, evaluation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 U
Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
Unary operators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25

P
Physical lines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
V
Physical points . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 Versions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 247
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 277

Syntax index

! -gamepad . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
! . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 -help . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
!= . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 -ho_[min,max,nlayers] . . . . . . . . . . . . . . . . . . . . . . . 13
-ignorePartBound . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
-ignorePeriocity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
% -info . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
% . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 -link int . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
-listen . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
-match . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
& -merge . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
-minterpreter string . . . . . . . . . . . . . . . . . . . . . . . . 14
&& . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
-n . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
-new . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
( -nodb . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
-nopopup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
-nt int . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
-numsubedges . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
* -o file . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
-oneFilePerPart . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
* . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 -open . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
*= . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 -optimize[_netgen] . . . . . . . . . . . . . . . . . . . . . . . . . . 13
-optimize_ho . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
+ -optimize_lloyd . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
-optimize_threshold . . . . . . . . . . . . . . . . . . . . . . . . . 13
+ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 -option file . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
++ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 -order int . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
+= . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 -part int . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
-partWeight tri|quad|tet|prism|hex int . . . . 13
- -pid . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
-pyinterpreter string . . . . . . . . . . . . . . . . . . . . . . . 14
- . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25, 26
-rand float . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
-, -parse_and_exit . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
-reclassify . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
-- . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
-refine . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
-= . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
-run . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
-0 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
-save_all . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
-1, -2, -3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
-save_parametric . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
-a, -g, -m, -s, -p . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
-save_topology . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
-algo string . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
-setnumber name value . . . . . . . . . . . . . . . . . . . . . . . . 15
-anisoMax float . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
-setstring name value . . . . . . . . . . . . . . . . . . . . . . . . 15
-bg file . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
-smooth int . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
-bgm file . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
-smoothRatio float . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
-bin . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
-stereo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
-camera . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
-string "string" . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
-check . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
-swapangle. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
-clcurv . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
-theme string. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
-clmax float . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
-clmin float . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 -tol float . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
-clscale float . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 -v int. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
-combine . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 -version . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
-convert files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 -watch pattern . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
-cpu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
-display string . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
-epslc1d . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 /
-fontsize int. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 / . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
-format string . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 /*, */. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
278 Gmsh 3.0

// . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 B
/= . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 Background Field = expression ;. . . . . . . . . . . . . . 48
Background Mesh View[expression ]; . . . . . . . . . . 73
: Ball . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
Bezier ( expression ) = { expression-list };
: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
boolean . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
BooleanDifference { boolean-list } {
< boolean-list } . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
< . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 BooleanFragments { boolean-list } {
< Recursive > Color color-expression { Point | boolean-list } . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
Line | Surface | Volume { expression-list BooleanIntersection ( expression ) = {
}; ... } . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67 boolean-list } { boolean-list }; . . . . . . . 42
< Recursive > Delete { Point | Line | Surface | BooleanIntersection { boolean-list } {
Volume { expression-list }; ... } . . . . . . 44 boolean-list } . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
< Recursive > Hide { Point | Line | Surface | BooleanUnion { boolean-list } { boolean-list
Volume { expression-list }; ... } . . . 44, 67 } . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
< Recursive > Show { Point | Line | Surface | Boundary { transform-list } . . . . . . . . . . . . . . . . . 43
Volume { expression-list }; ... } . . . 44, 68 BoundaryLayer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
<= . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 BoundingBox { expression, expression,
expression, expression, expression,
expression }; . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
= BoundingBox; . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
= . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 Box . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
== . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 Box ( expression ) = { expression-list }; . . 39
BSpline ( expression ) = { expression-list };
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
> build-in-function . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
>= . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
C
Call string | char-expression ;. . . . . . . . . . . . . 28
? Ceil ( expression ) . . . . . . . . . . . . . . . . . . . . . . . . . . 27
? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 char-option = char-expression ; . . . . . . . . . . . . . 32
Characteristic Length { expression-list } =
expression ; . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
^ Circle ( expression ) = { expression,
^ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 expression, expression <, ...> }; . . . . . . 36
Coherence Mesh; . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
Coherence;. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
| Cohomology ( { expression-list } ) { {
|| . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 expression-list } , { expression-list }
}; . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
color-option = color-expression ;. . . . . . . . . . . 32
A Combine ElementsByViewName; . . . . . . . . . . . . . . . . 72
Abort; . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 Combine ElementsFromAllViews | Combine Views;
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72
Acos ( expression ) . . . . . . . . . . . . . . . . . . . . . . . . . . 27
Combine ElementsFromVisibleViews;. . . . . . . . . . 72
AdaptMesh { expression-list } {
Combine TimeStepsByViewName | Combine
expression-list } { { expression-list < ,
TimeSteps; . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72
... > } }; . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
Combine TimeStepsFromAllViews; . . . . . . . . . . . . . 72
Alias View[expression ]; . . . . . . . . . . . . . . . . . . . . . 72
Combine TimeStepsFromVisibleViews; . . . . . . . . 72
AliasWithOptions View[expression ]; . . . . . . . . 72
CombinedBoundary { transform-list } . . . . . . . . 43
Asin ( expression ) . . . . . . . . . . . . . . . . . . . . . . . . . . 27
Compound Line ( expression ) = {
Atan ( expression ) . . . . . . . . . . . . . . . . . . . . . . . . . . 27
expression-list }; . . . . . . . . . . . . . . . . . . . . . . 37
Atan2 ( expression, expression ) . . . . . . . . . . . . 27
Compound Surface ( expression ) = {
Attractor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
expression-list } < Boundary { {
AttractorAnisoCurve . . . . . . . . . . . . . . . . . . . . . . . . . 49
expression-list }, { expression-list }, {
Syntax index 279

expression-list }, { expression-list } } ENABLE_BUILD_IOS. . . . . . . . . . . . . . . . . . . . . . . . . . . . 233


> ; . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38 ENABLE_BUILD_LIB. . . . . . . . . . . . . . . . . . . . . . . . . . . . 233
Compound Volume ( expression ) = { ENABLE_BUILD_SHARED . . . . . . . . . . . . . . . . . . . . . . . . 233
expression-list }; . . . . . . . . . . . . . . . . . . . . . . 40 ENABLE_CAIRO . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 234
Cone ( expression ) = { expression-list }; ENABLE_CGNS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 233
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 ENABLE_CHACO . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 234
CopyOptions View[expression, expression ]; ENABLE_COMPRESSED_IO . . . . . . . . . . . . . . . . . . . . . . . 234
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72 ENABLE_DINTEGRATION . . . . . . . . . . . . . . . . . . . . . . . . 234
Cos ( expression ) . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 ENABLE_FLTK . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 234
Cosh ( expression ) . . . . . . . . . . . . . . . . . . . . . . . . . . 27 ENABLE_FOURIER_MODEL . . . . . . . . . . . . . . . . . . . . . . . 234
Cpu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 ENABLE_GETDP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 234
CreateDir char-expression ; . . . . . . . . . . . . . . . . . 32 ENABLE_GMM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 234
Curvature . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53 ENABLE_GMP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 234
Cylinder . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53 ENABLE_GRAPHICS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 234
Cylinder ( expression ) = { expression-list ENABLE_KBIPACK . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 234
}; . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 ENABLE_MATHEX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 234
ENABLE_MED . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 234
ENABLE_MESH . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 234
D ENABLE_METIS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 234
DefineConstant[ string = { ENABLE_MMG3D . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 234
expression |char-expression, ENABLE_MPEG_ENCODE . . . . . . . . . . . . . . . . . . . . . . . . . 234
onelab-options } <, ...>]; . . . . . . . . . . . . . . 31 ENABLE_MPI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 234
DefineConstant[ string = ENABLE_MSVC_STATIC_RUNTIME . . . . . . . . . . . . . . . . 234
expression |char-expression <, ...>]; ENABLE_MUMPS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 235
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 ENABLE_NATIVE_FILE_CHOOSER . . . . . . . . . . . . . . . . 235
Delete Empty Views; . . . . . . . . . . . . . . . . . . . . . . . . . . 73 ENABLE_NETGEN . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 235
Delete Model;. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 ENABLE_NUMPY . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 235
Delete Options; . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 ENABLE_OCC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 235
Delete Physicals; . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 ENABLE_ONELAB . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 235
Delete string ; . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 ENABLE_ONELAB_METAMODEL . . . . . . . . . . . . . . . . . . . 235
Delete Variables; . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 ENABLE_OPENMP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 235
Delete View[expression ]; . . . . . . . . . . . . . . . . . . . . 73 ENABLE_OPTHOM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 235
Dilate { { expression-list }, { expression, ENABLE_OS_SPECIFIC_INSTALL . . . . . . . . . . . . . . . . 235
expression, expression } } { ENABLE_OSMESA . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 235
transform-list } . . . . . . . . . . . . . . . . . . . . . . . . 43 ENABLE_PARSER . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 235
Dilate { { expression-list }, expression } { ENABLE_PETSC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 235
transform-list } . . . . . . . . . . . . . . . . . . . . . . . . 42 ENABLE_PETSC4PY . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 235
Disk ( expression ) = { expression-list }; ENABLE_PLUGINS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 235
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38 ENABLE_POPPLER . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 235
Distance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54 ENABLE_POST . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 235
Draw; . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 ENABLE_QT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 235
ENABLE_REVOROPT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 235
ENABLE_SALOME . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 236
E ENABLE_SGEOM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 236
Ellipse ( expression ) = { expression, ENABLE_SLEPC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 236
expression, expression, expression <, ENABLE_SOLVER . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 236
...> }; . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36 ENABLE_TAUCS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 236
Else . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 ENABLE_TCMALLOC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 236
ElseIf ( expression ) . . . . . . . . . . . . . . . . . . . . . . . . 29 ENABLE_TETGEN . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 236
ENABLE_3M . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 233 ENABLE_VORO3D . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 236
ENABLE_ACIS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 233 ENABLE_WRAP_JAVA. . . . . . . . . . . . . . . . . . . . . . . . . . . . 236
ENABLE_ANN . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 233 ENABLE_WRAP_PYTHON . . . . . . . . . . . . . . . . . . . . . . . . . 236
ENABLE_BAMG . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 233 ENABLE_ZIPPER . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 236
ENABLE_BFGS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 233 EndFor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
ENABLE_BLAS_LAPACK . . . . . . . . . . . . . . . . . . . . . . . . . 233 EndIf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
ENABLE_BLOSSOM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 233 Error ( char-expression <, expression-list >
ENABLE_BUILD_ANDROID . . . . . . . . . . . . . . . . . . . . . . . 233 ); . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
ENABLE_BUILD_DYNAMIC . . . . . . . . . . . . . . . . . . . . . . . 233 Exit; . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
280 Gmsh 3.0

Exp ( expression ) . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 General.AxesLabelY . . . . . . . . . . . . . . . . . . . . . . . . . 153


ExternalProcess . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54 General.AxesLabelZ . . . . . . . . . . . . . . . . . . . . . . . . . 153
extrude . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 General.AxesMaxX. . . . . . . . . . . . . . . . . . . . . . . . . . . . 157
Extrude { { expression-list }, { General.AxesMaxY. . . . . . . . . . . . . . . . . . . . . . . . . . . . 157
expression-list }, { expression-list }, General.AxesMaxZ. . . . . . . . . . . . . . . . . . . . . . . . . . . . 157
expression } { extrude-list } . . . . . . . . . . 40 General.AxesMikado . . . . . . . . . . . . . . . . . . . . . . . . . 157
Extrude { { expression-list }, { General.AxesMinX. . . . . . . . . . . . . . . . . . . . . . . . . . . . 157
expression-list }, { expression-list }, General.AxesMinY. . . . . . . . . . . . . . . . . . . . . . . . . . . . 157
expression } { extrude-list layers } . . 65 General.AxesMinZ. . . . . . . . . . . . . . . . . . . . . . . . . . . . 157
Extrude { { expression-list }, { General.AxesTicsX . . . . . . . . . . . . . . . . . . . . . . . . . . 158
expression-list }, expression } { General.AxesTicsY . . . . . . . . . . . . . . . . . . . . . . . . . . 158
extrude-list } . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 General.AxesTicsZ . . . . . . . . . . . . . . . . . . . . . . . . . . 158
Extrude { { expression-list }, { General.AxesValueMaxX . . . . . . . . . . . . . . . . . . . . . . 158
expression-list }, expression } { General.AxesValueMaxY . . . . . . . . . . . . . . . . . . . . . . 158
extrude-list layers } . . . . . . . . . . . . . . . . . . . 65 General.AxesValueMaxZ . . . . . . . . . . . . . . . . . . . . . . 158
Extrude { expression-list } { extrude-list } General.AxesValueMinX . . . . . . . . . . . . . . . . . . . . . . 158
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 General.AxesValueMinY . . . . . . . . . . . . . . . . . . . . . . 158
Extrude { expression-list } { extrude-list General.AxesValueMinZ . . . . . . . . . . . . . . . . . . . . . . 158
layers } . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63 General.BackgroundGradient . . . . . . . . . . . . . . . . 158
Extrude { extrude-list } . . . . . . . . . . . . . . . . . . . . 41 General.BackgroundImage3D . . . . . . . . . . . . . . . . . 158
Extrude { extrude-list } Using Wire { General.BackgroundImageFileName . . . . . . . . . . 154
expression-list } . . . . . . . . . . . . . . . . . . . . . . . 41 General.BackgroundImageHeight . . . . . . . . . . . . . 159
Extrude { Surface { expression-list }; layers General.BackgroundImagePage . . . . . . . . . . . . . . . 159
< Using Index[expr ]; > < Using General.BackgroundImagePositionX . . . . . . . . . 159
View[expr ]; > < ScaleLastLayer; > } . . . . 65 General.BackgroundImagePositionY . . . . . . . . . 159
General.BackgroundImageWidth . . . . . . . . . . . . . . 159
General.BoundingBoxSize . . . . . . . . . . . . . . . . . . . 159
F General.Camera . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 159
Fabs ( expression ) . . . . . . . . . . . . . . . . . . . . . . . . . . 27 General.CameraAperture . . . . . . . . . . . . . . . . . . . . . 159
Field[expression ] = string ; . . . . . . . . . . . . . . . . 48 General.CameraEyeSeparationRatio . . . . . . . . . 159
Field[expression ].string = char-expression | General.CameraFocalLengthRatio . . . . . . . . . . . 160
expression | expression-list ;. . . . . . . . . . 48 General.Clip0A . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 160
Fillet { expression-list } { expression-list General.Clip0B . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 160
} { expression } . . . . . . . . . . . . . . . . . . . . . . . . . 41 General.Clip0C . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 160
Floor ( expression ) . . . . . . . . . . . . . . . . . . . . . . . . . 27 General.Clip0D . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 160
Fmod ( expression, expression ) . . . . . . . . . . . . . 27 General.Clip1A . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 160
For ( expression : expression ) . . . . . . . . . . . . . 28 General.Clip1B . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 160
For ( expression : expression : expression ) General.Clip1C . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 160
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 General.Clip1D . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 160
For string In { expression : expression : General.Clip2A . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 160
expression } . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 General.Clip2B . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 161
For string In { expression : expression } . . 29 General.Clip2C . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 161
Frustum . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56 General.Clip2D . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 161
General.Clip3A . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 161
General.Clip3B . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 161
G General.Clip3C . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 161
General.AlphaBlending . . . . . . . . . . . . . . . . . . . . . . 156 General.Clip3D . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 161
General.Antialiasing . . . . . . . . . . . . . . . . . . . . . . . 156 General.Clip4A . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 161
General.ArrowHeadRadius . . . . . . . . . . . . . . . . . . . 156 General.Clip4B . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 161
General.ArrowStemLength . . . . . . . . . . . . . . . . . . . 156 General.Clip4C . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 161
General.ArrowStemRadius . . . . . . . . . . . . . . . . . . . 156 General.Clip4D . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 162
General.Axes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 157 General.Clip5A . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 162
General.AxesAutoPosition . . . . . . . . . . . . . . . . . . 157 General.Clip5B . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 162
General.AxesForceValue . . . . . . . . . . . . . . . . . . . . . 157 General.Clip5C . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 162
General.AxesFormatX . . . . . . . . . . . . . . . . . . . . . . . . 153 General.Clip5D . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 162
General.AxesFormatY . . . . . . . . . . . . . . . . . . . . . . . . 153 General.ClipFactor . . . . . . . . . . . . . . . . . . . . . . . . . 162
General.AxesFormatZ . . . . . . . . . . . . . . . . . . . . . . . . 153 General.ClipOnlyDrawIntersectingVolume . . 162
General.AxesLabelX . . . . . . . . . . . . . . . . . . . . . . . . . 153 General.ClipOnlyVolume . . . . . . . . . . . . . . . . . . . . . 162
Syntax index 281

General.ClipPositionX . . . . . . . . . . . . . . . . . . . . . . 162 General.Light0Z . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 166


General.ClipPositionY . . . . . . . . . . . . . . . . . . . . . . 162 General.Light1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 166
General.ClipWholeElements . . . . . . . . . . . . . . . . . 163 General.Light1W . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 167
General.Color.AmbientLight . . . . . . . . . . . . . . . . 177 General.Light1X . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 167
General.Color.Axes . . . . . . . . . . . . . . . . . . . . . . . . . 177 General.Light1Y . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 167
General.Color.Background . . . . . . . . . . . . . . . . . . 176 General.Light1Z . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 167
General.Color.BackgroundGradient . . . . . . . . . 176 General.Light2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 167
General.Color.DiffuseLight . . . . . . . . . . . . . . . . 177 General.Light2W . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 167
General.Color.Foreground . . . . . . . . . . . . . . . . . . 177 General.Light2X . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 167
General.Color.SmallAxes . . . . . . . . . . . . . . . . . . . 177 General.Light2Y . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 167
General.Color.SpecularLight . . . . . . . . . . . . . . . 177 General.Light2Z . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 167
General.Color.Text . . . . . . . . . . . . . . . . . . . . . . . . . 177 General.Light3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 167
General.ColorScheme . . . . . . . . . . . . . . . . . . . . . . . . 163 General.Light3W . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 168
General.ConfirmOverwrite . . . . . . . . . . . . . . . . . . 163 General.Light3X . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 168
General.ContextPositionX . . . . . . . . . . . . . . . . . . 163 General.Light3Y . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 168
General.ContextPositionY . . . . . . . . . . . . . . . . . . 163 General.Light3Z . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 168
General.DefaultFileName . . . . . . . . . . . . . . . . . . . 154 General.Light4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 168
General.DetachedMenu . . . . . . . . . . . . . . . . . . . . . . . 163 General.Light4W . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 168
General.Display . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 154 General.Light4X . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 168
General.DisplayBorderFactor . . . . . . . . . . . . . . . 163 General.Light4Y . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 168
General.DoubleBuffer . . . . . . . . . . . . . . . . . . . . . . . 163 General.Light4Z . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 168
General.DrawBoundingBoxes . . . . . . . . . . . . . . . . . 163 General.Light5 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 168
General.ErrorFileName . . . . . . . . . . . . . . . . . . . . . . 154 General.Light5W . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 169
General.ExecutableFileName . . . . . . . . . . . . . . . . 154 General.Light5X . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 169
General.ExpertMode . . . . . . . . . . . . . . . . . . . . . . . . . 163 General.Light5Y . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 169
General.ExtraHeight . . . . . . . . . . . . . . . . . . . . . . . . 164 General.Light5Z . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 169
General.ExtraPositionX . . . . . . . . . . . . . . . . . . . . . 164 General.LineWidth . . . . . . . . . . . . . . . . . . . . . . . . . . 169
General.ExtraPositionY . . . . . . . . . . . . . . . . . . . . . 164 General.ManipulatorPositionX . . . . . . . . . . . . . . 169
General.ExtraWidth . . . . . . . . . . . . . . . . . . . . . . . . . 164 General.ManipulatorPositionY . . . . . . . . . . . . . . 169
General.FastRedraw . . . . . . . . . . . . . . . . . . . . . . . . . 164 General.MaxX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 169
General.FieldHeight . . . . . . . . . . . . . . . . . . . . . . . . 164 General.MaxY . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 169
General.FieldPositionX . . . . . . . . . . . . . . . . . . . . . 164 General.MaxZ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 169
General.FieldPositionY . . . . . . . . . . . . . . . . . . . . . 164 General.MenuHeight . . . . . . . . . . . . . . . . . . . . . . . . . 170
General.FieldWidth . . . . . . . . . . . . . . . . . . . . . . . . . 164 General.MenuPositionX . . . . . . . . . . . . . . . . . . . . . . 170
General.FileChooserPositionX . . . . . . . . . . . . . . 164 General.MenuPositionY . . . . . . . . . . . . . . . . . . . . . . 170
General.FileChooserPositionY . . . . . . . . . . . . . . 165 General.MenuWidth . . . . . . . . . . . . . . . . . . . . . . . . . . 170
General.FileName. . . . . . . . . . . . . . . . . . . . . . . . . . . . 154 General.MeshDiscrete . . . . . . . . . . . . . . . . . . . . . . . 170
General.FltkColorScheme . . . . . . . . . . . . . . . . . . . 165 General.MessageFontSize . . . . . . . . . . . . . . . . . . . 170
General.FltkTheme . . . . . . . . . . . . . . . . . . . . . . . . . . 154 General.MessageHeight . . . . . . . . . . . . . . . . . . . . . . 170
General.FontSize. . . . . . . . . . . . . . . . . . . . . . . . . . . . 165 General.MinX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 170
General.GraphicsFont . . . . . . . . . . . . . . . . . . . . . . . 154 General.MinY . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 170
General.GraphicsFontEngine . . . . . . . . . . . . . . . . 154 General.MinZ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 170
General.GraphicsFontSize . . . . . . . . . . . . . . . . . . 165 General.MouseHoverMeshes . . . . . . . . . . . . . . . . . . 171
General.GraphicsFontSizeTitle . . . . . . . . . . . . . 165 General.MouseSelection . . . . . . . . . . . . . . . . . . . . . 171
General.GraphicsFontTitle . . . . . . . . . . . . . . . . . 154 General.NonModalWindows . . . . . . . . . . . . . . . . . . . 171
General.GraphicsHeight . . . . . . . . . . . . . . . . . . . . . 165 General.NoPopup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 171
General.GraphicsPositionX . . . . . . . . . . . . . . . . . 165 General.NumThreads . . . . . . . . . . . . . . . . . . . . . . . . . 171
General.GraphicsPositionY . . . . . . . . . . . . . . . . . 165 General.OptionsFileName . . . . . . . . . . . . . . . . . . . 155
General.GraphicsWidth . . . . . . . . . . . . . . . . . . . . . . 165 General.OptionsPositionX . . . . . . . . . . . . . . . . . . 171
General.HighOrderToolsPositionX . . . . . . . . . . 165 General.OptionsPositionY . . . . . . . . . . . . . . . . . . 171
General.HighOrderToolsPositionY . . . . . . . . . . 166 General.Orthographic . . . . . . . . . . . . . . . . . . . . . . . 171
General.HighResolutionGraphics . . . . . . . . . . . 166 General.PluginHeight . . . . . . . . . . . . . . . . . . . . . . . 172
General.HighResolutionPointSizeFactor . . . 166 General.PluginPositionX . . . . . . . . . . . . . . . . . . . 171
General.InitialModule . . . . . . . . . . . . . . . . . . . . . . 166 General.PluginPositionY . . . . . . . . . . . . . . . . . . . 171
General.Light0 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 166 General.PluginWidth . . . . . . . . . . . . . . . . . . . . . . . . 172
General.Light0W . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 166 General.PointSize . . . . . . . . . . . . . . . . . . . . . . . . . . 172
General.Light0X . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 166 General.PolygonOffsetAlwaysOn . . . . . . . . . . . . . 172
General.Light0Y . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 166 General.PolygonOffsetFactor . . . . . . . . . . . . . . . 172
282 Gmsh 3.0

General.PolygonOffsetUnits . . . . . . . . . . . . . . . . 172 Geometry.Clip . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 182


General.ProgressMeterStep . . . . . . . . . . . . . . . . . 172 Geometry.Color.HighlightOne . . . . . . . . . . . . . . . 189
General.QuadricSubdivisions . . . . . . . . . . . . . . . 172 Geometry.Color.HighlightTwo . . . . . . . . . . . . . . . 189
General.RecentFile0 . . . . . . . . . . . . . . . . . . . . . . . . 155 Geometry.Color.HighlightZero . . . . . . . . . . . . . . 189
General.RecentFile1 . . . . . . . . . . . . . . . . . . . . . . . . 155 Geometry.Color.Lines . . . . . . . . . . . . . . . . . . . . . . . 188
General.RecentFile2 . . . . . . . . . . . . . . . . . . . . . . . . 155 Geometry.Color.Normals . . . . . . . . . . . . . . . . . . . . . 189
General.RecentFile3 . . . . . . . . . . . . . . . . . . . . . . . . 155 Geometry.Color.Points . . . . . . . . . . . . . . . . . . . . . . 188
General.RecentFile4 . . . . . . . . . . . . . . . . . . . . . . . . 155 Geometry.Color.Projection . . . . . . . . . . . . . . . . . 189
General.RecentFile5 . . . . . . . . . . . . . . . . . . . . . . . . 155 Geometry.Color.Selection . . . . . . . . . . . . . . . . . . 189
General.RecentFile6 . . . . . . . . . . . . . . . . . . . . . . . . 155 Geometry.Color.Surfaces . . . . . . . . . . . . . . . . . . . 188
General.RecentFile7 . . . . . . . . . . . . . . . . . . . . . . . . 155 Geometry.Color.Tangents . . . . . . . . . . . . . . . . . . . 189
General.RecentFile8 . . . . . . . . . . . . . . . . . . . . . . . . 155 Geometry.Color.Volumes . . . . . . . . . . . . . . . . . . . . . 188
General.RecentFile9 . . . . . . . . . . . . . . . . . . . . . . . . 156 Geometry.CopyMeshingMethod . . . . . . . . . . . . . . . . 182
General.RotationCenterGravity . . . . . . . . . . . . . 173 Geometry.DoubleClickedEntityTag . . . . . . . . . . 182
General.RotationCenterX . . . . . . . . . . . . . . . . . . . 173 Geometry.DoubleClickedLineCommand . . . . . . . . 182
General.RotationCenterY . . . . . . . . . . . . . . . . . . . 173 Geometry.DoubleClickedPointCommand . . . . . . . 181
General.RotationCenterZ . . . . . . . . . . . . . . . . . . . 173 Geometry.DoubleClickedSurfaceCommand. . . . . 182
General.RotationX . . . . . . . . . . . . . . . . . . . . . . . . . . 172 Geometry.DoubleClickedVolumeCommand . . . . . . 182
General.RotationY . . . . . . . . . . . . . . . . . . . . . . . . . . 172 Geometry.ExactExtrusion . . . . . . . . . . . . . . . . . . . 182
General.RotationZ . . . . . . . . . . . . . . . . . . . . . . . . . . 173 Geometry.ExtrudeReturnLateralEntities . . . 182
General.SaveOptions . . . . . . . . . . . . . . . . . . . . . . . . 173 Geometry.ExtrudeSplinePoints . . . . . . . . . . . . . . 182
General.SaveSession . . . . . . . . . . . . . . . . . . . . . . . . 173 Geometry.HideCompounds . . . . . . . . . . . . . . . . . . . . . 183
General.ScaleX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 173 Geometry.HighlightOrphans . . . . . . . . . . . . . . . . . 183
General.ScaleY . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 173 Geometry.LabelType . . . . . . . . . . . . . . . . . . . . . . . . . 183
General.ScaleZ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 173 Geometry.Light . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 183
General.SessionFileName . . . . . . . . . . . . . . . . . . . 156 Geometry.LightTwoSide . . . . . . . . . . . . . . . . . . . . . . 183
General.Shininess . . . . . . . . . . . . . . . . . . . . . . . . . . 174 Geometry.LineNumbers . . . . . . . . . . . . . . . . . . . . . . . 183
General.ShininessExponent . . . . . . . . . . . . . . . . . 174 Geometry.Lines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 183
General.ShowMessagesOnStartup . . . . . . . . . . . . . 174 Geometry.LineSelectWidth . . . . . . . . . . . . . . . . . . 183
General.ShowOptionsOnStartup . . . . . . . . . . . . . . 174 Geometry.LineType . . . . . . . . . . . . . . . . . . . . . . . . . . 183
General.SmallAxes . . . . . . . . . . . . . . . . . . . . . . . . . . 174 Geometry.LineWidth . . . . . . . . . . . . . . . . . . . . . . . . . 183
General.SmallAxesPositionX . . . . . . . . . . . . . . . . 174 Geometry.MatchGeomAndMesh . . . . . . . . . . . . . . . . . 184
General.SmallAxesPositionY . . . . . . . . . . . . . . . . 174 Geometry.Normals. . . . . . . . . . . . . . . . . . . . . . . . . . . . 184
General.SmallAxesSize . . . . . . . . . . . . . . . . . . . . . . 174 Geometry.NumSubEdges . . . . . . . . . . . . . . . . . . . . . . . 184
General.StatisticsPositionX . . . . . . . . . . . . . . . 174 Geometry.OCCAutoFix . . . . . . . . . . . . . . . . . . . . . . . . 184
General.StatisticsPositionY . . . . . . . . . . . . . . . 174 Geometry.OCCBooleanPreserveNumbering. . . . . 184
General.Stereo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 175 Geometry.OCCFixDegenerated . . . . . . . . . . . . . . . . 184
General.SystemMenuBar . . . . . . . . . . . . . . . . . . . . . . 175 Geometry.OCCFixSmallEdges . . . . . . . . . . . . . . . . . 184
General.Terminal. . . . . . . . . . . . . . . . . . . . . . . . . . . . 175 Geometry.OCCFixSmallFaces . . . . . . . . . . . . . . . . . 184
General.TextEditor . . . . . . . . . . . . . . . . . . . . . . . . . 156 Geometry.OCCParallel . . . . . . . . . . . . . . . . . . . . . . . 184
General.TmpFileName . . . . . . . . . . . . . . . . . . . . . . . . 156 Geometry.OCCScaling . . . . . . . . . . . . . . . . . . . . . . . . 185
General.Tooltips. . . . . . . . . . . . . . . . . . . . . . . . . . . . 175 Geometry.OCCSewFaces . . . . . . . . . . . . . . . . . . . . . . . 184
General.Trackball . . . . . . . . . . . . . . . . . . . . . . . . . . 175 Geometry.OffsetX. . . . . . . . . . . . . . . . . . . . . . . . . . . . 185
General.TrackballHyperbolicSheet . . . . . . . . . 175 Geometry.OffsetY. . . . . . . . . . . . . . . . . . . . . . . . . . . . 185
General.TrackballQuaternion0 . . . . . . . . . . . . . . 175 Geometry.OffsetZ. . . . . . . . . . . . . . . . . . . . . . . . . . . . 185
General.TrackballQuaternion1 . . . . . . . . . . . . . . 175 Geometry.OldCircle . . . . . . . . . . . . . . . . . . . . . . . . . 185
General.TrackballQuaternion2 . . . . . . . . . . . . . . 175 Geometry.OldNewReg . . . . . . . . . . . . . . . . . . . . . . . . . 185
General.TrackballQuaternion3 . . . . . . . . . . . . . . 175 Geometry.OldRuledSurface . . . . . . . . . . . . . . . . . . 185
General.TranslationX . . . . . . . . . . . . . . . . . . . . . . . 176 Geometry.OrientedPhysicals . . . . . . . . . . . . . . . . 186
General.TranslationY . . . . . . . . . . . . . . . . . . . . . . . 176 Geometry.PointNumbers . . . . . . . . . . . . . . . . . . . . . . 185
General.TranslationZ . . . . . . . . . . . . . . . . . . . . . . . 176 Geometry.Points . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 185
General.VectorType . . . . . . . . . . . . . . . . . . . . . . . . . 176 Geometry.PointSelectSize . . . . . . . . . . . . . . . . . . 185
General.Verbosity . . . . . . . . . . . . . . . . . . . . . . . . . . 176 Geometry.PointSize . . . . . . . . . . . . . . . . . . . . . . . . . 186
General.VisibilityPositionX . . . . . . . . . . . . . . . 176 Geometry.PointType . . . . . . . . . . . . . . . . . . . . . . . . . 186
General.VisibilityPositionY . . . . . . . . . . . . . . . 176 Geometry.ReparamOnFaceRobust . . . . . . . . . . . . . . 186
General.WatchFilePattern . . . . . . . . . . . . . . . . . . 156 Geometry.ScalingFactor . . . . . . . . . . . . . . . . . . . . . 186
General.ZoomFactor . . . . . . . . . . . . . . . . . . . . . . . . . 176 Geometry.SnapX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 186
Geometry.AutoCoherence . . . . . . . . . . . . . . . . . . . . . 182 Geometry.SnapY . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 186
Syntax index 283

Geometry.SnapZ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 186 Merge char-expression ; . . . . . . . . . . . . . . . . . . . . . . 33


Geometry.SurfaceNumbers . . . . . . . . . . . . . . . . . . . 186 Mesh expression ; . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
Geometry.Surfaces . . . . . . . . . . . . . . . . . . . . . . . . . . 186 Mesh.Algorithm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 189
Geometry.SurfaceType . . . . . . . . . . . . . . . . . . . . . . . 187 Mesh.Algorithm3D. . . . . . . . . . . . . . . . . . . . . . . . . . . . 189
Geometry.Tangents . . . . . . . . . . . . . . . . . . . . . . . . . . 187 Mesh.AllowSwapAngle . . . . . . . . . . . . . . . . . . . . . . . . 190
Geometry.Tolerance . . . . . . . . . . . . . . . . . . . . . . . . . 187 Mesh.AngleSmoothNormals . . . . . . . . . . . . . . . . . . . 189
Geometry.ToleranceBoolean . . . . . . . . . . . . . . . . . 187 Mesh.AnisoMax . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 190
Geometry.Transform . . . . . . . . . . . . . . . . . . . . . . . . . 187 Mesh.BdfFieldFormat . . . . . . . . . . . . . . . . . . . . . . . . 190
Geometry.TransformXX . . . . . . . . . . . . . . . . . . . . . . . 187 Mesh.Binary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 190
Geometry.TransformXY . . . . . . . . . . . . . . . . . . . . . . . 187 Mesh.CgnsImportOrder . . . . . . . . . . . . . . . . . . . . . . . 190
Geometry.TransformXZ . . . . . . . . . . . . . . . . . . . . . . . 187 Mesh.ChacoArchitecture . . . . . . . . . . . . . . . . . . . . . 190
Geometry.TransformYX . . . . . . . . . . . . . . . . . . . . . . . 187 Mesh.ChacoEigensolver . . . . . . . . . . . . . . . . . . . . . . 190
Geometry.TransformYY . . . . . . . . . . . . . . . . . . . . . . . 187 Mesh.ChacoEigTol. . . . . . . . . . . . . . . . . . . . . . . . . . . . 190
Geometry.TransformYZ . . . . . . . . . . . . . . . . . . . . . . . 188 Mesh.ChacoGlobalMethod . . . . . . . . . . . . . . . . . . . . . 191
Geometry.TransformZX . . . . . . . . . . . . . . . . . . . . . . . 188 Mesh.ChacoHypercubeDim . . . . . . . . . . . . . . . . . . . . . 191
Geometry.TransformZY . . . . . . . . . . . . . . . . . . . . . . . 188 Mesh.ChacoLocalMethod . . . . . . . . . . . . . . . . . . . . . . 191
Geometry.TransformZZ . . . . . . . . . . . . . . . . . . . . . . . 188 Mesh.ChacoMeshDim1 . . . . . . . . . . . . . . . . . . . . . . . . . 191
Geometry.VolumeNumbers . . . . . . . . . . . . . . . . . . . . . 188 Mesh.ChacoMeshDim2 . . . . . . . . . . . . . . . . . . . . . . . . . 191
Geometry.Volumes. . . . . . . . . . . . . . . . . . . . . . . . . . . . 188 Mesh.ChacoMeshDim3 . . . . . . . . . . . . . . . . . . . . . . . . . 191
GMSH_MAJOR_VERSION . . . . . . . . . . . . . . . . . . . . . . . . . . 29 Mesh.ChacoParamINTERNAL_VERTICES . . . . . . . . . 192
GMSH_MINOR_VERSION . . . . . . . . . . . . . . . . . . . . . . . . . . 29 Mesh.ChacoParamREFINE_MAP . . . . . . . . . . . . . . . . . 192
GMSH_PATCH_VERSION . . . . . . . . . . . . . . . . . . . . . . . . . . 29 Mesh.ChacoParamREFINE_PARTITION . . . . . . . . . . 192
Gradient . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57 Mesh.ChacoParamTERMINAL_PROPOGATION . . . . . . 192
Mesh.ChacoPartitionSection . . . . . . . . . . . . . . . . 191
Mesh.ChacoSeed . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 191
H Mesh.ChacoVMax . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 191
Hide char-expression ; . . . . . . . . . . . . . . . . . . . 44, 67 Mesh.CharacteristicLengthExtendFromBoundary
Homology ( { expression-list } ) { { . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 192
expression-list } , { expression-list } Mesh.CharacteristicLengthFactor . . . . . . . . . . 192
}; . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68 Mesh.CharacteristicLengthFromCurvature . . 192
Hypot ( expression, expression ) . . . . . . . . . . . . 27 Mesh.CharacteristicLengthFromPoints . . . . . . 192
Mesh.CharacteristicLengthMax . . . . . . . . . . . . . . 192
Mesh.CharacteristicLengthMin . . . . . . . . . . . . . . 192
I Mesh.Clip . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 193
If ( expression ) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 Mesh.Color.Eight. . . . . . . . . . . . . . . . . . . . . . . . . . . . 206
Include char-expression ; . . . . . . . . . . . . . . . . . . . . 34 Mesh.Color.Eighteen . . . . . . . . . . . . . . . . . . . . . . . . 207
IntersectAniso . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58 Mesh.Color.Eleven . . . . . . . . . . . . . . . . . . . . . . . . . . 206
Mesh.Color.Fifteen . . . . . . . . . . . . . . . . . . . . . . . . . 207
Mesh.Color.Five . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 206
L Mesh.Color.Four . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 206
Laplacian . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58 Mesh.Color.Fourteen . . . . . . . . . . . . . . . . . . . . . . . . 207
Line ( expression ) = { expression, expression Mesh.Color.Hexahedra . . . . . . . . . . . . . . . . . . . . . . . 205
}; . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36 Mesh.Color.Lines. . . . . . . . . . . . . . . . . . . . . . . . . . . . 204
Line Loop ( expression ) = { expression-list Mesh.Color.Nine . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 206
}; . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36 Mesh.Color.Nineteen . . . . . . . . . . . . . . . . . . . . . . . . 207
Log ( expression ) . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 Mesh.Color.Normals . . . . . . . . . . . . . . . . . . . . . . . . . 205
Log10 ( expression ) . . . . . . . . . . . . . . . . . . . . . . . . . 27 Mesh.Color.One . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 205
LonLat . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58 Mesh.Color.Points . . . . . . . . . . . . . . . . . . . . . . . . . . 204
Mesh.Color.PointsSup . . . . . . . . . . . . . . . . . . . . . . . 204
Mesh.Color.Prisms . . . . . . . . . . . . . . . . . . . . . . . . . . 205
M Mesh.Color.Pyramids . . . . . . . . . . . . . . . . . . . . . . . . 205
Macro string | char-expression . . . . . . . . . . . . . 28 Mesh.Color.Quadrangles . . . . . . . . . . . . . . . . . . . . . 204
MathEval . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58 Mesh.Color.Seven. . . . . . . . . . . . . . . . . . . . . . . . . . . . 206
MathEvalAniso . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59 Mesh.Color.Seventeen . . . . . . . . . . . . . . . . . . . . . . . 207
Max . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59 Mesh.Color.Six . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 206
MaxEigenHessian . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59 Mesh.Color.Sixteen . . . . . . . . . . . . . . . . . . . . . . . . . 207
Mean . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60 Mesh.Color.Tangents . . . . . . . . . . . . . . . . . . . . . . . . 205
Memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 Mesh.Color.Ten . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 206
284 Gmsh 3.0

Mesh.Color.Tetrahedra . . . . . . . . . . . . . . . . . . . . . . 205 Mesh.NumSubEdges. . . . . . . . . . . . . . . . . . . . . . . . . . . . 198


Mesh.Color.Thirteen . . . . . . . . . . . . . . . . . . . . . . . . 207 Mesh.OldRefinement . . . . . . . . . . . . . . . . . . . . . . . . . 198
Mesh.Color.Three. . . . . . . . . . . . . . . . . . . . . . . . . . . . 206 Mesh.Optimize . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 198
Mesh.Color.Triangles . . . . . . . . . . . . . . . . . . . . . . . 204 Mesh.OptimizeNetgen . . . . . . . . . . . . . . . . . . . . . . . . 198
Mesh.Color.Trihedra . . . . . . . . . . . . . . . . . . . . . . . . 205 Mesh.OptimizeThreshold . . . . . . . . . . . . . . . . . . . . . 198
Mesh.Color.Twelve . . . . . . . . . . . . . . . . . . . . . . . . . . 206 Mesh.Partitioner. . . . . . . . . . . . . . . . . . . . . . . . . . . . 198
Mesh.Color.Two . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 205 Mesh.PartitionHexWeight . . . . . . . . . . . . . . . . . . . 196
Mesh.Color.Zero . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 205 Mesh.PartitionPrismWeight . . . . . . . . . . . . . . . . . 196
Mesh.ColorCarousel . . . . . . . . . . . . . . . . . . . . . . . . . 193 Mesh.PartitionPyramidWeight . . . . . . . . . . . . . . . 196
Mesh.CpuTime . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 193 Mesh.PartitionQuadWeight . . . . . . . . . . . . . . . . . . 197
Mesh.DoRecombinationTest . . . . . . . . . . . . . . . . . . 201 Mesh.PartitionTetWeight . . . . . . . . . . . . . . . . . . . 197
Mesh.DrawSkinOnly . . . . . . . . . . . . . . . . . . . . . . . . . . 193 Mesh.PartitionTrihedronWeight . . . . . . . . . . . . . 197
Mesh.Dual . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 193 Mesh.PartitionTriWeight . . . . . . . . . . . . . . . . . . . 197
Mesh.ElementOrder . . . . . . . . . . . . . . . . . . . . . . . . . . 193 Mesh.PointNumbers . . . . . . . . . . . . . . . . . . . . . . . . . . 199
Mesh.Explode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 193 Mesh.Points . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 199
Mesh.FlexibleTransfinite . . . . . . . . . . . . . . . . . . 193 Mesh.PointSize . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 199
Mesh.Format . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 193 Mesh.PointType . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 199
Mesh.Hexahedra . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 194 Mesh.PreserveNumberingMsh2 . . . . . . . . . . . . . . . . 200
Mesh.HighOrderNumLayers . . . . . . . . . . . . . . . . . . . 194 Mesh.Prisms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 199
Mesh.HighOrderOptimize . . . . . . . . . . . . . . . . . . . . . 194 Mesh.Pyramids . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 199
Mesh.HighOrderOptPrimSurfMesh . . . . . . . . . . . . . 194 Mesh.Quadrangles. . . . . . . . . . . . . . . . . . . . . . . . . . . . 199
Mesh.HighOrderPoissonRatio . . . . . . . . . . . . . . . . 194 Mesh.QualityInf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 199
Mesh.HighOrderThresholdMax . . . . . . . . . . . . . . . . 194 Mesh.QualitySup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 199
Mesh.HighOrderThresholdMin . . . . . . . . . . . . . . . . 194 Mesh.QualityType. . . . . . . . . . . . . . . . . . . . . . . . . . . . 199
Mesh.IgnorePartitionBoundary . . . . . . . . . . . . . . 200 Mesh.RadiusInf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 200
Mesh.IgnorePeriodicity . . . . . . . . . . . . . . . . . . . . . 200 Mesh.RadiusSup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 200
Mesh.LabelSampling . . . . . . . . . . . . . . . . . . . . . . . . . 194 Mesh.RandomFactor . . . . . . . . . . . . . . . . . . . . . . . . . . 200
Mesh.LabelType . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 194 Mesh.RecombinationAlgorithm . . . . . . . . . . . . . . . 200
Mesh.LcIntegrationPrecision . . . . . . . . . . . . . . . 194 Mesh.RecombinationTestHorizStart . . . . . . . . . 201
Mesh.Light . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 195 Mesh.RecombinationTestNoGreedyStrat . . . . . . 201
Mesh.LightLines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 195 Mesh.Recombine3DAll . . . . . . . . . . . . . . . . . . . . . . . . 200
Mesh.LightTwoSide . . . . . . . . . . . . . . . . . . . . . . . . . . 195 Mesh.Recombine3DConformity . . . . . . . . . . . . . . . . 201
Mesh.LineNumbers. . . . . . . . . . . . . . . . . . . . . . . . . . . . 195 Mesh.Recombine3DLevel . . . . . . . . . . . . . . . . . . . . . . 201
Mesh.Lines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 195 Mesh.RecombineAll . . . . . . . . . . . . . . . . . . . . . . . . . . 200
Mesh.LineWidth . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 195 Mesh.RefineSteps. . . . . . . . . . . . . . . . . . . . . . . . . . . . 201
Mesh.Lloyd . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 190 Mesh.RemeshAlgorithm . . . . . . . . . . . . . . . . . . . . . . . 201
Mesh.MaxNumThreads1D . . . . . . . . . . . . . . . . . . . . . . . 195 Mesh.RemeshParametrization . . . . . . . . . . . . . . . . 201
Mesh.MaxNumThreads2D . . . . . . . . . . . . . . . . . . . . . . . 195 Mesh.SaveAll . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 201
Mesh.MaxNumThreads3D . . . . . . . . . . . . . . . . . . . . . . . 195 Mesh.SaveElementTagType . . . . . . . . . . . . . . . . . . . 201
Mesh.MeshOnlyVisible . . . . . . . . . . . . . . . . . . . . . . . 195 Mesh.SaveGroupsOfNodes . . . . . . . . . . . . . . . . . . . . . 202
Mesh.MetisAlgorithm . . . . . . . . . . . . . . . . . . . . . . . . 196 Mesh.SaveParametric . . . . . . . . . . . . . . . . . . . . . . . . 202
Mesh.MetisEdgeMatching . . . . . . . . . . . . . . . . . . . . . 196 Mesh.SaveTopology . . . . . . . . . . . . . . . . . . . . . . . . . . 202
Mesh.MetisRefinementAlgorithm . . . . . . . . . . . . . 196 Mesh.ScalingFactor . . . . . . . . . . . . . . . . . . . . . . . . . 202
Mesh.MinimumCirclePoints . . . . . . . . . . . . . . . . . . 196 Mesh.SecondOrderExperimental . . . . . . . . . . . . . . 202
Mesh.MinimumCurvePoints . . . . . . . . . . . . . . . . . . . 196 Mesh.SecondOrderIncomplete . . . . . . . . . . . . . . . . 202
Mesh.MshFilePartitioned . . . . . . . . . . . . . . . . . . . 196 Mesh.SecondOrderLinear . . . . . . . . . . . . . . . . . . . . . 202
Mesh.MshFileVersion . . . . . . . . . . . . . . . . . . . . . . . . 196 Mesh.SmoothCrossField . . . . . . . . . . . . . . . . . . . . . . 190
Mesh.NbHexahedra. . . . . . . . . . . . . . . . . . . . . . . . . . . . 197 Mesh.Smoothing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 202
Mesh.NbNodes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 197 Mesh.SmoothNormals . . . . . . . . . . . . . . . . . . . . . . . . . 202
Mesh.NbPartitions . . . . . . . . . . . . . . . . . . . . . . . . . . 197 Mesh.SmoothRatio. . . . . . . . . . . . . . . . . . . . . . . . . . . . 202
Mesh.NbPrisms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 197 Mesh.SubdivisionAlgorithm . . . . . . . . . . . . . . . . . 203
Mesh.NbPyramids . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 197 Mesh.SurfaceEdges . . . . . . . . . . . . . . . . . . . . . . . . . . 203
Mesh.NbQuadrangles . . . . . . . . . . . . . . . . . . . . . . . . . 198 Mesh.SurfaceFaces . . . . . . . . . . . . . . . . . . . . . . . . . . 203
Mesh.NbTetrahedra . . . . . . . . . . . . . . . . . . . . . . . . . . 198 Mesh.SurfaceNumbers . . . . . . . . . . . . . . . . . . . . . . . . 203
Mesh.NbTriangles. . . . . . . . . . . . . . . . . . . . . . . . . . . . 198 Mesh.SwitchElementTags . . . . . . . . . . . . . . . . . . . . . 203
Mesh.NbTrihedra . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 197 Mesh.Tangents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 203
Mesh.NewtonConvergenceTestXYZ . . . . . . . . . . . . . 193 Mesh.Tetrahedra . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 203
Mesh.Normals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 198 Mesh.ToleranceEdgeLength . . . . . . . . . . . . . . . . . . 203
Syntax index 285

Mesh.ToleranceInitialDelaunay . . . . . . . . . . . . . 203 Physical Surface ( expression |


Mesh.Triangles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 203 char-expression <, expression > ) <+|->= {
Mesh.Trihedra . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 199 expression-list }; . . . . . . . . . . . . . . . . . . . . . . 38
Mesh.VolumeEdges. . . . . . . . . . . . . . . . . . . . . . . . . . . . 204 Physical Volume ( expression |
Mesh.VolumeFaces. . . . . . . . . . . . . . . . . . . . . . . . . . . . 204 char-expression <, expression > ) <+|->= {
Mesh.VolumeNumbers . . . . . . . . . . . . . . . . . . . . . . . . . 204 expression-list }; . . . . . . . . . . . . . . . . . . . . . . 40
Mesh.Voronoi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 204 Pi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
Mesh.ZoneDefinition . . . . . . . . . . . . . . . . . . . . . . . . 204 Plane Surface ( expression ) = {
MeshAlgorithm Surface { expression-list } = expression-list }; . . . . . . . . . . . . . . . . . . . . . . 37
expression ; . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68 Plugin (string ) . Run; . . . . . . . . . . . . . . . . . . . . . . . 73
Min . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60 Plugin (string ) . string = expression |
MinAniso . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60 char-expression ; . . . . . . . . . . . . . . . . . . . . . . . . 73
Modulo ( expression, expression ) . . . . . . . . . . 27 Plugin(AnalyseCurvedMesh) . . . . . . . . . . . . . . . . . . 76
MPI_Rank . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 Plugin(Annotate) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77
MPI_Size . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 Plugin(Bubbles) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78
Plugin(Crack) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78
Plugin(Curl) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78
N Plugin(CurvedBndDist) . . . . . . . . . . . . . . . . . . . . . . . 79
newl . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 Plugin(CutBox) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79
newll . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 Plugin(CutGrid) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80
NewModel; . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 Plugin(CutParametric) . . . . . . . . . . . . . . . . . . . . . . . 80
newp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 Plugin(CutPlane) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81
newreg . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 Plugin(CutSphere). . . . . . . . . . . . . . . . . . . . . . . . . . . . 82
news . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 Plugin(DiscretizationError) . . . . . . . . . . . . . . . . 82
newsl . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 Plugin(Distance) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82
Plugin(Divergence) . . . . . . . . . . . . . . . . . . . . . . . . . . 83
newv . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
Plugin(DuplicateBoundaries) . . . . . . . . . . . . . . . . 83
NonBlockingSystemCall char-expression ;. . . . 34
Plugin(Eigenvalues) . . . . . . . . . . . . . . . . . . . . . . . . . 83
Plugin(Eigenvectors) . . . . . . . . . . . . . . . . . . . . . . . . 84
O Plugin(ExtractEdges) . . . . . . . . . . . . . . . . . . . . . . . . 84
Plugin(ExtractElements) . . . . . . . . . . . . . . . . . . . . . 84
Octree . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60 Plugin(FaultZone). . . . . . . . . . . . . . . . . . . . . . . . . . . . 84
OnelabRun ( char-expression <, Plugin(FieldFromAmplitudePhase) . . . . . . . . . . . 85
char-expression > ) . . . . . . . . . . . . . . . . . . . . . 34 Plugin(GaussPoints) . . . . . . . . . . . . . . . . . . . . . . . . . 85
operator-binary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 Plugin(Gradient) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86
operator-ternary-left . . . . . . . . . . . . . . . . . . . . . . . 25 Plugin(HarmonicToTime) . . . . . . . . . . . . . . . . . . . . . . 86
operator-ternary-right . . . . . . . . . . . . . . . . . . . . . . 25 Plugin(HomologyComputation) . . . . . . . . . . . . . . . . 86
operator-unary-left . . . . . . . . . . . . . . . . . . . . . . . . . 25 Plugin(HomologyPostProcessing) . . . . . . . . . . . . . 87
operator-unary-right . . . . . . . . . . . . . . . . . . . . . . . . 25 Plugin(Integrate). . . . . . . . . . . . . . . . . . . . . . . . . . . . 88
OptimizeMesh char-expression ; . . . . . . . . . . . . . . 66 Plugin(Isosurface) . . . . . . . . . . . . . . . . . . . . . . . . . . 89
Plugin(Lambda2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89
Plugin(LongitudeLatitude) . . . . . . . . . . . . . . . . . . 90
P Plugin(MakeSimplex) . . . . . . . . . . . . . . . . . . . . . . . . . 90
Param . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61 Plugin(MathEval) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90
PartitionMesh expression ; . . . . . . . . . . . . . . . . . . 67 Plugin(MeshSubEntities) . . . . . . . . . . . . . . . . . . . . . 91
Periodic Line { expression-list } = { Plugin(MinMax) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92
expression-list } ; . . . . . . . . . . . . . . . . . . . . . 67 Plugin(ModifyComponents) . . . . . . . . . . . . . . . . . . . 92
Periodic Line | Surface { expression-list } = Plugin(ModulusPhase) . . . . . . . . . . . . . . . . . . . . . . . . 94
{ expression-list } Affine | Rotate | Plugin(NearestNeighbor) . . . . . . . . . . . . . . . . . . . . . 95
Translate { expression-list } ; . . . . . . . . 67 Plugin(NearToFarField) . . . . . . . . . . . . . . . . . . . . . . 94
Periodic Surface expression { expression-list Plugin(NewView) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95
} = expression { expression-list } ; . . . 67 Plugin(Particles). . . . . . . . . . . . . . . . . . . . . . . . . . . . 95
Physical Line ( expression | char-expression Plugin(Probe) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96
<, expression > ) <+|->= { expression-list Plugin(Remove) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96
}; . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37 Plugin(Scal2Tens). . . . . . . . . . . . . . . . . . . . . . . . . . . . 97
Physical Point ( expression | char-expression Plugin(Scal2Vec) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98
<, expression > ) <+|->= { expression-list Plugin(ShowNeighborElements) . . . . . . . . . . . . . . . 98
}; . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36 Plugin(SimplePartition) . . . . . . . . . . . . . . . . . . . . . 98
286 Gmsh 3.0

Plugin(Skin) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98 Print.JpegQuality . . . . . . . . . . . . . . . . . . . . . . . . . . 180


Plugin(Smooth) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99 Print.JpegSmoothing . . . . . . . . . . . . . . . . . . . . . . . . 180
Plugin(SphericalRaise) . . . . . . . . . . . . . . . . . . . . . . 99 Print.Parameter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 177
Plugin(StreamLines) . . . . . . . . . . . . . . . . . . . . . . . . . 99 Print.ParameterCommand . . . . . . . . . . . . . . . . . . . . . 177
Plugin(Tetrahedralize) . . . . . . . . . . . . . . . . . . . . . 100 Print.ParameterFirst . . . . . . . . . . . . . . . . . . . . . . . 177
Plugin(ThinLayerFixMesh) . . . . . . . . . . . . . . . . . . 101 Print.ParameterLast . . . . . . . . . . . . . . . . . . . . . . . . 178
Plugin(Transform) . . . . . . . . . . . . . . . . . . . . . . . . . . 101 Print.ParameterSteps . . . . . . . . . . . . . . . . . . . . . . . 178
Plugin(Triangulate) . . . . . . . . . . . . . . . . . . . . . . . . 101 Print.PgfExportAxis . . . . . . . . . . . . . . . . . . . . . . . . 178
Plugin(VoroMetal) . . . . . . . . . . . . . . . . . . . . . . . . . . 102 Print.PgfHorizontalBar . . . . . . . . . . . . . . . . . . . . . 178
Plugin(Warp) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102 Print.PgfTwoDim . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 178
Point ( expression ) = { expression, Print.PostDisto . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 181
expression, expression <, expression > }; Print.PostElement . . . . . . . . . . . . . . . . . . . . . . . . . . 180
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 Print.PostElementary . . . . . . . . . . . . . . . . . . . . . . . 180
Point | Line { expression-list } In Surface { Print.PostEta . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 180
expression }; . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67 Print.PostGamma . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 180
PointsOf { transform-list } . . . . . . . . . . . . . . . . . 43 Print.PostSICN . . . . . . . . . . . . . . . . . . . . . . . . . 180, 181
PostProcessing.AnimationCycle . . . . . . . . . . . . . 213 Print.TexAsEquation . . . . . . . . . . . . . . . . . . . . . . . . 181
PostProcessing.AnimationDelay . . . . . . . . . . . . . 213 Print.Text . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 181
PostProcessing.AnimationStep . . . . . . . . . . . . . . 213 Print.Width . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 181
PostProcessing.CombineRemoveOriginal. . . . . 213 Print.X3dCompatibility . . . . . . . . . . . . . . . . . . . . . 181
PostProcessing.DoubleClickedGraphPointCommand Print.X3dPrecision . . . . . . . . . . . . . . . . . . . . . . . . . 181
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 213 Print.X3dRemoveInnerBorders . . . . . . . . . . . . . . . 181
PostProcessing.DoubleClickedGraphPointX Print.X3dTransparency . . . . . . . . . . . . . . . . . . . . . . 181
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 213 Printf ( char-expression , expression-list )
PostProcessing.DoubleClickedGraphPointY > char-expression ; . . . . . . . . . . . . . . . . . . . . . . 32
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 213
Printf ( char-expression , expression-list )
PostProcessing.DoubleClickedView . . . . . . . . . 214 >> char-expression ; . . . . . . . . . . . . . . . . . . . . . 32
PostProcessing.ForceElementData . . . . . . . . . . 214
Printf ( char-expression <, expression-list >
PostProcessing.ForceNodeData . . . . . . . . . . . . . . 214 ); . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
PostProcessing.Format . . . . . . . . . . . . . . . . . . . . . . 214
PostProcessing.GraphPointCommand . . . . . . . . . 213
PostProcessing.GraphPointX . . . . . . . . . . . . . . . . 214
PostProcessing.GraphPointY . . . . . . . . . . . . . . . . 214
R
PostProcessing.HorizontalScales . . . . . . . . . . 214 Rand ( expression ) . . . . . . . . . . . . . . . . . . . . . . . . . . 28
PostProcessing.Link . . . . . . . . . . . . . . . . . . . . . . . . 214 real-option *= expression ; . . . . . . . . . . . . . . . . . 32
PostProcessing.NbViews . . . . . . . . . . . . . . . . . . . . . 214 real-option += expression ; . . . . . . . . . . . . . . . . . 32
PostProcessing.Plugins . . . . . . . . . . . . . . . . . . . . . 214 real-option -= expression ; . . . . . . . . . . . . . . . . . 32
PostProcessing.Smoothing . . . . . . . . . . . . . . . . . . 215 real-option /= expression ; . . . . . . . . . . . . . . . . . 32
PostView . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61 real-option = expression ; . . . . . . . . . . . . . . . . . . . 32
Print char-expression ; . . . . . . . . . . . . . . . . . . . . . . 33 Recombine Surface { expression-list } | "*" <
Print.Background. . . . . . . . . . . . . . . . . . . . . . . . . . . . 178 = expression >; . . . . . . . . . . . . . . . . . . . . . . . . . . 68
Print.CompositeWindows . . . . . . . . . . . . . . . . . . . . . 178 Rectangle ( expression ) = { expression-list
Print.DeleteTemporaryFiles . . . . . . . . . . . . . . . . 178 }; . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
Print.EpsBestRoot . . . . . . . . . . . . . . . . . . . . . . . . . . 178 RefineMesh; . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
Print.EpsCompress . . . . . . . . . . . . . . . . . . . . . . . . . . 178 RelocateMesh Point | Line | Surface {
Print.EpsLineWidthFactor . . . . . . . . . . . . . . . . . . 179 expression-list } | "*"; . . . . . . . . . . . . . . . . 67
Print.EpsOcclusionCulling . . . . . . . . . . . . . . . . . 179 Restrict . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
Print.EpsPointSizeFactor . . . . . . . . . . . . . . . . . . 179 Return . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
Print.EpsPS3Shading . . . . . . . . . . . . . . . . . . . . . . . . 179 Reverse Line | Surface { expression-list } |
Print.EpsQuality. . . . . . . . . . . . . . . . . . . . . . . . . . . . 179 "*" ; . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
Print.Format . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 179 Rotate { { expression-list }, {
Print.GeoLabels . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 179 expression-list }, expression } {
Print.GeoOnlyPhysicals . . . . . . . . . . . . . . . . . . . . . 179 transform-list } . . . . . . . . . . . . . . . . . . . . . . . . 43
Print.GifDither . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 179 Round ( expression ) . . . . . . . . . . . . . . . . . . . . . . . . . 28
Print.GifInterlace . . . . . . . . . . . . . . . . . . . . . . . . . 179 Ruled ThruSections ( expression ) = {
Print.GifSort . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 180 expression-list }; . . . . . . . . . . . . . . . . . . . . . . 40
Print.GifTransparent . . . . . . . . . . . . . . . . . . . . . . . 180 Ruled ThruSections { expression-list } . . . . . 41
Print.Height . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 180
Syntax index 287

S Solver.Name8 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 209
Save char-expression ; . . . . . . . . . . . . . . . . . . . . . . . 68 Solver.Name9 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 209
Save View[expression ] char-expression ; . . . . 73 Solver.OctaveInterpreter . . . . . . . . . . . . . . . . . . 210
SetChanged; . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 Solver.Plugins . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 212
SetFactory(char-expression ); . . . . . . . . . . . . . . . 34 Solver.PythonInterpreter . . . . . . . . . . . . . . . . . . 210
SetName char-expression ; . . . . . . . . . . . . . . . . . . . . 34 Solver.RemoteLogin0 . . . . . . . . . . . . . . . . . . . . . . . . 210
SetNumber( char-expression , expression ); Solver.RemoteLogin1 . . . . . . . . . . . . . . . . . . . . . . . . 211
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 Solver.RemoteLogin2 . . . . . . . . . . . . . . . . . . . . . . . . 211
SetOrder expression ; . . . . . . . . . . . . . . . . . . . . . . . . 67 Solver.RemoteLogin3 . . . . . . . . . . . . . . . . . . . . . . . . 211
SetPartition expression { Point | Line | Solver.RemoteLogin4 . . . . . . . . . . . . . . . . . . . . . . . . 211
Surface | Volume { expression-list }; ... Solver.RemoteLogin5 . . . . . . . . . . . . . . . . . . . . . . . . 211
} . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67 Solver.RemoteLogin6 . . . . . . . . . . . . . . . . . . . . . . . . 211
SetString( char-expression , char-expression Solver.RemoteLogin7 . . . . . . . . . . . . . . . . . . . . . . . . 211
); . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 Solver.RemoteLogin8 . . . . . . . . . . . . . . . . . . . . . . . . 211
ShapeFromFile( char-expression ); . . . . . . . . . . 33 Solver.RemoteLogin9 . . . . . . . . . . . . . . . . . . . . . . . . 211
Show char-expression ; . . . . . . . . . . . . . . . . . . . 44, 68 Solver.ShowInvisibleParameters . . . . . . . . . . . 213
Sin ( expression ) . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 Solver.SocketName . . . . . . . . . . . . . . . . . . . . . . . . . . 211
Sinh ( expression ) . . . . . . . . . . . . . . . . . . . . . . . . . . 28 Solver.Timeout . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 213
Sleep expression ; . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 Sphere ( expression ) = { expression-list };
Smoother Surface { expression-list } = . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
expression ; . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68 Spline ( expression ) = { expression-list };
Solver.AlwaysListen . . . . . . . . . . . . . . . . . . . . . . . . 212 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
Solver.AutoArchiveOutputFiles . . . . . . . . . . . . . 212 Sqrt ( expression ) . . . . . . . . . . . . . . . . . . . . . . . . . . 28
Solver.AutoCheck. . . . . . . . . . . . . . . . . . . . . . . . . . . . 212 string *= expression ; . . . . . . . . . . . . . . . . . . . . . . . 31
Solver.AutoLoadDatabase . . . . . . . . . . . . . . . . . . . 212 string += { expression-list }; . . . . . . . . . . . . . . 31
Solver.AutoMergeFile . . . . . . . . . . . . . . . . . . . . . . . 212 string += expression ; . . . . . . . . . . . . . . . . . . . . . . . 30
Solver.AutoMesh . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 212 string -= { expression-list }; . . . . . . . . . . . . . . 31
Solver.AutoSaveDatabase . . . . . . . . . . . . . . . . . . . 212 string -= expression ; . . . . . . . . . . . . . . . . . . . . . . . 31
Solver.AutoShowLastStep . . . . . . . . . . . . . . . . . . . 212 string /= expression ; . . . . . . . . . . . . . . . . . . . . . . . 31
Solver.AutoShowViews . . . . . . . . . . . . . . . . . . . . . . . 212 string = { }; . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
Solver.Executable0 . . . . . . . . . . . . . . . . . . . . . . . . . 207 string = char-expression ; . . . . . . . . . . . . . . . . . . . 31
Solver.Executable1 . . . . . . . . . . . . . . . . . . . . . . . . . 207 string = expression ; . . . . . . . . . . . . . . . . . . . . . . . . 29
Solver.Executable2 . . . . . . . . . . . . . . . . . . . . . . . . . 207 string [ { expression-list } ] *= {
Solver.Executable3 . . . . . . . . . . . . . . . . . . . . . . . . . 208 expression-list }; . . . . . . . . . . . . . . . . . . . . . . 31
Solver.Executable4 . . . . . . . . . . . . . . . . . . . . . . . . . 208 string [ { expression-list } ] += {
Solver.Executable5 . . . . . . . . . . . . . . . . . . . . . . . . . 208 expression-list }; . . . . . . . . . . . . . . . . . . . . . . 31
Solver.Executable6 . . . . . . . . . . . . . . . . . . . . . . . . . 208 string [ { expression-list } ] -= {
Solver.Executable7 . . . . . . . . . . . . . . . . . . . . . . . . . 208 expression-list }; . . . . . . . . . . . . . . . . . . . . . . 31
Solver.Executable8 . . . . . . . . . . . . . . . . . . . . . . . . . 208 string [ { expression-list } ] /= {
Solver.Executable9 . . . . . . . . . . . . . . . . . . . . . . . . . 208 expression-list }; . . . . . . . . . . . . . . . . . . . . . . 31
Solver.Extension0 . . . . . . . . . . . . . . . . . . . . . . . . . . 209 string [ { expression-list } ] = {
Solver.Extension1 . . . . . . . . . . . . . . . . . . . . . . . . . . 209 expression-list }; . . . . . . . . . . . . . . . . . . . . . . 30
Solver.Extension2 . . . . . . . . . . . . . . . . . . . . . . . . . . 209 string [] += Str( char-expression-list ) ;
Solver.Extension3 . . . . . . . . . . . . . . . . . . . . . . . . . . 210 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
Solver.Extension4 . . . . . . . . . . . . . . . . . . . . . . . . . . 210 string [] = { expression-list };. . . . . . . . . . . . . 30
Solver.Extension5 . . . . . . . . . . . . . . . . . . . . . . . . . . 210 string [] = Str( char-expression-list ) ; . . . 31
Solver.Extension6 . . . . . . . . . . . . . . . . . . . . . . . . . . 210 Structured. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
Solver.Extension7 . . . . . . . . . . . . . . . . . . . . . . . . . . 210 Surface ( expression ) = { expression-list } <
Solver.Extension8 . . . . . . . . . . . . . . . . . . . . . . . . . . 210 In Sphere { expression } >; . . . . . . . . . . . . . 38
Solver.Extension9 . . . . . . . . . . . . . . . . . . . . . . . . . . 210 Surface { expression-list } In Volume {
Solver.Name0 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 208 expression }; . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
Solver.Name1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 208 Surface Loop ( expression ) = {
Solver.Name2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 208 expression-list }; . . . . . . . . . . . . . . . . . . . . . . 38
Solver.Name3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 209 Symmetry { expression-list } { transform-list
Solver.Name4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 209 } . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
Solver.Name5 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 209 SyncModel;. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
Solver.Name6 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 209 SystemCall char-expression ; . . . . . . . . . . . . . . . . 34
Solver.Name7 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 209
288 Gmsh 3.0

T View.Color.Background2D . . . . . . . . . . . . . . . . . . . 231
Tan ( expression ) . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 View.Color.Hexahedra . . . . . . . . . . . . . . . . . . . . . . . 230
Tanh ( expression ) . . . . . . . . . . . . . . . . . . . . . . . . . . 28 View.Color.Lines. . . . . . . . . . . . . . . . . . . . . . . . . . . . 230
Threshold . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63 View.Color.Normals . . . . . . . . . . . . . . . . . . . . . . . . . 231
ThruSections ( expression ) = { View.Color.Points . . . . . . . . . . . . . . . . . . . . . . . . . . 230
expression-list }; . . . . . . . . . . . . . . . . . . . . . . 39 View.Color.Prisms . . . . . . . . . . . . . . . . . . . . . . . . . . 230
ThruSections { expression-list } . . . . . . . . . . . 41 View.Color.Pyramids . . . . . . . . . . . . . . . . . . . . . . . . 230
Torus ( expression ) = { expression-list }; View.Color.Quadrangles . . . . . . . . . . . . . . . . . . . . . 230
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 View.Color.Tangents . . . . . . . . . . . . . . . . . . . . . . . . 230
TotalMemory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 View.Color.Tetrahedra . . . . . . . . . . . . . . . . . . . . . . 230
Transfinite Line { expression-list } | "*" = View.Color.Text2D . . . . . . . . . . . . . . . . . . . . . . . . . . 231
expression < Using Progression | Bump View.Color.Text3D . . . . . . . . . . . . . . . . . . . . . . . . . . 231
expression >; . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65 View.Color.Triangles . . . . . . . . . . . . . . . . . . . . . . . 230
Transfinite Surface { expression-list } | "*" View.Color.Trihedra . . . . . . . . . . . . . . . . . . . . . . . . 230
< = { expression-list } > < Left | Right | View.ColormapAlpha . . . . . . . . . . . . . . . . . . . . . . . . . 219
Alternate | AlternateRight | View.ColormapAlphaPower . . . . . . . . . . . . . . . . . . . 219
AlternateLeft > ; . . . . . . . . . . . . . . . . . . . . . . . . 66 View.ColormapBeta . . . . . . . . . . . . . . . . . . . . . . . . . . 220
Transfinite Volume { expression-list } | "*" < View.ColormapBias . . . . . . . . . . . . . . . . . . . . . . . . . . 220
= { expression-list } > ;. . . . . . . . . . . . . . . . 66 View.ColormapCurvature . . . . . . . . . . . . . . . . . . . . . 220
transform . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42 View.ColormapInvert . . . . . . . . . . . . . . . . . . . . . . . . 220
TransfQuadTri { expression-list } | "*"; . . . 66 View.ColormapNumber . . . . . . . . . . . . . . . . . . . . . . . . 220
Translate { expression-list } { View.ColormapRotation . . . . . . . . . . . . . . . . . . . . . . 220
transform-list } . . . . . . . . . . . . . . . . . . . . . . . . 43 View.ColormapSwap . . . . . . . . . . . . . . . . . . . . . . . . . . 220
View.ColorTable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 231
View.ComponentMap0 . . . . . . . . . . . . . . . . . . . . . . . . . 220
V View.ComponentMap1 . . . . . . . . . . . . . . . . . . . . . . . . . 220
View "string " { string < ( expression-list ) > View.ComponentMap2 . . . . . . . . . . . . . . . . . . . . . . . . . 220
{ expression-list }; ... }; . . . . . . . . . . . . . 73 View.ComponentMap3 . . . . . . . . . . . . . . . . . . . . . . . . . 221
View.AbscissaRangeType . . . . . . . . . . . . . . . . . . . . . 217 View.ComponentMap4 . . . . . . . . . . . . . . . . . . . . . . . . . 221
View.AdaptVisualizationGrid . . . . . . . . . . . . . . . 217 View.ComponentMap5 . . . . . . . . . . . . . . . . . . . . . . . . . 221
View.AngleSmoothNormals . . . . . . . . . . . . . . . . . . . 217 View.ComponentMap6 . . . . . . . . . . . . . . . . . . . . . . . . . 221
View.ArrowSizeMax . . . . . . . . . . . . . . . . . . . . . . . . . . 217 View.ComponentMap7 . . . . . . . . . . . . . . . . . . . . . . . . . 221
View.ArrowSizeMin . . . . . . . . . . . . . . . . . . . . . . . . . . 218 View.ComponentMap8 . . . . . . . . . . . . . . . . . . . . . . . . . 221
View.Attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 215 View.CustomAbscissaMax . . . . . . . . . . . . . . . . . . . . . 221
View.AutoPosition . . . . . . . . . . . . . . . . . . . . . . . . . . 218 View.CustomAbscissaMin . . . . . . . . . . . . . . . . . . . . . 221
View.Axes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 218 View.CustomMax . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 221
View.AxesAutoPosition . . . . . . . . . . . . . . . . . . . . . . 218 View.CustomMin . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 221
View.AxesFormatX. . . . . . . . . . . . . . . . . . . . . . . . . . . . 215 View.DisplacementFactor . . . . . . . . . . . . . . . . . . . 222
View.AxesFormatY. . . . . . . . . . . . . . . . . . . . . . . . . . . . 215 View.DoubleClickedCommand . . . . . . . . . . . . . . . . . 215
View.AxesFormatZ. . . . . . . . . . . . . . . . . . . . . . . . . . . . 215 View.DrawHexahedra . . . . . . . . . . . . . . . . . . . . . . . . . 222
View.AxesLabelX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 215 View.DrawLines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 222
View.AxesLabelY . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 215 View.DrawPoints . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 222
View.AxesLabelZ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 215 View.DrawPrisms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 222
View.AxesMaxX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 218 View.DrawPyramids . . . . . . . . . . . . . . . . . . . . . . . . . . 222
View.AxesMaxY . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 218 View.DrawQuadrangles . . . . . . . . . . . . . . . . . . . . . . . 222
View.AxesMaxZ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 218 View.DrawScalars. . . . . . . . . . . . . . . . . . . . . . . . . . . . 222
View.AxesMikado . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 218 View.DrawSkinOnly . . . . . . . . . . . . . . . . . . . . . . . . . . 222
View.AxesMinX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 218 View.DrawStrings. . . . . . . . . . . . . . . . . . . . . . . . . . . . 223
View.AxesMinY . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 218 View.DrawTensors. . . . . . . . . . . . . . . . . . . . . . . . . . . . 223
View.AxesMinZ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 219 View.DrawTetrahedra . . . . . . . . . . . . . . . . . . . . . . . . 223
View.AxesTicsX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 219 View.DrawTriangles . . . . . . . . . . . . . . . . . . . . . . . . . 223
View.AxesTicsY . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 219 View.DrawTrihedra . . . . . . . . . . . . . . . . . . . . . . . . . . 222
View.AxesTicsZ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 219 View.DrawVectors. . . . . . . . . . . . . . . . . . . . . . . . . . . . 223
View.Boundary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 219 View.Explode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 223
View.CenterGlyphs . . . . . . . . . . . . . . . . . . . . . . . . . . 219 View.ExternalView . . . . . . . . . . . . . . . . . . . . . . . . . . 223
View.Clip . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 219 View.FakeTransparency . . . . . . . . . . . . . . . . . . . . . . 223
View.Closed . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 219 View.FileName . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 215
View.Color.Axes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 231 View.ForceNumComponents . . . . . . . . . . . . . . . . . . . 223
Syntax index 289

View.Format . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 216 View.ScaleType . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 227


View.GeneralizedRaiseFactor . . . . . . . . . . . . . . . 223 View.ShowElement. . . . . . . . . . . . . . . . . . . . . . . . . . . . 227
View.GeneralizedRaiseView . . . . . . . . . . . . . . . . . 224 View.ShowScale . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 227
View.GeneralizedRaiseX . . . . . . . . . . . . . . . . . . . . . 216 View.ShowTime . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 227
View.GeneralizedRaiseY . . . . . . . . . . . . . . . . . . . . . 216 View.SmoothNormals . . . . . . . . . . . . . . . . . . . . . . . . . 227
View.GeneralizedRaiseZ . . . . . . . . . . . . . . . . . . . . . 216 View.Stipple . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 228
View.GlyphLocation . . . . . . . . . . . . . . . . . . . . . . . . . 224 View.Stipple0 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 216
View.Group . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 216 View.Stipple1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 216
View.Height . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 224 View.Stipple2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 216
View.IntervalsType . . . . . . . . . . . . . . . . . . . . . . . . . 224 View.Stipple3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 216
View.Light . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 224 View.Stipple4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 217
View.LightLines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 224 View.Stipple5 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 217
View.LightTwoSide . . . . . . . . . . . . . . . . . . . . . . . . . . 224 View.Stipple6 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 217
View.LineType . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 224 View.Stipple7 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 217
View.LineWidth . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 224 View.Stipple8 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 217
View.Max . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 224 View.Stipple9 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 217
View.MaxRecursionLevel . . . . . . . . . . . . . . . . . . . . . 224 View.Tangents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 228
View.MaxVisible . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 225 View.TargetError. . . . . . . . . . . . . . . . . . . . . . . . . . . . 228
View.MaxX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 225 View.TensorType . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 228
View.MaxY . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 225 View.Time . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 228
View.MaxZ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 225 View.TimeStep . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 228
View.Min . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 225 View.TransformXX. . . . . . . . . . . . . . . . . . . . . . . . . . . . 228
View.MinVisible . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 225 View.TransformXY. . . . . . . . . . . . . . . . . . . . . . . . . . . . 228
View.MinX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 225 View.TransformXZ. . . . . . . . . . . . . . . . . . . . . . . . . . . . 228
View.MinY . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 225 View.TransformYX. . . . . . . . . . . . . . . . . . . . . . . . . . . . 228
View.MinZ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 225 View.TransformYY. . . . . . . . . . . . . . . . . . . . . . . . . . . . 229
View.Name . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 216 View.TransformYZ. . . . . . . . . . . . . . . . . . . . . . . . . . . . 229
View.NbIso . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 225 View.TransformZX. . . . . . . . . . . . . . . . . . . . . . . . . . . . 229
View.NbTimeStep . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 225 View.TransformZY. . . . . . . . . . . . . . . . . . . . . . . . . . . . 229
View.NormalRaise. . . . . . . . . . . . . . . . . . . . . . . . . . . . 226 View.TransformZZ. . . . . . . . . . . . . . . . . . . . . . . . . . . . 229
View.Normals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 226 View.Type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 229
View.OffsetX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 226 View.UseGeneralizedRaise . . . . . . . . . . . . . . . . . . 229
View.OffsetY . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 226 View.VectorType . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 229
View.OffsetZ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 226 View.Visible . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 229
View.PointSize . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 226 View.Width . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 229
View.PointType . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 226 Volume ( expression ) = { expression-list };
View.PositionX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 226 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
View.PositionY . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 226
View.RaiseX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 226
View.RaiseY . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 227 W
View.RaiseZ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 227 Wedge ( expression ) = { expression-list };
View.RangeType . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 227 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
View.Sampling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 227 Wire ( expression ) = { expression-list };
View.SaturateValues . . . . . . . . . . . . . . . . . . . . . . . . 227 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37

Potrebbero piacerti anche