GMSH
GMSH
GMSH
Copyright c 1997-2006 Christophe Geuzaine, Jean-Fran cois 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.
Short Contents
Copying conditions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 2 General tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 3 Geometry module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 4 Mesh module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49 5 Solver module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65 6 Post-processing module . . . . . . . . . . . . . . . . . . . . . . . . . . 83 7 Tutorial . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113 8 Running Gmsh . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 137 9 File formats . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 145 10 Programming notes . . . . . . . . . . . . . . . . . . . . . . . . . . . . 159 11 Bugs, versions and credits . . . . . . . . . . . . . . . . . . . . . . . . 161 A Tips and tricks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 175 B Frequently asked questions . . . . . . . . . . . . . . . . . . . . . . . 177 C License . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 189 Concept index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 195 Syntax index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 199
ii
Gmsh 1.63
iii
Table of Contents
Copying conditions . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.1 1.2 1.3 1.4 1.5 1.6 1.7 1.8 Geometry: geometrical entity denition . . . . . . . . . . . . . . . . . . . . . Mesh: nite element mesh generation . . . . . . . . . . . . . . . . . . . . . . . Solver: external solver interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Post-processing: scalar, vector and tensor eld visualization . . What Gmsh is pretty good at . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . and what Gmsh is not so good at . . . . . . . . . . . . . . . . . . . . . . . Syntactic rules used in this document . . . . . . . . . . . . . . . . . . . . . . . Comments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 3 4 4 4 6 6 6
General tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
2.1 Expressions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 2.1.1 Floating point expressions . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 2.1.2 Character expressions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 2.1.3 Color expressions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 Operators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 Built-in functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 User-dened functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 Loops and conditionals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 General commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 General options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
Geometry module . . . . . . . . . . . . . . . . . . . . . . . . 39
3.1 Geometry commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.1.1 Points . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.1.2 Lines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.1.3 Surfaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.1.4 Volumes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.1.5 Extrusions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.1.6 Transformations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.1.7 Miscellaneous . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Geometry options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 39 40 41 42 42 43 43 44
3.2
Mesh module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
4.1 4.2 Elementary vs. physical entities . . . . . . . . . . . . . . . . . . . . . . . . . . . Mesh commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.2.1 Characteristic lengths . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.2.2 Structured grids . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.2.3 Miscellaneous . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Mesh options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49 49 49 51 52 53
4.3
iv
Gmsh 1.63
Solver module . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
5.1 5.2 Solver options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65 Solver example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79
Post-processing module . . . . . . . . . . . . . . . . . . . 83
6.1 6.2 6.3 Post-processing commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83 Post-processing plugins . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85 Post-processing options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96
Tutorial . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113
7.1 7.2 7.3 7.4 7.5 7.6 7.7 7.8 7.9 t1.geo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . t2.geo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . t3.geo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . t4.geo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . t5.geo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . t6.geo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . t7.geo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . t8.geo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . t9.geo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113 115 117 119 122 125 131 132 135
9.2
9.3
10
11
Appendix A Tips and tricks . . . . . . . . . . . . . . . . 175 Appendix B Frequently asked questions . . . . . 177 Appendix C License . . . . . . . . . . . . . . . . . . . . . . . . 189 Concept index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 195 Syntax index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 199
vi
Gmsh 1.63
Copying conditions
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. Specically, 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 nds out that there is no warranty for Gmsh. If Gmsh is modied 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 reect 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 C [License], page 189). 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 Section 11.3 [Credits], page 171. The source code and various pre-compiled versions of Gmsh (for Unix, Windows and Mac OS) can be downloaded from the webpage http://geuz.org/gmsh/. If you use Gmsh, we would appreciate that you mention it in your work. References, as well as the latest news about Gmsh development, are always available on http://geuz.org/gmsh/. Please send all Gmsh-related questions to the public Gmsh mailing list at [email protected].
If you want to integrate Gmsh into a closed-source software, or want to sell a modied closed-source version of Gmsh, please contact one of the authors. You can purchase a version of Gmsh under a dierent license, with no strings attached (for example allowing you to take parts of Gmsh and integrate them into your own proprietary code).
Gmsh 1.63
Chapter 1: Overview
1 Overview
Gmsh is an automatic three-dimensional nite element mesh generator, primarily Delaunay, with built-in pre- and post-processing facilities. Its design goal is to provide a simple meshing tool for academic problems with parametric input and advanced visualization capabilities. Gmsh is built around four modules: geometry, mesh, solver and post-processing. All geometrical, mesh, solver and post-processing instructions are prescribed either interactively using the graphical user interface (GUI) or in ASCII data les using Gmshs own scripting language. Interactive actions generate language bits in the input les, 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.
For example, in three dimensions: the triangles discretizing a surface will be forced to be faces of tetrahedra in the nal 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 nal 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 nal 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...
Gmsh 1.63
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. Every meshing step is constrained by the characteristic length eld, which can be uniform, specied by characteristic lengths associated with elementary geometrical entities, or associated with another mesh (the background mesh). For each meshing step, all structured mesh directives are executed rst, and serve as additional constraints for the unstructured parts. The implemented Delaunay algorithm is subdivided in the following ve steps for surface/volume discretization: 1. trivial meshing of a box including the convex polygon/polyhedron dened by the boundary nodes resulting from the discretization of the lines/surfaces; 2. creation of the initial mesh by insertion of all the nodes on the lines/surfaces thanks to the Bowyer algorithm; 3. boundary restoration to force all the edges/faces of the lines/surfaces to be present in the initial mesh; 4. suppression of all the unwanted triangles/tetrahedra (in particular those containing the nodes of the initial box); 5. insertion of new nodes by the Bowyer algorithm until the characteristic size of each simplex is lower or equal to the characteristic length eld evaluated at the center of its circumscribed circle/sphere.
Chapter 1: Overview
Gmsh 1.63
1.8 Comments
All Gmsh ASCII text input les 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.
Chapter 1: Overview
These commands wont have the described eects inside double quotes or inside keywords. Also note that white space (spaces, tabs, new line characters) is ignored inside all expressions.
Gmsh 1.63
2 General tools
This chapter describes the general commands and options that can be used in Gmshs ASCII text input les. By general, we mean not specically related to one of the geometry, mesh, solver or post-processing modules. Commands peculiar to these modules will be introduced in Chapter 3 [Geometry module], page 39, Chapter 4 [Mesh module], page 49, Chapter 5 [Solver module], page 65, and Chapter 6 [Post-processing module], page 83, respectively. Note that, if you are just beginning to use Gmsh, or just want to see what Gmsh is all about, you really dont need to read this chapter and the four next ones. Just have a quick look at Chapter 8 [Running Gmsh], page 137, and go play with the graphical user interface, running the tutorials and demonstration les bundled in the distribution! Most of the commands and options described in the following chapters are available interactively in the GUI, so you dont need to worry about Gmshs internals for creating your rst geometries, meshes and post-processing plots. Once you master the tutorial (read the source les: they are heavily commentedsee Chapter 7 [Tutorial], page 113), you might want to come back here to learn more about the specic syntax of Gmshs commands and esoteric options.
2.1 Expressions
The two constant types used in Gmsh 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.
10
Gmsh 1.63
the denition of built-in-functions, see Section 2.3 [Built-in functions], page 13. The various real-options are listed in Section 2.7 [General options], page 18, Section 3.2 [Geometry options], page 44, Section 4.3 [Mesh options], page 53, Section 5.1 [Solver options], page 65, and Section 6.3 [Post-processing options], page 96. The last case in the denition allows to ask the user for a value interactively. For example, inserting GetValue("Value of parameter alpha?", 5.76) in an input le 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 2.7 [General options], page 18), no question is asked and the default value is automatically used. List of expressions are also widely used, and are dened as: expression-list: expression-list-item <, expression-list-item> ... with expression-list-item: expression | expression : expression | expression : expression : expression | string [ ] | string [ { expression-list } ] | Point { expression } | transform | extrude The second case in this last denition 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 case permits to reference an expression list. The fth case permits to reference an expression sublist (whose elements are those corresponding to the indices provided by the expression-list). The sixth case permits to retrieve the coordinates of a given geometry point (see Section 3.1.1 [Points], page 39). The last two cases permit to retrieve the indices of entities created through geometrical transformations and extrusions (see Section 3.1.6 [Transformations], page 43, and Section 3.1.5 [Extrusions], page 42). To see the practical use of such expressions, have a look at the rst couple of examples in Chapter 7 [Tutorial], page 113. Note that, in order to lighten the syntax, you can always 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.
11
StrRelative ( char-expression ) | StrCat ( char-expression , char-expression ) | Sprintf ( char-expression , expression-list ) | Sprintf ( char-expression ) Sprintf ( char-option ) The third and fourth cases in this denition permit to take the prex (e.g. to remove the extension) or the relative path of a string. The fth case permits to concatenate two character expressions, and the sixth and seventh are equivalent to the sprintf C function (where char-expression is a format string that can contain oating point formatting characters: %e, %g, etc.). The last case permits to use the value of a char-option as a char-expression. The various char-options are listed in Section 2.7 [General options], page 18, Section 3.2 [Geometry options], page 44, Section 4.3 [Mesh options], page 53, Section 5.1 [Solver options], page 65, and Section 6.3 [Post-processing options], page 96. Character expressions are mostly used to specify non-numeric options and input/output le names. See Section 7.8 [t8.geo], page 132, for an interesting usage of char-expressions in an animation script.
2.2 Operators
Gmshs operators are similar to the corresponding operators in C and C++. Here is the list of the unary, binary and ternary operators currently implemented. operator-unary-left: ! Unary minus. Logical not.
operator-unary-right:
12
Gmsh 1.63
++ --
Post-incrementation. Post-decrementation.
operator-binary: ^ * / % + == != > >= < <= && || Exponentiation. Multiplication. Division. Modulo. 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 rst one is true).
operator-ternary-left: ? operator-ternary-right: : The only ternary operator, formed by operator-ternary-left and operatorternary-right, returns the value of its second argument if the rst 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. <, >, <=, >=
1
The aectation operators are introduced in Section 2.6 [General commands], page 15.
13
7. 8. 9. 10. 11.
For compatibility with GetDP (http://www.geuz.org/getdp/), parentheses can be replaced by brackets [].
14
Gmsh 1.63
Log ( expression ) Natural logarithm of expression (expression > 0). Log10 ( expression ) Base 10 logarithm of expression (expression > 0). Modulo ( expression, expression ) see Fmod( expression, expression ). Rand ( expression ) Random number between zero and expression. 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.
Call string; Executes the body of a (previously dened) function named string. See Section 7.5 [t5.geo], page 122, for an example of a user-dened function.
15
For ( expression : expression : expression ) Iterates from the value of the rst expression to the value of the second expression, with a positive or negative incrementation step equal to the third expression. At each iteration, the commands comprised between For ( expression : expression : expression ) and the matching EndFor are executed. For string In { expression : expression } Iterates from the value of the rst expression to the value of the second expression, with a unit incrementation step. At each iteration, the value of the iterate is aected 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 rst expression to the value of the second expression, with a positive or negative incrementation step equal to the third expression. At each iteration, the value of the iterate is aected to an expression 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 Endif is evaluated if expression is non-zero. EndIf Ends a matching If command.
See Section 7.5 [t5.geo], page 122, for an example of For and If commands. Gmsh does not provide any Else (or similar) command at the time of this writing.
GMSH_MAJOR_VERSION Returns Gmshs major version number. GMSH_MINOR_VERSION Returns Gmshs minor version number. GMSH_PATCH_VERSION Returns Gmshs patch version number. MPI_Size Returns the number of processors on which Gmsh is running (always 1, except if you compiled Gmshs parallel extensions).
16
Gmsh 1.63
MPI_Rank newp
Returns the rank of the current processor. Returns the next available point number. As explained in Chapter 3 [Geometry module], page 39, 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-dened functions (see Section 2.4 [User-dened functions], page 14) or general geometric primitives, when one does not know a priori which numbers are already attributed, and which ones are still available. Returns the next available line number. Returns the next available surface number. Returns the next available volume number. Returns the next available region number. That is, newreg returns the maximum of newp, newl, news, newv and all physical entity numbers3 .
string [ ] = { expression-list }; Denes a new expression list identier string[], or aects expression-list to an existing expression list identier. string [ { expression-list } ] = { expression-list }; Aects 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 identier. The two expression-lists must contain the same number of items. Remember the remark made when dening expression-lists: the braces enclosing an expressionlist are optional if the list only contains a single item. real-option = expression; Aects expression to a real option. char-option = char-expression; Aects char-expression to a character option. color-option = color-expression; Aects color-expression to a color option. string | real-option += expression; Adds and aects expression to an existing expression identier or to a real option. string | real-option -= expression; Subtracts and aects expression to an existing expression identier or to a real option. string | real-option *= expression; Multiplies and aects expression to an existing expression identier or to a real option.
3
For compatibility purposes, the behavior of newl, news, newv and newreg can be modied with the Geometry.OldNewReg option (see Section 3.2 [Geometry options], page 44).
17
string | real-option /= expression; Divides and aects expression to an existing expression identier or to a real option. string [ { expression-list } ] += { expression-list }; Adds and aects, item per item, the right hand side expression-list to an existing expression list identier. string [ { expression-list } ] -= { expression-list }; Subtracts and aects, item per item, the right hand side expression-list to an existing expression list identier. string [ { expression-list } ] *= { expression-list }; Multiplies and aects, item per item, the right hand side expression-list to an existing expression list identier. string [ { expression-list } ] /= { expression-list }; Divides and aects, item per item, the right hand side expression-list to an existing expression list identier. Exit; Aborts the current script.
Printf ( char-expression , expression-list ); Prints a character expression in the information window and/or on the terminal. 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 oating point values in Gmsh (see Section 2.1 [Expressions], page 9), so that only valid oating point formatting characters make sense in char-expression. See Section 7.5 [t5.geo], page 122, for an example of the use of Printf. Merge char-expression; Merges a le named char-expression. This command is equivalent to the File>Merge menu in the graphical user interface. If the path in char-expression is not absolute, char-expression is appended to the path of the current le. Draw; Redraws the scene.
BoundingBox; Recomputes the bounding box of the scene (which is normally computed only after new geometrical entities are added or after les 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.
18
Gmsh 1.63
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 All; Deletes all geometrical entities and all currently loaded meshes. Delete Physicals; Deletes all physical groups. Print char-expression; Prints the graphic window in a le named char-expression, using the current Print.Format (see Section 2.7 [General options], page 18). If the path in char-expression is not absolute, char-expression is appended to the path of the current le. Sleep expression; Suspends the execution of Gmsh during expression seconds. System char-expression; Executes a system call. Include char-expression; Includes the le named char-expression at the current position in the input le. 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 le.
19
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 General.DefaultFileName Default project le 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.FileName Current project le name (read-only) Default value: "" Saved in: General.GraphicsFont Font used in the graphic window Default value: "Helvetica" Saved in: General.OptionsFileName General.OptionsFileName Option le created with Tools->Options->Save; automatically read on startup Default value: ".gmsh-options" Saved in: General.SessionFileName General.SessionFileName Option le into which session specic information is saved; automatically read on startup
20
Gmsh 1.63
Default value: ".gmshrc" Saved in: General.Scheme FLTK user interface scheme (try e.g. plastic) Default value: "" Saved in: General.OptionsFileName General.TextEditor System command to launch a text editor Default value: "open -e %s" Saved in: General.OptionsFileName General.TmpFileName Temporary le used by the geometry module Default value: ".gmsh-tmp" Saved in: General.SessionFileName General.WebBrowser System command to launch a web browser Default value: "open %s" Saved in: General.OptionsFileName General.AlphaBlending Enable alpha blending (transparency) in post-processing views Default value: 1 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 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.AxesAutoPosition Position the axes automatically Default value: 1 Saved in: General.OptionsFileName
21
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 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.BackgroundGradient Draw background gradient (0=none, 1=vertical, 2=horizontal, 3=radial) Default value: 1 Saved in: General.OptionsFileName
22
Gmsh 1.63
General.Clip0 Enable clipping plane 0 (Geometry=2^0, Mesh=2^1, View[i]=2^(2+i)) Default value: 0 Saved in: General.Clip0A First coecient in equation for clipping plane 0 (A in AX+BY+CZ+D=0) Default value: 1 Saved in: General.Clip0B Second coecient in equation for clipping plane 0 (B in AX+BY+CZ+D=0) Default value: 0 Saved in: General.Clip0C Third coecient in equation for clipping plane 0 (C in AX+BY+CZ+D=0) Default value: 0 Saved in: General.Clip0D Fourth coecient in equation for clipping plane 0 (D in AX+BY+CZ+D=0) Default value: 0 Saved in: General.Clip1 Enable clipping plane 1 (Geometry=2^0, Mesh=2^1, View[i]=2^(2+i)) Default value: 0 Saved in: General.Clip1A First coecient in equation for clipping plane 1 Default value: 1 Saved in: General.Clip1B Second coecient in equation for clipping plane 1 Default value: 0 Saved in: General.Clip1C Third coecient in equation for clipping plane 1 Default value: 0 Saved in: General.Clip1D Fourth coecient in equation for clipping plane 1 Default value: 0 Saved in: -
23
General.Clip2 Enable clipping plane 2 (Geometry=2^0, Mesh=2^1, View[i]=2^(2+i)) Default value: 0 Saved in: General.Clip2A First coecient in equation for clipping plane 2 Default value: 1 Saved in: General.Clip2B Second coecient in equation for clipping plane 2 Default value: 0 Saved in: General.Clip2C Third coecient in equation for clipping plane 2 Default value: 0 Saved in: General.Clip2D Fourth coecient in equation for clipping plane 2 Default value: 0 Saved in: General.Clip3 Enable clipping plane 3 (Geometry=2^0, Mesh=2^1, View[i]=2^(2+i)) Default value: 0 Saved in: General.Clip3A First coecient in equation for clipping plane 3 Default value: 1 Saved in: General.Clip3B Second coecient in equation for clipping plane 3 Default value: 0 Saved in: General.Clip3C Third coecient in equation for clipping plane 3 Default value: 0 Saved in: General.Clip3D Fourth coecient in equation for clipping plane 3 Default value: 0 Saved in: -
24
Gmsh 1.63
General.Clip4 Enable clipping plane 4 (Geometry=2^0, Mesh=2^1, View[i]=2^(2+i)) Default value: 0 Saved in: General.Clip4A First coecient in equation for clipping plane 4 Default value: 1 Saved in: General.Clip4B Second coecient in equation for clipping plane 4 Default value: 0 Saved in: General.Clip4C Third coecient in equation for clipping plane 4 Default value: 0 Saved in: General.Clip4D Fourth coecient in equation for clipping plane 4 Default value: 0 Saved in: General.Clip5 Enable clipping plane 5 (Geometry=2^0, Mesh=2^1, View[i]=2^(2+i)) Default value: 0 Saved in: General.Clip5A First coecient in equation for clipping plane 5 Default value: 1 Saved in: General.Clip5B Second coecient in equation for clipping plane 5 Default value: 0 Saved in: General.Clip5C Third coecient in equation for clipping plane 5 Default value: 0 Saved in: General.Clip5D Fourth coecient in equation for clipping plane 5 Default value: 0 Saved in: General.ClipFactor Near and far clipping plane distance factor (decrease value for better z-buer resolution)
25
Default value: 5 Saved in: 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 window Default value: 150 Saved in: General.SessionFileName General.ColorScheme Default color scheme (0, 1 or 2) Default value: 0 Saved in: General.OptionsFileName General.ConfirmOverwrite Ask conrmation before overwriting les? 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.DoubleBuffer Use a double buered 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.FastRedraw Draw simplied model while rotating, panning and zooming Default value: 0 Saved in: General.OptionsFileName
26
Gmsh 1.63
General.FileChooserPositionX Horizontal position (in pixels) of the upper left corner of the le chooser windows Default value: 200 Saved in: General.SessionFileName General.FileChooserPositionY Vertical position (in pixels) of the upper left corner of the le chooser windows Default value: 200 Saved in: General.SessionFileName General.FontSize Size of the font in the user interface Default value: 12 Saved in: General.OptionsFileName General.GraphicsFontSize Size of the font in the graphic window Default value: 14 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: 600 Saved in: General.SessionFileName 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
27
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 innitely far source) Default value: 0 Saved in: General.OptionsFileName General.Light1 Enable light source 1 Default value: 0 Saved in: General.OptionsFileName 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 innitely far source) Default value: 0 Saved in: General.OptionsFileName General.Light2 Enable light source 2 Default value: 0 Saved in: General.OptionsFileName
28
Gmsh 1.63
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 innitely far source) Default value: 0 Saved in: General.OptionsFileName General.Light3 Enable light source 3 Default value: 0 Saved in: General.OptionsFileName 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 innitely far source) Default value: 0 Saved in: General.OptionsFileName General.Light4 Enable light source 4 Default value: 0 Saved in: General.OptionsFileName
29
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 innitely far source) Default value: 0 Saved in: General.OptionsFileName General.Light5 Enable light source 5 Default value: 0 Saved in: General.OptionsFileName 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 innitely far source) Default value: 0 Saved in: General.OptionsFileName General.LineWidth Display width of lines (in pixels) Default value: 1 Saved in: General.OptionsFileName
30
Gmsh 1.63
General.ManipulatorPositionX Horizontal position (in pixels) of the upper left corner of the manipulator window 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.MenuPositionX Horizontal position (in pixels) of the upper left corner of the menu window Default value: 800 Saved in: General.SessionFileName General.MenuPositionY Vertical position (in pixels) of the upper left corner of the menu window Default value: 50 Saved in: General.SessionFileName General.MessagePositionX Horizontal position (in pixels) of the upper left corner of the message window Default value: 650 Saved in: General.SessionFileName General.MessagePositionY Vertical position (in pixels) of the upper left corner of the message window Default value: 150 Saved in: General.SessionFileName General.MessageHeight Height (in pixels) of the message window Default value: 350 Saved in: General.SessionFileName General.MessageWidth Width (in pixels) of the message window Default value: 450 Saved in: General.SessionFileName General.NoPopup Disable interactive dialog windows in scripts (and use default values instead) Default value: 0 Saved in: General.OptionsFileName General.OptionsPositionX Horizontal position (in pixels) of the upper left corner of the option window Default value: 650 Saved in: General.SessionFileName
31
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.PointSize Display size of points (in pixels) Default value: 3 Saved in: General.OptionsFileName General.PolygonOffsetAlwaysOn Always apply polygon oset, instead of trying to detect when it is required Default value: 0 Saved in: General.OptionsFileName General.PolygonOffsetFactor Polygon oset factor (oset = factor * DZ + r * units) Default value: 1 Saved in: General.OptionsFileName General.PolygonOffsetUnits Polygon oset units (oset = factor * DZ + r * units) Default value: 1 Saved in: General.OptionsFileName General.QuadricSubdivisions Number of subdivisions used to draw points or lines as spheres or cylinders Default value: 8 Saved in: General.OptionsFileName General.RotationX First Euler angle (used if Trackball=0) Default value: 0 Saved in: General.RotationY Second Euler angle (used if Trackball=0) Default value: 0 Saved in: General.RotationZ Third Euler angle (used if Trackball=0) Default value: 0 Saved in: General.RotationCenterGravity Rotate around the (pseudo) center of mass instead of (RotationCenterX, RotationCenterY, RotationCenterZ)
32
Gmsh 1.63
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 each time you quit Gmsh? Default value: 0 Saved in: General.SessionFileName General.SaveSession Automatically save session specic information in General.SessionFileName each time you quit Gmsh? Default value: 1 Saved in: General.SessionFileName General.ScaleX X-axis scale factor Default value: 1 Saved in: General.ScaleY Y-axis scale factor Default value: 1 Saved in: General.ScaleZ Z-axis scale factor Default value: 1 Saved in: General.Shininess Material shininess Default value: 0.4 Saved in: General.OptionsFileName
33
General.ShininessExponent Material shininess exponent (between 0 and 128) Default value: 40 Saved in: General.OptionsFileName General.SmallAxes Display the small axes Default value: 1 Saved in: General.OptionsFileName General.SmallAxesPositionX X position of small axes (use negative values for right alignment) Default value: -60 Saved in: General.OptionsFileName General.SmallAxesPositionY Y position of small axes (use negative values for bottom alignment) Default value: -40 Saved in: General.OptionsFileName General.SmallAxesSize Size (in pixels) of small axes Default value: 30 Saved in: General.OptionsFileName General.SolverPositionX Horizontal position (in pixels) of the upper left corner of the solver windows Default value: 650 Saved in: General.SessionFileName General.SolverPositionY Vertical position (in pixels) of the upper left corner of the solver windows Default value: 150 Saved in: General.SessionFileName General.StatisticsPositionX Horizontal position (in pixels) of the upper left corner of the statistic window Default value: 650 Saved in: General.SessionFileName General.StatisticsPositionY Vertical position (in pixels) of the upper left corner of the statistic window Default value: 150 Saved in: General.SessionFileName General.SystemMenuBar Use the system menu bar on Mac OS X? Default value: 1 Saved in: General.SessionFileName
34
Gmsh 1.63
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.TrackballQuaternion0 First trackball quaternion component (used if General.Trackball=1) Default value: 0 Saved in: General.TrackballQuaternion1 Second trackball quaternion component (used if General.Trackball=1) Default value: 0 Saved in: General.TrackballQuaternion2 Third trackball quaternion component (used if General.Trackball=1) Default value: 0 Saved in: General.TrackballQuaternion3 Fourth trackball quaternion component (used if General.Trackball=1) Default value: 1 Saved in: General.TranslationX X-axis translation (in model units) Default value: 0 Saved in: 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: -
35
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: 3 Saved in: General.OptionsFileName General.VisibilityMode Default mode for the visibility browser (0=Geometry+Mesh, 1=Geometry, 2=Mesh) Default value: 0 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: {0,0,0} Saved in: General.OptionsFileName General.Color.BackgroundGradient Background gradient color Default value: {0,0,125} Saved in: General.OptionsFileName General.Color.Foreground Foreground color Default value: {255,255,255} Saved in: General.OptionsFileName General.Color.Text Text color Default value: {255,255,255} Saved in: General.OptionsFileName
36
Gmsh 1.63
General.Color.Axes Axes color Default value: {255,255,255} Saved in: General.OptionsFileName General.Color.SmallAxes Small axes color Default value: {255,255,255} Saved in: General.OptionsFileName General.Color.AmbientLight Ambient light color Default value: {25,25,25} Saved in: General.OptionsFileName General.Color.DiffuseLight Diuse 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.EpsBackground Save image background in PostScript/PDF output Default value: 1 Saved in: General.OptionsFileName Print.EpsBestRoot Try to minimize primitive splitting in BSP tree sorted PostScript/PDF output Default value: 1 Saved in: General.OptionsFileName Print.EpsCompress Compress PostScript/PDF output using zlib Default value: 0 Saved in: General.OptionsFileName Print.EpsLineWidthFactor Width factor for lines in PostScript/PDF output Default value: 0.5 Saved in: General.OptionsFileName Print.EpsOcclusionCulling Cull occluded primitives (to reduce PostScript/PDF le size) Default value: 1 Saved in: General.OptionsFileName
37
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) Default value: 1 Saved in: General.OptionsFileName Print.Format File format (10=automatic) Default value: 10 Saved in: General.OptionsFileName Print.GifDither Apply dithering to GIF output Default value: 0 Saved in: General.OptionsFileName Print.GifInterlace Interlace GIF output Default value: 0 Saved in: General.OptionsFileName Print.GifSort Sort the colormap in GIF output Default value: 1 Saved in: General.OptionsFileName Print.GifTransparent Output transparent GIF image Default value: 0 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
38
Gmsh 1.63
39
3 Geometry module
Gmshs geometry module provides a simple CAD engine, using a bottom-up (boundary representation) approach: you need to rst dene 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 Ruled Surface commands, or by extruding lines), and nally volumes (using the Volume command or by extruding surfaces). These geometrical entities are called elementary in Gmshs jargon, and are assigned identication numbers when they are created: 1. each elementary point must possess a unique identication number; 2. each elementary line must possess a unique identication number; 3. each elementary surface must possess a unique identication number; 4. each elementary volume must possess a unique identication number. Elementary geometrical entities can then be manipulated in various ways, for example using the Translate, Rotate, Scale or Symmetry commands. Compound groups of elementary geometrical entities can also be dened and are called physical entities. These physical entities cannot be modied by geometry commands: their only purpose is to assemble elementary entities into larger groups, possibly modifying their orientation, so that they can be referred to by the mesh module as single entities. As is the case with elementary entities, each physical point, physical line, physical surface or physical volume must be assigned a unique identication number. See Chapter 4 [Mesh module], page 49, for more information about how physical entities aect the way meshes are saved.
3.1.1 Points
Point ( expression ) = { expression, expression, expression, expression }; Creates an elementary point. The expression inside the parentheses is the points identication number; the three rst 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 last expression sets the characteristic mesh length at that point. See Section 4.2.1 [Characteristic lengths], page 50, for more information about how this characteristic length information is used in the meshing process. Physical Point ( expression ) = { expression-list }; Creates a physical point. The expression inside the parentheses is the physical points identication number; the expression-list on the right hand side should
40
Gmsh 1.63
contain the identication numbers of all the elementary points that need to be grouped inside the physical point.
3.1.2 Lines
Bezier ( expression ) = { expression-list }; Creates a Bezier curve. The expression inside the parentheses is the Bezier curves identication number; the expression-list on the right hand side should contain the identication numbers of all the curves control points. BSpline ( expression ) = { expression-list }; Creates a B-spline curve. The expression inside the parentheses is the B-spline curves identication number; the expression-list on the right hand side should contain the identication numbers of all the B-splines control points. Repeating control points has the expected eect. Circle ( expression ) = { expression, expression, expression }; Creates a circle arc (strictly) smaller than Pi. The expression inside the parentheses is the circle arcs identication number; the rst expression inside the braces on the right hand side gives the identication number of the start point of the arc; the second expression gives the identication number of the center of the circle; the last expression gives the identication number of the end point of the arc. CatmullRom ( expression ) = { expression-list }; CatmullRom is a synonym for Spline. Ellipse ( expression ) = { expression, expression, expression, expression }; Creates an ellipse arc. The expression inside the parentheses is the ellipse arcs identication number; the rst expression inside the braces on the right hand side gives the identication number of the start point of the arc; the second expression gives the identication number of the center of the ellipse; the third expression gives the identication number of any point located on the major axis of the ellipse; the last expression gives the identication number of the end point of the arc. (A deprecated synonym for Ellipse is Ellipsis.) Line ( expression ) = { expression, expression }; Creates a straight line segment. The expression inside the parentheses is the line segments identication number; the two expressions inside the braces on the right hand side give identication numbers of the start and end points of the segment. Spline ( expression ) = { expression-list }; Creates a spline curve. The expression inside the parentheses is the splines identication number; the expression-list on the right hand side should contain the identication numbers of all the splines control points. Line Loop ( expression ) = { expression-list }; Creates an oriented line loop. The expression inside the parentheses is the line loops identication number; the expression-list on the right hand side should
41
contain the identication 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 identication 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 3.1.3 [Surfaces], page 41.) Physical Line ( expression ) = { expression-list }; Creates a physical line. The expression inside the parentheses is the physical lines identication number; the expression-list on the right hand side should contain the identication numbers of all the elementary lines that need to be grouped inside the physical line. Specifying negative identication numbers in the expression-list will reverse the orientation of the mesh elements belonging to the corresponding elementary lines in the saved mesh.
3.1.3 Surfaces
Plane Surface ( expression ) = { expression-list }; Creates a plane surface. The expression inside the parentheses is the plane surfaces identication number; the expression-list on the right hand side should contain the identication numbers of all the line loops dening the surface. The rst line loop denes the exterior boundary of the surface; all other line loops dene holes in the surface. A line loop dening 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 dened separately). Likewise, a line loop dening a hole should not have any lines in common with another line loop dening a hole in the same surface (in which case the two line loops should be combined). Ruled Surface ( expression ) = { expression-list }; Creates a ruled surface, i.e., a surface that can be interpolated using transnite interpolation. The expression inside the parentheses is the ruled surfaces identication number; the expression-list on the right hand side should the identication number of a single line loop, composed of either three or four elementary lines. Surface Loop ( expression ) = { expression-list }; Creates a surface loop (a shell). The expression inside the parentheses is the surface loops identication number; the expression-list on the right hand side should contain the identication 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 identication numbers to specify reverse orientation). (Surface loops are used to create volumes: see Section 3.1.4 [Volumes], page 42.) Physical Surface ( expression ) = { expression-list }; Creates a physical surface. The expression inside the parentheses is the physical surfaces identication number; the expression-list on the right hand side should
42
Gmsh 1.63
contain the identication numbers of all the elementary surfaces that need to be grouped inside the physical surface. Specifying negative identication numbers in the expression-list will reverse the orientation of the mesh elements belonging to the corresponding elementary surfaces in the saved mesh.
3.1.4 Volumes
Volume ( expression ) = { expression-list }; Creates a volume. The expression inside the parentheses is the volumes identication number; the expression-list on the right hand side should contain the identication numbers of all the surface loops dening the volume. The rst surface loop denes the exterior boundary of the volume; all other surface loops dene holes in the volume. A surface loop dening 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 dened separately). Likewise, a surface loop dening a hole should not have any surfaces in common with another surface loop dening a hole in the same volume (in which case the two surface loops should be combined). (A deprecated synonym for Volume is Complex Volume.) Physical Volume ( expression ) = { expression-list }; Creates a physical volume. The expression inside the parentheses is the physical volumes identication number; the expression-list on the right hand side should contain the identication numbers of all the elementary volumes that need to be grouped inside the physical volume.
3.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 4.2.2 [Structured grids], page 51, 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 rst 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).
43
Extrude { { expression-list }, { expression-list }, { expression-list }, expression } { extrude-list } Extrudes all elementary entities (points, lines or surfaces) in extrude-list using a translation combined with a rotation. The rst expression-list should contain three expressions giving the X, Y and Z components of the translation vector; the second expression-list should contain three expressions giving the X, Y and Z direction of the rotation axis; 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). with extrude-list: Point | Line | Surface { expression-list }; ...
3.1.6 Transformations
Geometrical transformations can be applied to elementary entities, or to copies of elementary 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 (points, lines or surfaces) in transform-list by a factor expression. The expression-list should contain three expressions giving the X, Y and Z direction of the homothetic transformation. Rotate { { expression-list }, { expression-list }, expression } { transform-list } Rotates all elementary entities (points, lines or surfaces) in transform-list by an angle of expression radians. The rst 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 (points, lines or surfaces) symmetrically to a plane. The expression-list should contain four expressions giving the coecients of the planes equation. Translate { expression-list } { transform-list } Translates all elementary entities (points, lines or surfaces) in transform-list. The expression-list should contain three expressions giving the X, Y and Z components of the translation vector. with transform-list: Point | Line | Surface { expression-list }; ... | Duplicata { Point | Line | Surface { expression-list }; ... } | transform
44
Gmsh 1.63
3.1.7 Miscellaneous
Here is a list of all other geometry commands currently available: Coherence; Removes all duplicate elementary geometrical entities (e.g., points having identical coordinates). Note that Gmsh executes the Coherence command automatically after each geometrical transformation, unless Geometry.AutoCoherence is set to zero (see Section 3.2 [Geometry options], page 44). Delete { Point | Line | Surface | Volume { expression-list }; ... } Deletes all elementary entities (points, lines, surfaces or volumes) whose identication numbers are given in expression-list. 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 "*"). 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 "*").
45
Geometry.ExtrudeSplinePoints Number of control points for splines created during extrusion Default value: 5 Saved in: General.OptionsFileName Geometry.Light Enable lighting for the geometry Default value: 1 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) or 3D cylinders (1) Default value: 0 Saved in: General.OptionsFileName Geometry.LineWidth Display width of lines (in pixels) Default value: 2 Saved in: General.OptionsFileName Geometry.Normals Display size of normal vectors (in pixels) Default value: 0 Saved in: General.OptionsFileName Geometry.OldCircle Use old circle description (compatibility option for old Gmsh geometries) Default value: 0 Saved in: General.OptionsFileName Geometry.OldNewReg Use old newreg denition for geometrical transformations (compatibility option for old Gmsh geometries) Default value: 1 Saved in: General.OptionsFileName
46
Gmsh 1.63
Geometry.Points Display geometry points? Default value: 1 Saved in: General.OptionsFileName Geometry.PointNumbers Display points numbers? Default value: 0 Saved in: General.OptionsFileName Geometry.PointSelectSize Display size of selected points (in pixels) Default value: 5 Saved in: General.OptionsFileName Geometry.PointSize Display size of points (in pixels) Default value: 4 Saved in: General.OptionsFileName Geometry.PointType Display points as solid color dots (0) or 3D spheres (1) Default value: 0 Saved in: General.OptionsFileName Geometry.ScalingFactor Global geometry scaling factor Default value: 1 Saved in: General.OptionsFileName 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
47
Geometry.SurfaceNumbers Display surface numbers? Default value: 0 Saved in: General.OptionsFileName Geometry.Tangents Display size of tangent vectors (in pixels) Default value: 0 Saved in: General.OptionsFileName 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: {178,182,129} 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: {128,128,128} Saved in: General.OptionsFileName Geometry.Color.PointsSelect Selected geometry point color Default value: {255,0,0} Saved in: General.OptionsFileName Geometry.Color.LinesSelect Selected geometry curve color Default value: {255,0,0} Saved in: General.OptionsFileName
48
Gmsh 1.63
Geometry.Color.SurfacesSelect Selected geometry surface color Default value: {255,0,0} Saved in: General.OptionsFileName Geometry.Color.VolumesSelect Selected geometry volume color Default value: {255,0,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
49
4 Mesh module
Gmshs mesh module regroups several 1D, 2D and 3D mesh algorithms, all producing grids conforming in the sense of nite elements (see Section 1.2 [Mesh], page 3). The 2D unstructured algorithms generate triangles or both triangles and quadrangles (when Recombine Surface is used: see Section 4.2.3 [Miscellaneous mesh commands], page 52). The 3D unstructured algorithms only generate tetrahedra. The 2D structured algorithms (transnite, elliptic and extrusion) generate triangles by default, but quadrangles can be obtained by using the Recombine commands (see Section 4.2.2 [Structured grids], page 51, and Section 4.2.3 [Miscellaneous mesh commands], page 52). The 3D structured algorithms generate tetrahedra, hexahedra, prisms and pyramids, depending on the type of the surface meshes they are based on.
50
Gmsh 1.63
51
Characteristic Length { expression-list } = expression; Modies the characteristic length of the points whose identication numbers are listed in expression-list. The new value is given by expression.
52
Gmsh 1.63
one). The optional argument Using Bump expression instructs the transnite algorithm to distribute the nodes with a renement at both ends of the line. (A deprecated synonym for Progression is Power.) Transfinite Surface { expression } = { expression-list } < Left | Right | Alternate > ; Selects the surface expression to be meshed with the 2D transnite algorithm (the surface can only have three or four sides). The expression-list should contain the identication numbers of the points on the boundary of the surface. The ordering of these point numbers denes the ordering and orientation of the mesh elements, and should thus follow the node ordering for triangles or quadrangles given in Section 9.3 [Gmsh node ordering], page 155. The optional argument species the way the triangles are oriented when the mesh is not recombined. Transfinite Volume { expression } = { expression-list }; Selects the volume expression to be meshed with the 3D transnite algorithm (the volume can only have six or eight faces). The expression-list should contain the identication numbers of the points on the boundary of the volume. The ordering of these point numbers denes the ordering and orientation of the mesh elements, and should thus follow the node ordering for prisms or hexahedra given in Section 9.3 [Gmsh node ordering], page 155. Elliptic Surface { expression } = { expression-list }; Selects the surface expression to be meshed with the 2D elliptic algorithm (the surface can only have four sides). The expression-list should contain the identication numbers of the points on the boundary of the surface. The ordering of these point numbers denes the ordering and orientation of the mesh elements, and should thus follow the node ordering for triangles or quadrangles given in Section 9.3 [Gmsh node ordering], page 155.
4.2.3 Miscellaneous
Here is a list of all other mesh commands currently available: Color color-expression { Point | Line | Surface | Volume { expression-list }; ... } Sets the mesh color of the entities in expression-list to color-expression. 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 "*"). 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 species the maximum recombination angle allowed (a large expression leading to more triangle recombinations).
53
Save char-expression; Saves the mesh in a le named char-expression, using the current Mesh.Format (see Section 4.3 [Mesh options], page 53). If the path in char-expression is not absolute, char-expression is appended to the path of the current le. 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 "*").
54
Gmsh 1.63
Mesh.CharacteristicLengthFactor Factor applied to all characteristic lengths (and background meshes) Default value: 1 Saved in: General.OptionsFileName Mesh.ColorCarousel Mesh coloring (0=by element type, 1=by elementary entity, 2=by physical entity, 3=by partition) Default value: 1 Saved in: General.OptionsFileName Mesh.ConstrainedBackgroundMesh Should the background mesh be constrained by the characteristic lengths associated with the geometry? Default value: 0 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.CutPlane Enable mesh cut plane Default value: 0 Saved in: Mesh.CutPlaneAsSurface Draw the intersection volume layer as a surface Default value: 0 Saved in: Mesh.CutPlaneOnlyVolume Cut only the volume elements Default value: 0 Saved in: Mesh.CutPlaneA First cut plane equation coecient (A in AX+BY+CZ+D=0) Default value: 1 Saved in: Mesh.CutPlaneB Second cut plane equation coecient (B in AX+BY+CZ+D=0) Default value: 0 Saved in: Mesh.CutPlaneC Third cut plane equation coecient (C in AX+BY+CZ+D=0) Default value: 0 Saved in: -
55
Mesh.CutPlaneD Fourth cut plane equation coecient (D in AX+BY+CZ+D=0) Default value: 0 Saved in: Mesh.DihedralAngleTol Dihedral angle tolerance for edge creation in the remesher Default value: 22 Saved in: General.OptionsFileName Mesh.Dual Display the dual mesh obtained by barycentric subdivision Default value: 0 Saved in: General.OptionsFileName Mesh.EdgeProlongationThreshold Edge prolongation threshold in the remesher Default value: 1 Saved in: General.OptionsFileName Mesh.ElementOrder Element order (1=linear elements, 2=quadratic elements) Default value: 1 Saved in: General.OptionsFileName Mesh.Explode Explode elements (between 0=point and 1=non-transformed) Default value: 1 Saved in: General.OptionsFileName Mesh.Format Mesh output format (1=msh, 2=unv, 3=gref, 19=vrml) Default value: 1 Saved in: General.OptionsFileName Mesh.Interactive Show the construction of 2D anisotropic mesh in real time Default value: 0 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.Light Enable lighting for the mesh Default value: 0 Saved in: General.OptionsFileName
56
Gmsh 1.63
Mesh.LightLines Enable lighting for mesh lines (element edges) Default value: 1 Saved in: General.OptionsFileName Mesh.LightTwoSide Light both sides of mesh elements (leads to slower rendering) Default value: 1 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.LineType Display mesh lines as solid color segments (0) or 3D cylinders (1) Default value: 0 Saved in: General.OptionsFileName Mesh.LineWidth Display width of mesh lines (in pixels) Default value: 1 Saved in: General.OptionsFileName Mesh.MinimumCirclePoints Minimum number of points used to mesh a circle Default value: 7 Saved in: General.OptionsFileName Mesh.MinimumElementSizeFact Minimum element size factor in the Remesher Default value: 500 Saved in: General.OptionsFileName Mesh.MshFileVersion Version of the msh le format to use Default value: 1 Saved in: General.OptionsFileName Mesh.NbElemsPerRadiusOfCurv Number of elements per radius of curvature in the remesher Default value: 5 Saved in: General.OptionsFileName
57
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.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.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.Optimize Optimize the mesh using Netgen to improve the quality of tetrahedral elements Default value: 0 Saved in: General.OptionsFileName Mesh.Points Display mesh vertices (nodes)? Default value: 0 Saved in: General.OptionsFileName Mesh.PointsPerElement Display mesh nodes per element (slower, but permits to visualize only a subset of the nodes)
58
Gmsh 1.63
Default value: 0 Saved in: General.OptionsFileName Mesh.PointInsertion Point insertion method for isotropic 2D algorithm (1=center of circumscribed circle, 2=center of gravity) Default value: 1 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.Quality Target quality for tetrahedral elements (currently only used by Tetgen) Default value: 1 Saved in: General.OptionsFileName Mesh.QualityInf Only display elements whose quality measure is greater than QualityInf Default value: 0 Saved in: General.OptionsFileName Mesh.QualitySup Only display elements whose quality measure is smaller than QualitySup Default value: 0 Saved in: General.OptionsFileName Mesh.QualityType Type of quality measure (0=gamma~vol/sum face/max edge, 1=eta~vol^(2/3)/sum edge^2, 2=rho~min edge/max edge) Default value: 0 Saved in: General.OptionsFileName Mesh.RadiusInf Only display elements whose longest edge is greater than RadiusInf Default value: 0 Saved in: General.OptionsFileName
59
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 2D and 3D meshing algorithm (test other values when the algorithm fails) Default value: 0.0001 Saved in: General.OptionsFileName Mesh.RecombineAlgo Recombine algorithm (1=mixed triangles-quadrangles, 2=all quadrangles) Default value: 1 Saved in: General.OptionsFileName Mesh.SaveAll Ignore Physical denitions and save all elements Default value: 0 Saved in: Mesh.ScalingFactor Global scaling factor applied to the saved mesh Default value: 1 Saved in: General.OptionsFileName Mesh.Smoothing Number of smoothing steps applied to the nal mesh Default value: 1 Saved in: General.OptionsFileName Mesh.Partitioning Number of partitions applied to the nal mesh Default value: 1 Saved in: General.OptionsFileName Mesh.SmoothNormals Smooth the mesh normals? Default value: 0 Saved in: General.OptionsFileName Mesh.SpeedMax Disable dubious point insertion tests Default value: 0 Saved in: General.OptionsFileName Mesh.StlDistanceTol Distance tolerance between two distinct vertices in STL meshes Default value: 5e-07 Saved in: General.OptionsFileName
60
Gmsh 1.63
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.Tangents Display size of tangent vectors (in pixels) Default value: 0 Saved in: General.OptionsFileName Mesh.TargetElmentSizeFact Target element size factor in the Remesher Default value: 20 Saved in: General.OptionsFileName Mesh.VertexArrays Use OpenGL vertex arrays to draw triangular meshes? Default value: 1 Saved in: General.OptionsFileName Mesh.VolumeEdges Display edges of volume mesh? Default value: 1 Saved in: General.OptionsFileName Mesh.VolumeFaces Display faces of volume mesh? Default value: 0 Saved in: General.OptionsFileName Mesh.VolumeNumbers Display volume mesh element numbers? Default value: 0 Saved in: General.OptionsFileName Mesh.LabelsFrequency Labels display frequency? Default value: 100 Saved in: General.OptionsFileName
61
Mesh.Color.Points Mesh node color Default value: {0,255,0} 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,255,0} Saved in: General.OptionsFileName Mesh.Color.Triangles Mesh triangle color (if Mesh.ColorCarousel=0) Default value: {160,150,255} Saved in: General.OptionsFileName Mesh.Color.Quadrangles Mesh quadrangle color (if Mesh.ColorCarousel=0) Default value: {130,120,225} Saved in: General.OptionsFileName Mesh.Color.Tetrahedra Mesh tetrahedron color (if Mesh.ColorCarousel=0) Default value: {160,150,255} Saved in: General.OptionsFileName Mesh.Color.Hexahedra Mesh hexahedron color (if Mesh.ColorCarousel=0) Default value: {130,120,225} Saved in: General.OptionsFileName Mesh.Color.Prisms Mesh prism color (if Mesh.ColorCarousel=0) Default value: {232,210,23} Saved in: General.OptionsFileName Mesh.Color.Pyramids Mesh pyramid color (if Mesh.ColorCarousel=0) Default value: {217,113,38} Saved in: General.OptionsFileName Mesh.Color.Tangents Tangent mesh vector color Default value: {255,255,0} Saved in: General.OptionsFileName
62
Gmsh 1.63
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: {9,3,103} Saved in: General.OptionsFileName Mesh.Color.One Color 1 in color carousel Default value: {35,0,111} Saved in: General.OptionsFileName Mesh.Color.Two Color 2 in color carousel Default value: {60,0,114} Saved in: General.OptionsFileName Mesh.Color.Three Color 3 in color carousel Default value: {83,0,114} Saved in: General.OptionsFileName Mesh.Color.Four Color 4 in color carousel Default value: {105,1,109} Saved in: General.OptionsFileName Mesh.Color.Five Color 5 in color carousel Default value: {126,10,102} Saved in: General.OptionsFileName Mesh.Color.Six Color 6 in color carousel Default value: {145,21,93} Saved in: General.OptionsFileName Mesh.Color.Seven Color 7 in color carousel Default value: {163,34,82} Saved in: General.OptionsFileName Mesh.Color.Eight Color 8 in color carousel Default value: {179,50,69} Saved in: General.OptionsFileName
63
Mesh.Color.Nine Color 9 in color carousel Default value: {193,67,57} Saved in: General.OptionsFileName Mesh.Color.Ten Color 10 in color carousel Default value: {207,85,44} Saved in: General.OptionsFileName Mesh.Color.Eleven Color 11 in color carousel Default value: {219,104,32} Saved in: General.OptionsFileName Mesh.Color.Twelve Color 12 in color carousel Default value: {229,124,22} Saved in: General.OptionsFileName Mesh.Color.Thirtheen Color 13 in color carousel Default value: {238,143,13} Saved in: General.OptionsFileName Mesh.Color.Fourteen Color 14 in color carousel Default value: {246,162,8} Saved in: General.OptionsFileName Mesh.Color.Fifteen Color 15 in color carousel Default value: {252,181,5} Saved in: General.OptionsFileName Mesh.Color.Sixteen Color 16 in color carousel Default value: {255,198,6} Saved in: General.OptionsFileName Mesh.Color.Seventeen Color 17 in color carousel Default value: {255,214,11} Saved in: General.OptionsFileName Mesh.Color.Eighteen Color 18 in color carousel Default value: {255,228,22} Saved in: General.OptionsFileName
64
Gmsh 1.63
Mesh.Color.Nineteen Color 19 in color carousel Default value: {255,240,38} Saved in: General.OptionsFileName
65
5 Solver module
Five external solvers can be interfaced simultaneously with Gmsh. If you just want to start a solver from the solver module, with no further interactions between the solver and Gmsh, just edit the options relative to one of the ve available solvers (e.g., Solver.Name0, Solver.Executable0, . . . ; see Section 5.1 [Solver options], page 65), and set the corresponding client-server option to zero (e.g., Solver.ClientServer0 = 0). This doesnt require any modication to be made to the solver. If you want the solver to interact with Gmsh (for error messages, option denitions, postprocessing, etc.), you need to link your solver with the GmshClient.c le and add the appropriate function calls inside your program. You can then proceed as in the previous case, but this time you should set the client-server option to 1 (e.g., Solver.ClientServer0 = 1), so that Gmsh and the solver can communicate through a Unix socket. See Section 5.2 [Solver example], page 79, for an example of how to interface a C++ solver. Bindings for solvers written in other languages (C, Perl and Python) are available in the source distribution.
66
Gmsh 1.63
Solver.MeshCommand0 Command used to specify the mesh le for solver 0 Default value: "-msh %s" Saved in: General.OptionsFileName Solver.SocketCommand0 Command to specify the socket to solver 0 Default value: "-socket %s" Saved in: General.OptionsFileName Solver.NameCommand0 Command to specify the problem name to solver 0 Default value: "%s" Saved in: General.OptionsFileName Solver.OptionCommand0 Command to get options from solver 0 Default value: "" Saved in: General.OptionsFileName Solver.FirstOption0 Label of rst option for solver 0 Default value: "Resolution" Saved in: General.OptionsFileName Solver.SecondOption0 Label of second option for solver 0 Default value: "PostOperation" Saved in: General.OptionsFileName Solver.ThirdOption0 Label of third option for solver 0 Default value: "" Saved in: General.OptionsFileName Solver.FourthOption0 Label of fourth option for solver 0 Default value: "" Saved in: General.OptionsFileName Solver.FifthOption0 Label of fth option for solver 0 Default value: "" Saved in: General.OptionsFileName Solver.FirstButton0 Label of rst button for solver 0 Default value: "Pre" Saved in: General.OptionsFileName
67
Solver.FirstButtonCommand0 Command associated with the rst button for solver 0 Default value: "-pre %s" Saved in: General.OptionsFileName Solver.SecondButton0 Label of second button for solver 0 Default value: "Cal" Saved in: General.OptionsFileName Solver.SecondButtonCommand0 Command associated with the second button for solver 0 Default value: "-cal" Saved in: General.OptionsFileName Solver.ThirdButton0 Label of third button for solver 0 Default value: "Pos" Saved in: General.OptionsFileName Solver.ThirdButtonCommand0 Command associated with the third button for solver 0 Default value: "-pos %s" Saved in: General.OptionsFileName Solver.FourthButton0 Label of fourth button for solver 0 Default value: "" Saved in: General.OptionsFileName Solver.FourthButtonCommand0 Command associated with the fourth button for solver 0 Default value: "" Saved in: General.OptionsFileName Solver.FifthButton0 Label of fth button for solver 0 Default value: "" Saved in: General.OptionsFileName Solver.FifthButtonCommand0 Command associated with the fth button for solver 0 Default value: "" Saved in: General.OptionsFileName Solver.Name1 Name of solver 1 Default value: "" Saved in: General.OptionsFileName
68
Gmsh 1.63
Solver.Help1 Help string for solver 1 Default value: "" Saved in: General.OptionsFileName Solver.Executable1 System command to launch solver 1 (should not contain the & character) Default value: "" Saved in: General.OptionsFileName Solver.Extension1 Default le name extension for solver 1 Default value: "" Saved in: General.OptionsFileName Solver.MeshName1 Default mesh le name for solver 1 Default value: "" Saved in: General.OptionsFileName Solver.MeshCommand1 Command used to specify the mesh le for solver 1 Default value: "" Saved in: General.OptionsFileName Solver.SocketCommand1 Command to specify the socket to solver 1 Default value: "-socket %s" Saved in: General.OptionsFileName Solver.NameCommand1 Command to specify the problem name to solver 1 Default value: "%s" Saved in: General.OptionsFileName Solver.OptionCommand1 Command to get options from solver 1 Default value: "" Saved in: General.OptionsFileName Solver.FirstOption1 Label of rst option for solver 1 Default value: "" Saved in: General.OptionsFileName Solver.SecondOption1 Label of second option for solver 1 Default value: "" Saved in: General.OptionsFileName
69
Solver.ThirdOption1 Label of third option for solver 1 Default value: "" Saved in: General.OptionsFileName Solver.FourthOption1 Label of fourth option for solver 1 Default value: "" Saved in: General.OptionsFileName Solver.FifthOption1 Label of fth option for solver 1 Default value: "" Saved in: General.OptionsFileName Solver.FirstButton1 Label of rst button for solver 1 Default value: "" Saved in: General.OptionsFileName Solver.FirstButtonCommand1 Command associated with the rst button for solver 1 Default value: "" Saved in: General.OptionsFileName Solver.SecondButton1 Label of second button for solver 1 Default value: "" Saved in: General.OptionsFileName Solver.SecondButtonCommand1 Command associated with the second button for solver 1 Default value: "" Saved in: General.OptionsFileName Solver.ThirdButton1 Label of third button for solver 1 Default value: "" Saved in: General.OptionsFileName Solver.ThirdButtonCommand1 Command associated with the third button for solver 1 Default value: "" Saved in: General.OptionsFileName Solver.FourthButton1 Label of fourth button for solver 1 Default value: "" Saved in: General.OptionsFileName
70
Gmsh 1.63
Solver.FourthButtonCommand1 Command associated with the fourth button for solver 1 Default value: "" Saved in: General.OptionsFileName Solver.FifthButton1 Label of fth button for solver 1 Default value: "" Saved in: General.OptionsFileName Solver.FifthButtonCommand1 Command associated with the fth button for solver 1 Default value: "" Saved in: General.OptionsFileName Solver.Name2 Name of solver 2 Default value: "" Saved in: General.OptionsFileName Solver.Help2 Help string for solver 2 Default value: "" Saved in: General.OptionsFileName Solver.Executable2 System command to launch solver 2 (should not contain the & character) Default value: "" Saved in: General.OptionsFileName Solver.Extension2 Default le name extension for solver 2 Default value: "" Saved in: General.OptionsFileName Solver.MeshName2 Default mesh le name for solver 2 Default value: "" Saved in: General.OptionsFileName Solver.MeshCommand2 Command used to specify the mesh le for solver 2 Default value: "" Saved in: General.OptionsFileName Solver.SocketCommand2 Command to specify the socket to solver 2 Default value: "-socket %s" Saved in: General.OptionsFileName
71
Solver.NameCommand2 Command to specify the problem name to solver 2 Default value: "%s" Saved in: General.OptionsFileName Solver.OptionCommand2 Command to get options from solver 2 Default value: "" Saved in: General.OptionsFileName Solver.FirstOption2 Label of rst option for solver 2 Default value: "" Saved in: General.OptionsFileName Solver.SecondOption2 Label of second option for solver 2 Default value: "" Saved in: General.OptionsFileName Solver.ThirdOption2 Label of third option for solver 2 Default value: "" Saved in: General.OptionsFileName Solver.FourthOption2 Label of fourth option for solver 2 Default value: "" Saved in: General.OptionsFileName Solver.FifthOption2 Label of fth option for solver 2 Default value: "" Saved in: General.OptionsFileName Solver.FirstButton2 Label of rst button for solver 2 Default value: "" Saved in: General.OptionsFileName Solver.FirstButtonCommand2 Command associated with the rst button for solver 2 Default value: "" Saved in: General.OptionsFileName Solver.SecondButton2 Label of second button for solver 2 Default value: "" Saved in: General.OptionsFileName
72
Gmsh 1.63
Solver.SecondButtonCommand2 Command associated with the second button for solver 2 Default value: "" Saved in: General.OptionsFileName Solver.ThirdButton2 Label of third button for solver 2 Default value: "" Saved in: General.OptionsFileName Solver.ThirdButtonCommand2 Command associated with the third button for solver 2 Default value: "" Saved in: General.OptionsFileName Solver.FourthButton2 Label of fourth button for solver 2 Default value: "" Saved in: General.OptionsFileName Solver.FourthButtonCommand2 Command associated with the fourth button for solver 2 Default value: "" Saved in: General.OptionsFileName Solver.FifthButton2 Label of fth button for solver 2 Default value: "" Saved in: General.OptionsFileName Solver.FifthButtonCommand2 Command associated with the fth button for solver 2 Default value: "" Saved in: General.OptionsFileName Solver.Name3 Name of solver 3 Default value: "" Saved in: General.OptionsFileName Solver.Help3 Help string for solver 3 Default value: "" Saved in: General.OptionsFileName Solver.Executable3 System command to launch solver 3 (should not contain the & character) Default value: "" Saved in: General.OptionsFileName
73
Solver.Extension3 Default le name extension for solver 3 Default value: "" Saved in: General.OptionsFileName Solver.MeshName3 Default mesh le name for solver 3 Default value: "" Saved in: General.OptionsFileName Solver.MeshCommand3 Command used to specify the mesh le for solver 3 Default value: "" Saved in: General.OptionsFileName Solver.SocketCommand3 Command to specify the socket to solver 3 Default value: "-socket %s" Saved in: General.OptionsFileName Solver.NameCommand3 Command to specify the problem name to solver 3 Default value: "%s" Saved in: General.OptionsFileName Solver.OptionCommand3 Command to get options from solver 3 Default value: "" Saved in: General.OptionsFileName Solver.FirstOption3 Label of rst option for solver 3 Default value: "" Saved in: General.OptionsFileName Solver.SecondOption3 Label of second option for solver 3 Default value: "" Saved in: General.OptionsFileName Solver.ThirdOption3 Label of third option for solver 3 Default value: "" Saved in: General.OptionsFileName Solver.FourthOption3 Label of fourth option for solver 3 Default value: "" Saved in: General.OptionsFileName
74
Gmsh 1.63
Solver.FifthOption3 Label of fth option for solver 3 Default value: "" Saved in: General.OptionsFileName Solver.FirstButton3 Label of rst button for solver 3 Default value: "" Saved in: General.OptionsFileName Solver.FirstButtonCommand3 Command associated with the rst button for solver 3 Default value: "" Saved in: General.OptionsFileName Solver.SecondButton3 Label of second button for solver 3 Default value: "" Saved in: General.OptionsFileName Solver.SecondButtonCommand3 Command associated with the second button for solver 3 Default value: "" Saved in: General.OptionsFileName Solver.ThirdButton3 Label of third button for solver 3 Default value: "" Saved in: General.OptionsFileName Solver.ThirdButtonCommand3 Command associated with the third button for solver 3 Default value: "" Saved in: General.OptionsFileName Solver.FourthButton3 Label of fourth button for solver 3 Default value: "" Saved in: General.OptionsFileName Solver.FourthButtonCommand3 Command associated with the fourth button for solver 3 Default value: "" Saved in: General.OptionsFileName Solver.FifthButton3 Label of fth button for solver 3 Default value: "" Saved in: General.OptionsFileName
75
Solver.FifthButtonCommand3 Command associated with the fth button for solver 3 Default value: "" Saved in: General.OptionsFileName Solver.Name4 Name of solver 4 Default value: "" Saved in: General.OptionsFileName Solver.Help4 Help string for solver 4 Default value: "" Saved in: General.OptionsFileName Solver.Executable4 System command to launch solver 4 (should not contain the & character) Default value: "" Saved in: General.OptionsFileName Solver.Extension4 Default le name extension for solver 4 Default value: "" Saved in: General.OptionsFileName Solver.MeshName4 Default mesh le name for solver 4 Default value: "" Saved in: General.OptionsFileName Solver.MeshCommand4 Command used to specify the mesh le for solver 4 Default value: "" Saved in: General.OptionsFileName Solver.SocketCommand4 Command to specify the socket to solver 4 Default value: "-socket %s" Saved in: General.OptionsFileName Solver.NameCommand4 Command to specify the problem name to solver 4 Default value: "%s" Saved in: General.OptionsFileName Solver.OptionCommand4 Command to get options from solver 4 Default value: "" Saved in: General.OptionsFileName
76
Gmsh 1.63
Solver.FirstOption4 Label of rst option for solver 4 Default value: "" Saved in: General.OptionsFileName Solver.SecondOption4 Label of second option for solver 4 Default value: "" Saved in: General.OptionsFileName Solver.ThirdOption4 Label of third option for solver 4 Default value: "" Saved in: General.OptionsFileName Solver.FourthOption4 Label of fourth option for solver 4 Default value: "" Saved in: General.OptionsFileName Solver.FifthOption4 Label of fth option for solver 4 Default value: "" Saved in: General.OptionsFileName Solver.FirstButton4 Label of rst button for solver 4 Default value: "" Saved in: General.OptionsFileName Solver.FirstButtonCommand4 Command associated with the rst button for solver 4 Default value: "" Saved in: General.OptionsFileName Solver.SecondButton4 Label of second button for solver 4 Default value: "" Saved in: General.OptionsFileName Solver.SecondButtonCommand4 Command associated with the second button for solver 4 Default value: "" Saved in: General.OptionsFileName Solver.ThirdButton4 Label of third button for solver 4 Default value: "" Saved in: General.OptionsFileName
77
Solver.ThirdButtonCommand4 Command associated with the third button for solver 4 Default value: "" Saved in: General.OptionsFileName Solver.FourthButton4 Label of fourth button for solver 4 Default value: "" Saved in: General.OptionsFileName Solver.FourthButtonCommand4 Command associated with the fourth button for solver 4 Default value: "" Saved in: General.OptionsFileName Solver.FifthButton4 Label of fth button for solver 4 Default value: "" Saved in: General.OptionsFileName Solver.FifthButtonCommand4 Command associated with the fth button for solver 4 Default value: "" Saved in: General.OptionsFileName Solver.MaximumDelay Maximum delay (in seconds) allowed for solver response Default value: 4 Saved in: General.OptionsFileName Solver.Plugins Enable default solver plugins? Default value: 0 Saved in: General.OptionsFileName Solver.ClientServer0 Connect solver 0 to the Gmsh server Default value: 1 Saved in: General.OptionsFileName Solver.MergeViews0 Automatically merge any post-processing view created by solver 0 Default value: 1 Saved in: General.OptionsFileName Solver.PopupMessages0 Automatically display messages produced by solver 0 Default value: 1 Saved in: General.OptionsFileName
78
Gmsh 1.63
Solver.ClientServer1 Connect solver 1 to the Gmsh server Default value: 0 Saved in: General.OptionsFileName Solver.MergeViews1 Automatically merge any post-processing view created by solver 1 Default value: 1 Saved in: General.OptionsFileName Solver.PopupMessages1 Automatically display messages produced by solver 1 Default value: 1 Saved in: General.OptionsFileName Solver.ClientServer2 Connect solver 2 to the Gmsh server Default value: 0 Saved in: General.OptionsFileName Solver.MergeViews2 Automatically merge any post-processing view created by solver 2 Default value: 1 Saved in: General.OptionsFileName Solver.PopupMessages2 Automatically display messages produced by solver 2 Default value: 1 Saved in: General.OptionsFileName Solver.ClientServer3 Connect solver 3 to the Gmsh server Default value: 0 Saved in: General.OptionsFileName Solver.MergeViews3 Automatically merge any post-processing view created by solver 3 Default value: 1 Saved in: General.OptionsFileName Solver.PopupMessages3 Automatically display messages produced by solver 3 Default value: 1 Saved in: General.OptionsFileName Solver.ClientServer4 Connect solver 4 to the Gmsh server Default value: 0 Saved in: General.OptionsFileName
79
Solver.MergeViews4 Automatically merge any post-processing view created by solver 4 Default value: 1 Saved in: General.OptionsFileName Solver.PopupMessages4 Automatically display messages produced by solver 4 Default value: 1 Saved in: General.OptionsFileName
// This file contains a dummy client solver for Gmsh. It does not // solve anything, but shows how to program your own solver to interact // with the Gmsh solver module.
80
Gmsh 1.63
// // // // // // // // // // // //
To compile this solver, type something like: g++ solver.cpp -o solver.exe To run it, merge the contents of the file solver.opt into your default Gmsh option file, or launch Gmsh with the command: gmsh -option solver.opt You will then see a new button labeled "My C++ solver" in Gmshs solver menu.
#include <math.h> #include "GmshClient.h" typedef enum { send_options, run_code } action; int main(int argc, char *argv[]) { action what_to_do = run_code; char *name = NULL, *option = NULL, *socket = NULL; // parse command line int i = 0; while(i < argc) { if(argv[i][0] == -) { if(!strcmp(argv[i] + 1, "socket")) { i++; if(argv[i]) socket = argv[i++]; } else if(!strcmp(argv[i] + 1, "options")) { i++; what_to_do = send_options; } else if(!strcmp(argv[i] + 1, "run")) { i++; what_to_do = run_code; if(argv[i]) option = argv[i++]; } } else name = argv[i++]; } if(!socket) {
81
printf("No socket specified: running non-interactively...\n"); exit(1); } // connect to Gmsh GmshClient client; if(client.Connect(socket) < 0){ printf("Unable to connect to Gmsh\n"); exit(1); } client.Start(); if(what_to_do == send_options) { // send the available options for this computation client.Option(1, "FormulationH"); client.Option(1, "ConvTest"); client.Option(1, "Blablabli"); } else if(what_to_do == run_code){ // do the computation and merge some views for(int i = 0; i < 10; i++){ client.Info("Computing curve..."); sleep(1); // fake computation... client.Info("Done computing curve"); FILE *file = fopen("solver.pos", "w"); if(!file) client.Error("Unable to open output file"); else { fprintf(file, "View.Type = 2;\n"); fprintf(file, "View.Axes = 3;\n"); fprintf(file, "Delete View[0];\n"); fprintf(file, "View \"%s\"{\n", option); for(int j = 0; j < 100; j++) fprintf(file, "SP(%d,0,0){%g};\n", j,sin(j*i*M_PI/10.)); fprintf(file, "};\n"); fclose(file); client.View("solver.pos"); } } client.Info("Done!"); } client.Stop(); client.Disconnect(); }
82
Gmsh 1.63
To dene the above solver as the second external solver in Gmsh, you then need to dene the following options (either merge them in your Gmsh option le, or use the -option command-line optionsee Section 8.3 [Command-line options], page 138): Solver.Name1 = "My C++ Solver"; Solver.Executable1 = "./solver.exe"; Solver.OptionCommand1 = "-options"; Solver.FirstOption1 = "My options"; Solver.FirstButton1 = "Run !"; Solver.FirstButtonCommand1 = "-run %s"; Solver.ClientServer1 = 1; Solver.MergeViews1 = 1; Solver.PopupMessages1 = 1;
83
6 Post-processing module
Gmshs post-processing module can handle multiple scalar, vector or tensor data sets along with the geometry and the mesh. The data sets should be given in one of Gmshs postprocessing le formats described in Chapter 9 [File formats], page 145. Once loaded into Gmsh, scalar elds can be displayed as iso-value lines and surfaces or color maps, whereas vector elds can be represented either by three-dimensional arrows or by displacement maps. (Tensor elds are currently displayed as Von-Mises eective stresses. To display other (combinations of) components, use Plugin(Extract): see Section 6.2 [Post-processing plugins], page 85.) In Gmshs jargon, each data set is called a view, and can arbitrarily mix all types of elements and elds. 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 6.3 [Post-processing options], page 96). 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 dened in the post-processing view: the abscissa of the 2D graph is the curvilinear abscissa of the curve dened 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 postprocessing commands and options to the user in its scripting language to permit a complete automation of the post-processing process (see e.g., Section 7.8 [t8.geo], page 132, and Section 7.9 [t9.geo], page 135). 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 les in human-readable parsed format (see Section 9.2.1 [Parsed post-processing le format], page 149) are available in the tutorial directory of Gmshs distribution (.pos les).
84
Gmsh 1.63
simultaneous renderings of the same large dataset (usually with dierent display options), but you cannot aord to store all copies in memory. If what you really want is multiple physical copies of the data, just merge the le 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. 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 dierent 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-timestep view. The combination is done temporally, i.e., as if the data in each view corresponds to a dierent 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 multitime-step view. The combination is done temporally, i.e., as if the data in each view corresponds to a dierent time instant. The combination will fail if the meshes in all the views are not identical. Delete View[expression]; Deletes (removes) the expression-th post-processing view. 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. Note that post-
85
Plugin (string) . Run; Executes the plugin string. The list of default plugins is given in Section 6.2 [Post-processing plugins], page 85. Plugin (string) . string = expression | char-expression; Sets an option for a given plugin. See Section 6.2 [Post-processing plugins], page 85, for a list of default plugins and Section 7.9 [t9.geo], page 135, for some examples. Save View[expression] char-expression; Saves the the expression-th post-processing view in a le named char-expression. If the path in char-expression is not absolute, char-expression is appended to the path of the current le. View "string" { string ( expression-list ) { expression-list }; ... }; Creates a new post-processing view, named "string". This is the easiest way to create a post-processing view, but also the least ecient (the view is read through Gmshs script parser, which can become a bit slow if the view is very largee.g., with one million elements). Nevertheless, this parsed postprocessing format (explained in detail in Section 9.2.1 [Parsed post-processing le format], page 149) is very powerful, since all the values are expressions. Two other formats, better suited for very large data sets, are described in Section 9.2.2 [ASCII post-processing le format], page 151, and Section 9.2.3 [Binary post-processing le format], page 154.
86
Gmsh 1.63
Align
Default value: "Left" Default value: 50 Default value: 30 Default value: 0 Default value: 0 Default value: 14 Default value: -1
Plugin(Curl) Plugin(Curl) computes the curl of the eld in the view iView. If iView < 0, the plugin is run on the current view. Plugin(Curl) creates one new view. Numeric options: iView Default value: -1
Plugin(CutGrid) Plugin(CutGrid) cuts the view iView with a rectangular grid dened 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 nPointsU and nPointsV. If ConnectPoints is zero, the plugin creates points; otherwise, the plugin generates quadrangles, lines or points depending on the values of nPointsU and nPointsV. If iView < 0, the plugin is run on the current view. Plugin(CutGrid) creates one new view. Numeric options: X0 Y0 Z0 X1 Y1 Z1 X2 Y2 Z2 nPointsU nPointsV Default value: 0 Default value: 0 Default value: 0 Default value: 1 Default value: 0 Default value: 0 Default value: 0 Default value: 1 Default value: 0 Default value: 20 Default value: 20
87
iView
Default value: -1
Plugin(CutMap) Plugin(CutMap) extracts the isosurface of value A from the view iView and draws the dTimeStep-th value of the view dView on the isosurface. If iView < 0, the plugin is run on the current view. If dTimeStep < 0, the plugin uses, for each time step in iView, the corresponding time step in dView. If dView < 0, the plugin uses iView as the value source. If ExtractVolume is nonzero, the plugin extracts the isovolume with values greater (if ExtractVolume > 0) or smaller (if ExtractVolume < 0) than the isosurface A. Plugin(CutMap) creates as many views as there are time steps in iView. Numeric options: A dTimeStep Default value: -1 dView Default value: -1 Default value: 1
ExtractVolume Default value: 0 RecurLevel Default value: 4 TargetError Default value: 0 iView Default value: -1
Plugin(CutParametric) Plugin(CutParametric) cuts the view iView with the parametric function (X(u), Y(u), Z(u)), using nPointsU values of the parameter u in [MinU, MaxU]. If ConnectPoints is set, the plugin creates line elements; otherwise, the plugin generates points. If iView < 0, the plugin is run on the current view. Plugin(CutParametric) creates one new view. String options: X Y Z Default value: "0 + 1 * Cos(u)" Default value: "0 + 1 * Sin(u)" Default value: "0"
Numeric options: MinU MaxU nPointsU Default value: 0 Default value: 6.28319 Default value: 360
88
Gmsh 1.63
iView
Default value: -1
Plugin(CutPlane) Plugin(CutPlane) cuts the view iView 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 iView < 0, the plugin is run on the current view. Plugin(CutPlane) creates one new view. Numeric options: A B C D Default value: 1 Default value: 0 Default value: 0 Default value: -0.01
ExtractVolume Default value: 0 RecurLevel Default value: 4 TargetError Default value: 0 iView Default value: -1
Plugin(CutSphere) Plugin(CutSphere) cuts the view iView with the sphere (X-Xc)^2 + (YYc)^2 + (Z-Zc)^2 = R^2. If ExtractVolume is nonzero, the plugin extracts the elements inside (if ExtractVolume < 0) or outside (if ExtractVolume > 0) the sphere. If iView < 0, the plugin is run on the current view. Plugin(CutSphere) creates one new view. Numeric options: Xc Yc Zc R Default value: 0 Default value: 0 Default value: 0 Default value: 0.25
Plugin(DecomposeInSimplex) Plugin(DecomposeInSimplex) decomposes all non-simplectic elements (quadrangles, prisms, hexahedra, pyramids) in the view iView into simplices (triangles, tetrahedra). If iView < 0, the plugin is run on the current view.
89
Plugin(DisplacementRaise) Plugin(DisplacementRaise) transforms the coordinates of the elements in the view iView using the vectorial values (the displacements) stored in the dTimeStep-th time step of the view dView. If iView < 0, the plugin is run on the current view. If dView < 0, the plugin looks for the displacements in the view located just after iView in the view list. Plugin(DisplacementRaise) is executed in-place. Numeric options: Factor dTimeStep Default value: 0 dView iView Default value: -1 Default value: -1 Default value: 1
Plugin(Divergence) Plugin(Divergence) computes the divergence of the eld in the view iView. If iView < 0, the plugin is run on the current view. Plugin(Divergence) creates one new view. Numeric options: iView Default value: -1
Plugin(Eigenvalues) Plugin(Eigenvalues) computes the three real eigenvalues of each tensor in the view iView. If iView < 0, the plugin is run on the current view. Plugin(Eigenvalues) creates three new scalar views. Numeric options: iView Default value: -1
Plugin(Eigenvectors) Plugin(Eigenvectors) computes the three (right) eigenvectors of each tensor in the view iView and sorts them according to the value of the associated eigenvalues. If ScaleByEigenvalues is set, each eigenvector is scaled by its associated eigenvalue. The plugin gives an error if the eigenvectors are complex. If iView < 0, the plugin is run on the current view. Plugin(Eigenvectors) creates three new vector views. Numeric options: ScaleByEigenvalues Default value: 1 iView Default value: -1
90
Gmsh 1.63
Plugin(Evaluate) Plugin(Evaluate) sets the Component-th component of the TimeStep-th time step in the view iView to the expression Expression. Expression 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 symbol v, to retrieve the Component-th component of the eld in iView at the TimeStep-th time step; - the symbols v0, v1, v2, ..., v8, to retrieve each component of the eld in iView at the TimeStep-th time step; - the symbol w, to retrieve the Component-th component of the eld in ExternalView at the ExternalTimeStep-th time step. If ExternalView and iView are based on dierent spatial grids, or if their data types are dierent, ExternalView is interpolated onto iView; - the symbols w0, w1, w2, ..., w8, to retrieve each component of the eld in ExternalView at the ExternalTimeStep-th time step. If TimeStep < 0, the plugin automatically loops over all the time steps in iView and evaluates Expression for each one. If ExternalTimeStep < 0, the plugin uses TimeStep instead. If Component < 0, the plugin automatically loops over all the components in the view and evaluates Expression for each one. If iView < 0, the plugin is run on the current view. If ExternalView < 0, the plugin uses iView instead. Plugin(Evaluate) is executed in-place. String options: Expression Default value: "v0*Sin(x)" Numeric options: Component Default value: -1 TimeStep Default value: -1
Plugin(Extract) Plugin(Extract) extracts a combination of components from the TimeStepth time step in the view iView. If only Expression0 is given (and Expression1, ..., Expression8 are all empty), the plugin creates a scalar view. If
91
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 of the eld, and 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 iView < 0, the plugin is run on the current view. Plugin(Extract) creates one new view. String options: Expression0 Default value: "v0" 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 iView Default value: -1 Default value: -1
Plugin(ExtractElements) Plugin(ExtractElements) extracts the elements from the view iView whose TimeStep-th values (averaged by element) are comprised between MinVal and MaxVal. If iView < 0, the plugin is run on the current view. Plugin(ExtractElements) creates one new view. Numeric options: MinVal MaxVal Default value: 0 Default value: 1
92
Gmsh 1.63
TimeStep iView
Plugin(Gradient) Plugin(Gradient) computes the gradient of the eld in the view iView. If iView < 0, the plugin is run on the current view. Plugin(Gradient) creates one new view. Numeric options: iView Default value: -1
Plugin(HarmonicToTime) Plugin(HarmonicToTime) takes the values in the time steps RealPart and ImaginaryPart of the view iView, and creates a new view containing (iView[RealPart] * cos(p) - iView[ImaginaryPart] * sin(p)), with p = 2*Pi*k/nSteps, k = 0, ..., nSteps-1. If iView < 0, the plugin is run on the current view. Plugin(HarmonicToTime) creates one new view. Numeric options: RealPart Default value: 0
Plugin(Integrate) Plugin(Integrate) integrates scalar elds over all the elements in the view iView, as well as the circulation/ux of vector elds over line/surface elements. If iView < 0, the plugin is run on the current view. If ComputeLevelsetPositive is set, the plugin computes the positive area (volume) of the map. Plugin(Integrate) creates one new view. Numeric options: ComputeLevelsetPositive Default value: 0 iView 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 iView contains tensor elements, the plugin directly uses the tensors as the values of the velocity gradient tensor; if iView contains vector elements, the plugin uses them as the velocities from which to derive the velocity gradient tensor. If iView < 0, the plugin is run on the current view.
93
Plugin(Lambda2) creates one new view. Numeric options: Eigenvalue Default value: 2 iView Default value: -1
Plugin(ModulusPhase) Plugin(ModulusPhase) interprets the time steps realPart and imaginaryPart in the view iView as the real and imaginary parts of a complex eld and replaces them with their corresponding modulus and phase. If iView < 0, the plugin is run on the current view. Plugin(ModulusPhase) is executed in-place. Numeric options: RealPart Default value: 0
Plugin(Probe) Plugin(Probe) gets the value of the view iView at the point (X,Y,Z). If iView < 0, the plugin is run on the current view. Plugin(Probe) creates one new view. Numeric options: X Y Z iView Default value: 0 Default value: 0 Default value: 0 Default value: -1
Plugin(Remove) Plugin(Remove) removes the marked items from the view iView. If iView < 0, the plugin is run on the current view. Plugin(Remove) is executed in-place. Numeric options: Text2D Text3D Points Lines Triangles Default value: 0 Quadrangles Default value: 0 Default value: 1 Default value: 1 Default value: 0 Default value: 0
94
Gmsh 1.63
Tetrahedra Default value: 0 Hexahedra Default value: 0 Prisms Pyramids Scalar Vector Tensor iView Default value: 0 Default value: 0 Default value: 1 Default value: 1 Default value: 1 Default value: -1
Plugin(Skin) Plugin(Skin) extracts the skin (the boundary) of the view iView. If iView < 0, the plugin is run on the current view. Plugin(Skin) creates one new view. Numeric options: iView Default value: -1
Plugin(Smooth) Plugin(Smooth) averages the values at the nodes of the scalar view iView. If iView < 0, the plugin is run on the current view. Plugin(Smooth) is executed in-place. Numeric options: iView Default value: -1
Plugin(SphericalRaise) Plugin(SphericalRaise) transforms the coordinates of the elements in the view iView using the values associated with the TimeStep-th time step. Instead of elevating the nodes along the X, Y and Z axes as in View[iView].RaiseX, View[iView].RaiseY and View[iView].RaiseZ, the raise is applied along the radius of a sphere centered at (Xc, Yc, Zc). If iView < 0, the plugin is run on the current view. Plugin(SphericalRaise) is executed in-place. Numeric options: Xc Yc Zc Raise TimeStep iView Default value: 0 Default value: 0 Default value: 0 Default value: 1 Default value: 0 Default value: -1
95
Plugin(StreamLines) Plugin(StreamLines) computes stream lines from a vector view iView and optionally interpolates the scalar view dView on the resulting stream lines. It takes as input a grid dened 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 that are going to be transported along U and V is set with the options nPointsU and nPointsV. Then, we solve the equation DX(t)/dt = V(x,y,z) with X(t=0) chosen as the grid and V(x,y,z) interpolated on the vector view. The timestep and the maximum number of iterations are set with the options MaxIter and DT. The time stepping scheme is a RK44. If iView < 0, the plugin is run on the current view. Plugin(StreamLines) creates one new view. This view contains multi-step vector points if dView < 0, or single-step scalar lines if dView >= 0. Numeric options: X0 Y0 Z0 X1 Y1 Z1 X2 Y2 Z2 nPointsU nPointsV MaxIter DT dView iView Default value: 0 Default value: 0 Default value: 0 Default value: 1 Default value: 0 Default value: 0 Default value: 0 Default value: 1 Default value: 0 Default value: 10 Default value: 1 Default value: 100 Default value: 0.1 Default value: -1 Default value: -1
Plugin(Transform) Plugin(Transform) transforms the homogeneous node coordinates (x,y,z,1) of the elements in the view iView by the matrix [A11 A12 A13 T1] [A21 A22 A23 T2] [A31 A32 A33 T3]. If SwapOrientation is set, the orientation of the elements is reversed. If iView < 0, the plugin is run on the current view. Plugin(Transform) is executed in-place. Numeric options: A11 Default value: 1
96
Gmsh 1.63
Default value: 0 Default value: 0 Default value: 0 Default value: 1 Default value: 0 Default value: 0 Default value: 0 Default value: 1 Default value: 0 Default value: 0 Default value: 0
Plugin(Triangulate) Plugin(Triangulate) triangulates the points in the view iView, assuming that all the points belong to a surface that can be projected one-to-one onto a plane. If iView < 0, the plugin is run on the current view. Plugin(Triangulate) creates one new view. Numeric options: iView Default value: -1
97
PostProcessing.CombineRemoveOriginal Remove original views after a Combine operation Default value: 1 Saved in: General.OptionsFileName PostProcessing.Format Default le format for post-processing views (0=ASCII view, 1=binary view, 2=parsed view, 3=STL triangulation, 4=text, 5=mesh) Default value: 0 Saved in: General.OptionsFileName PostProcessing.HorizontalScales Display value scales horizontally Default value: 1 Saved in: General.OptionsFileName PostProcessing.Link Link post-processing views (0=none, 1/2=changes in visible/all, 3/4=everything in visible/all) Default value: 0 Saved in: General.OptionsFileName PostProcessing.NbViews Current number of views merged (read-only) Default value: 0 Saved in: PostProcessing.Plugins Enable default post-processing plugins? Default value: 1 Saved in: General.OptionsFileName PostProcessing.Smoothing Apply (non-reversible) smoothing to post-processing view when merged Default value: 0 Saved in: General.OptionsFileName PostProcessing.VertexArrays Use OpenGL vertex arrays to draw triangles in post-processing views? Default value: 1 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
98
Gmsh 1.63
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.FileName Default post-processing view le name Default value: "" Saved in: View.Format Number format (in standard C form) Default value: "%.3g" Saved in: General.OptionsFileName View.GeneralizedRaiseX Generalized elevation of the view along X-axis (in model coordinates) Default value: "v0" Saved in: General.OptionsFileName View.GeneralizedRaiseY Generalized elevation of the view along Y-axis (in model coordinates) Default value: "v1" Saved in: General.OptionsFileName View.GeneralizedRaiseZ Generalized elevation of the view along Z-axis (in model coordinates) Default value: "v2" Saved in: General.OptionsFileName View.Name Default post-processing view name Default value: "" Saved in: -
99
View.Stipple0 First stippling pattern Default value: "1*0x1F1F" Saved in: General.OptionsFileName View.Stipple1 Second stippling pattern Default value: "1*0x3333" Saved in: General.OptionsFileName View.Stipple2 Third stippling pattern Default value: "1*0x087F" Saved in: General.OptionsFileName View.Stipple3 Fourth stippling pattern Default value: "1*0xCCCF" Saved in: General.OptionsFileName View.Stipple4 Fifth stippling pattern Default value: "2*0x1111" Saved in: General.OptionsFileName View.Stipple5 Sixth stippling pattern Default value: "2*0x0F0F" Saved in: General.OptionsFileName View.Stipple6 Seventh stippling pattern Default value: "1*0xCFFF" Saved in: General.OptionsFileName View.Stipple7 Eighth stippling pattern Default value: "2*0x0202" Saved in: General.OptionsFileName View.Stipple8 Ninth stippling pattern Default value: "2*0x087F" Saved in: General.OptionsFileName View.Stipple9 Tenth stippling pattern Default value: "1*0xFFFF" Saved in: General.OptionsFileName
100
Gmsh 1.63
View.AngleSmoothNormals Threshold angle below which normals are not smoothed Default value: 30 Saved in: General.OptionsFileName View.ArrowHeadRadius Relative radius of arrow head Default value: 0.12 Saved in: General.OptionsFileName View.ArrowSize Display size of arrows (in pixels) Default value: 60 Saved in: General.OptionsFileName View.ArrowSizeProportional Scale the arrows according to the norm of the vector Default value: 1 Saved in: General.OptionsFileName View.ArrowStemLength Relative length of arrow stem Default value: 0.56 Saved in: General.OptionsFileName View.ArrowStemRadius Relative radius of arrow stem Default value: 0.02 Saved in: General.OptionsFileName View.AutoPosition Position the scale or 2D plot automatically 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.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
101
View.AxesMaxY Maximum Y-axis coordinate Default value: 1 Saved in: General.OptionsFileName View.AxesMaxZ Maximum Z-axis coordinate Default value: 1 Saved in: General.OptionsFileName View.AxesMinX Minimum X-axis coordinate Default value: 0 Saved in: General.OptionsFileName View.AxesMinY Minimum Y-axis coordinate Default value: 0 Saved in: General.OptionsFileName View.AxesMinZ Minimum Z-axis coordinate Default value: 0 Saved in: General.OptionsFileName View.AxesTicsX Number of tics on the X-axis Default value: 5 Saved in: General.OptionsFileName View.AxesTicsY Number of tics on the Y-axis Default value: 5 Saved in: General.OptionsFileName View.AxesTicsZ Number of tics on the Z-axis Default value: 5 Saved in: General.OptionsFileName View.Boundary Draw the N minus b-dimensional boundary of the element (N=element dimension, b=option value) Default value: 0 Saved in: General.OptionsFileName View.ColormapAlpha Colormap alpha channel value (used only if != 1) Default value: 1 Saved in: General.OptionsFileName
102
Gmsh 1.63
View.ColormapAlphaPower Colormap alpha channel power Default value: 0 Saved in: General.OptionsFileName View.ColormapBeta Colormap beta parameter (gamma = 1-beta) Default value: 0 Saved in: General.OptionsFileName View.ColormapBias Colormap bias Default value: 0 Saved in: General.OptionsFileName View.ColormapCurvature Colormap curvature or slope coecient 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 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.CustomMax User-dened maximum value to be displayed Default value: 0 Saved in: View.CustomMin User-dened minimum value to be displayed Default value: 0 Saved in: -
103
View.DisplacementFactor Displacement amplication 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.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.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
104
Gmsh 1.63
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 Explode elements (between 0=point and 1=non-transformed) Default value: 1 Saved in: General.OptionsFileName View.ExternalView Index of the view used to color vector elds (-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.GeneralizedRaiseFactor Generalized raise amplication factor Default value: 1 Saved in: General.OptionsFileName View.GeneralizedRaiseView Index of the view used for generalized raise (-1=self) Default value: -1 Saved in: General.OptionsFileName View.GlyphLocation Glyph (arrow, number, etc.) location (1=center of gravity, 2=node) Default value: 1 Saved in: General.OptionsFileName View.Grid Grid mode (this option is deprecated: use View.Axes instead) Default value: 0 Saved in: -
105
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: 0 Saved in: General.OptionsFileName View.LightTwoSide Light both sides of view elements (leads to slower rendering) Default value: 1 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.Max Maximum value in the view (read-only) Default value: -2.22195e-146 Saved in: Maximum view coordinate along the X-axis (read-only) Default value: -2.22195e-146 Saved in: View.MaxY Maximum view coordinate along the Y-axis (read-only) Default value: -2.22195e-146 Saved in: View.MaxZ Maximum view coordinate along the Z-axis (read-only) Default value: -2.22195e-146 Saved in: -
View.MaxX
106
Gmsh 1.63
View.Min
Minimum value in the view (read-only) Default value: -2.22195e-146 Saved in: Minimum view coordinate along the X-axis (read-only) Default value: -2.22195e-146 Saved in: -
View.MinX
View.MinY Minimum view coordinate along the Y-axis (read-only) Default value: -2.22195e-146 Saved in: View.MinZ Minimum view coordinate along the Z-axis (read-only) Default value: -2.22195e-146 Saved in: View.NbIso Number of intervals Default value: 15 Saved in: General.OptionsFileName View.NbTimeStep Number of time steps in the view (do not change this!) Default value: 1 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
107
View.PointType Display points as solid color dots (0) or 3D spheres (1) Default value: 0 Saved in: General.OptionsFileName View.PositionX Horizontal position (in pixels) of the upper left corner of the scale or 2D plot Default value: 100 Saved in: General.OptionsFileName View.PositionY Vertical position (in pixels) of the upper left corner of the scale or 2D plot Default value: 50 Saved in: General.OptionsFileName View.RaiseX Elevation of the view along X-axis (in model coordinates) Default value: 0 Saved in: View.RaiseY Elevation of the view along Y-axis (in model coordinates) Default value: 0 Saved in: View.RaiseZ Elevation of the view along Z-axis (in model coordinates) Default value: 0 Saved in: View.RangeType Value scale range type (1=default, 2=custom, 3=per time step) Default value: 1 Saved in: General.OptionsFileName View.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
108
Gmsh 1.63
View.ShowScale Show value scale? Default value: 1 Saved in: General.OptionsFileName View.ShowTime Time display mode (0=hidden, 1=value if multiple, 2=value always, 3=step if multiple, 4=step always) Default value: 3 Saved in: General.OptionsFileName View.SmoothNormals Smooth the normals? Default value: 0 Saved in: General.OptionsFileName View.Stipple Stipple curves in 2D plots? Default value: 0 Saved in: General.OptionsFileName View.Tangents Display size of tangent vectors (in pixels) Default value: 0 Saved in: General.OptionsFileName View.TensorType Tensor Visualization Type Default value: 0 Saved in: General.OptionsFileName View.TimeStep Current time step displayed Default value: 0 Saved in: View.Transform11 Element (1,1) of the 3x3 coordinate transformation matrix Default value: 1 Saved in: View.Transform12 Element (1,2) of the 3x3 coordinate transformation matrix Default value: 0 Saved in: View.Transform13 Element (1,3) of the 3x3 coordinate transformation matrix Default value: 0 Saved in: -
109
View.Transform21 Element (2,1) of the 3x3 coordinate transformation matrix Default value: 0 Saved in: View.Transform22 Element (2,2) of the 3x3 coordinate transformation matrix Default value: 1 Saved in: View.Transform23 Element (2,3) of the 3x3 coordinate transformation matrix Default value: 0 Saved in: View.Transform31 Element (3,1) of the 3x3 coordinate transformation matrix Default value: 0 Saved in: View.Transform32 Element (3,2) of the 3x3 coordinate transformation matrix Default value: 0 Saved in: View.Transform33 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) 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=displacement) Default value: 4 Saved in: General.OptionsFileName View.Visible Is the view visible? Default value: 1 Saved in: -
110
Gmsh 1.63
View.Width Width (in pixels) of the scale or 2D plot Default value: 300 Saved in: General.OptionsFileName View.Color.Points Point color Default value: {255,255,255} Saved in: General.OptionsFileName View.Color.Lines Line color Default value: {255,255,255} Saved in: General.OptionsFileName View.Color.Triangles Triangle color Default value: {255,255,255} Saved in: General.OptionsFileName View.Color.Quadrangles Quadrangle color Default value: {255,255,255} Saved in: General.OptionsFileName View.Color.Tetrahedra Tetrahedron color Default value: {255,255,255} Saved in: General.OptionsFileName View.Color.Hexahedra Hexahedron color Default value: {255,255,255} Saved in: General.OptionsFileName View.Color.Prisms Prism color Default value: {255,255,255} Saved in: General.OptionsFileName View.Color.Pyramids Pyramid color Default value: {255,255,255} Saved in: General.OptionsFileName View.Color.Tangents Tangent vector color Default value: {255,255,0} Saved in: General.OptionsFileName
111
View.Color.Normals Normal vector color Default value: {255,0,0} Saved in: General.OptionsFileName View.Color.Text2D 2D text color Default value: {255,255,255} Saved in: General.OptionsFileName View.Color.Text3D 3D text color Default value: {255,255,255} Saved in: General.OptionsFileName View.Color.Axes Axes color Default value: {255,255,255} Saved in: General.OptionsFileName View.ColorTable Color table used to draw the view Saved in: General.OptionsFileName
112
Gmsh 1.63
Chapter 7: Tutorial
113
7 Tutorial
The nine following examples introduce new features gradually, starting with t1.geo. The les corresponding to these examples are available in the tutorial directory of the Gmsh distribution. This tutorial does not explain the mesh and post-processing le formats: see Chapter 9 [File formats], page 145, for this. To learn how to run Gmsh on your computer, see Chapter 8 [Running Gmsh], page 137. In addition, interactive tutorials that explain how to use the graphical user interface are available on Gmshs webpage: The rst interactive tutorial shows how to create a simple 2D geometry and how to generate a mesh; The second shows several methods to visualize data sets on deformed grids; The third shows how to use post-processing plugins.
7.1 t1.geo
/********************************************************************* * * Gmsh tutorial 1 * * Variables, elementary entities (points, lines, surfaces), physical * entities (points, lines, surfaces), background mesh * *********************************************************************/ // The simplest construction of Gmshs scripting language is the // affectation. The following command defines a new variable lc: lc = 0.009; // // // // // This variable can then for example be used in the definition of Gmshs simplest elementary entity, a Point. A Point is defined by a list of four numbers: its three coordinates (X, Y and Z), and a characteristic length which sets the target element size at the point:
Point(1) = {0, 0, 0, 9.e-1 * lc}; // // // // // The actual distribution of the mesh element sizes is then obtained by interpolation of these characteristic lengths throughout the geometry. There are also other possibilities to specify characteristic lengths: attractors (see t7.geo) and background meshes (see bgmesh.pos).
114
Gmsh 1.63
// // // // // // // // // //
As can be seen in the previous definition, more complex expressions can be constructed from variables and floating point constants. Here, the product of the variable lc by the constant 9.e-1 is given as the fourth argument of the list defining the point. We can then define some additional points as well as our first curve. Curves are Gmshs second type of elementery entities, and, amongst curves, straight lines are the simplest. A straight line is defined by a list of point numbers. In the commands below, for example, the line 1 starts at point 1 and ends at point 2:
Point(2) = {.1, 0, 0, lc} ; Point(3) = {.1, .3, 0, lc} ; Point(4) = {0, .3, 0, lc} ; Line(1) Line(2) Line(3) Line(4) // // // // // = = = = {1,2} {3,2} {3,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(5) = {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(6) = {5} ; // // // // // // // // 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 6). 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), and specifying their orientation.
// We can for example group the points 1 and 2 into the physical // entity 1: Physical Point(1) = {1,2} ;
Chapter 7: Tutorial
115
// Consequently, two punctual elements will be saved in the output // files, both with the region number 1. The mechanism is identical // for line or surface elements: Physical Line(10) = {1,2,4} ; MySurface = 100; Physical Surface(MySurface) = {6} ; // // // // // // // // All the line elements created during the meshing of lines 1, 2 and 4 will be saved in the output file with the region number 10; and all the triangular elements resulting from the discretization of surface 6 will be given the region number 100. Note that, if no physical entities are defined, all the elements in the mesh will be directly saved with their default orientation and with a region number equal to the number of the elementary entity they discretize.
7.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:
116
Gmsh 1.63
Translate {-0.05, 0, 0} { Point{3}; } // The resulting point can also be duplicated and translated by 0.1 // along the y axis: tmp[] = Translate {0, 0.1, 0} { Duplicata{ Point{3}; } } ; // In this case, we assigned the result of the Translate command to a // list, so that we can retrieve the number of the newly created point // and use it to create new lines and a new surface: Line(7) = {3,tmp[0]}; Line(8) = {tmp[0],5}; Line Loop(10) = {5,-8,-7,3}; Plane Surface(11) = {10}; // // // // Of course, these transformation commands not only apply to points, but also to lines and surfaces. We can for example translate a copy of surface 6 by 0.12 units along the z axis and define some additional lines and surfaces with:
h = 0.12; Translate {0, 0, h} { Duplicata{ Surface{6}; } } Line(106) Line(107) Line(108) Line(109) Line Line Line Line // // // // // = = = = {1,8}; {2,12}; {3,16}; {4,7}; = = = = {1,107,-103,-106}; {2,107,104,-108}; {3,109,-105,-108}; {4,106,-102,-109}; Plane Plane Plane Plane Surface(111) Surface(113) Surface(115) Surface(117) = = = = {110}; {112}; {114}; {116};
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:
Surface Loop(118) = {117,-6,111,-113,101,115}; Volume(119) = {118}; // Another way to define a volume is by extruding a surface. The // following command extrudes the surface 11 along the z axis and // automatically creates a new volume:
Chapter 7: Tutorial
117
Extrude {0, 0, h} { Surface{11}; } // All these geometrical transformations automatically generate new // elementary entities. The following command permits to manually // specify a characteristic length for some of the new points: Characteristic Length {tmp[0], 2, 12, 3, 16, 6, 22} = lc * 4; // // // // // // // // // 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 119 and 120 // with a common region number, we finally define a physical // volume: Physical Volume (1) = {119,120};
7.3 t3.geo
/********************************************************************* * * Gmsh tutorial 3 * * Extruded meshes, options * *********************************************************************/ // Again, we start by including the first tutorial: Include "t1.geo"; // // // // // // 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 the number of layers (4 in this case, with 8, 4, 2 and 1 subdivisions, respectively), with volume numbers 9000 to 9003 and respective heights equal to h/4:
h = 0.1;
118
Gmsh 1.63
Extrude {0,0,h} { Surface{6}; Layers{ {8,4,2,1}, {9000:9003}, {0.25,0.5,0.75,1} }; } // // // // // The extrusion can also be performed with a rotation instead of a translation, and the resulting mesh can be recombined into prisms (wedges). 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{122}; Layers { 7, 9004, 1 }; 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: aa[] = Extrude { {-2*h,0,0}, {1,0,0} , {0,0.15,0.25} , Pi/2 } { Surface{news-1}; Layers{ 10, 1 }; Recombine; }; // // // // In this last extrusion command we didnt specify an explicit volume number (which is equivalent to setting it to "0"), which means that the elements will simply belong the automatically created volume (whose number we get from the aa[] list).
// We finally define a new physical volume to save all the tetrahedra // with a common region number (101): Physical Volume(101) = {9000:9004, aa[1]}; // // // // // // Let us now change some options... Since all interactive options are accessible in Gmshs scripting language, we can for example define a global characteristic length factor, redefine some background colors, disable the display of the axes, and select an initial viewpoint in XYZ mode (disabling the interactive trackball-like rotation mode) directly in the input file:
Mesh.CharacteristicLengthFactor = 4; General.Color.Background = {120,120,120}; General.Color.Foreground = {255,255,255}; General.Color.Text = White; Geometry.Color.Points = Orange; General.Axes = 0; General.Trackball = 0; General.RotationCenterGravity = 0;
Chapter 7: Tutorial
119
General.RotationCenterX = 0; General.RotationCenterY = 0; General.RotationCenterZ = 0; General.RotationX = 10; General.RotationY = 70; General.TranslationX = -0.2; // // // // // // Note that all colors can be defined literally or numerically, i.e. General.Color.Background = Red is equivalent to General.Color.Background = {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 click on the ? button in the status bar of the graphic window to see the current values of all options. To save all the options in a file, you can use the File->Save as->Gmsh options menu. To save the current options as the default options for all future Gmsh sessions, you should use the Tools->Options->Save button.
7.4 t4.geo
/********************************************************************* * * Gmsh tutorial 4 * * Built-in functions, holes, strings, mesh color * *********************************************************************/ // As usual, we start by defining some variables, some points and some // lines: 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; ccos = ( -h5*R1 + e2 * Hypot(h5,Hypot(e2,R1)) ) / (h5^2 + e2^2); ssin = Sqrt(1-ccos^2);
120
Gmsh 1.63
Lc1 = 0.01; Lc2 = 0.003; Point(1) = Point(2) = Point(3) = Point(4) = Point(5) = Point(6) = Point(7) = Point(8) = Point(9) = Point(10)= Point(11)= Point(12)= Point(13)= Point(14)= Point(15)= Point(16)= Point(17)= Point(18)= Point(19)= Point(20)= Point(21)= Point(22)= Point(23)= { { { { { { { { { { { { { -e1-e2, -e1-e2, -e3-r , -e3-r , -e3 , -e3 , e3 , e3 , e3+r , e3+r , e1+e2, e1+e2, e2 , 0.0 , h1 , h1 , h1+r , h1+r , h1+h2, h1+h2, h1+r , h1+r , h1 , h1 , 0.0 , 0.0 , 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 , , , , , , , , , , , , , Lc1}; Lc1}; Lc2}; Lc2}; Lc2}; Lc1}; Lc1}; Lc2}; Lc2}; Lc2}; Lc1}; Lc1}; Lc1}; , , , , Lc2}; Lc2}; Lc2}; Lc1};
{ R1 / ssin , h5+R1*ccos, 0.0 { 0.0 , h5 , 0.0 { -R1 / ssin , h5+R1*ccos, 0.0 { -e2 , 0.0 , 0.0 { -R2 { -R2 { 0.0 { R2 { R2 { 0.0 , , , , , , h1+h3 , h1+h3+h4, h1+h3+h4, h1+h3+h4, h1+h3 , h1+h3 , 0.0 0.0 0.0 0.0 0.0 0.0 , , , , , , Lc2}; Lc2}; Lc2}; Lc2}; Lc2}; Lc2};
= {1 ,17}; = {17,16};
Since not all curves are straight lines, Gmsh provides many other curve primitives: splines, B-splines, circle arcs, ellipse arcs, etc. Here we define a new circle arc, starting at point 14 and ending at point 16, with the circles center being the point 15:
Circle(3) = {14,15,16}; // Note that, in Gmsh, circle arcs should always be stricly smaller // than Pi. We can then define additional lines and circles, as well // as a new surface:
Chapter 7: Tutorial
121
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 it 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}; // Finally, we can add some comments by embedding a post-processing // view containing some strings, and change the color of some mesh // entities: View "comments" { // 10 pixels from the left and 15 pixels from the top of the graphic // window: T2(10,15,0){StrCat("File created on ", Today)}; // 10 pixels from the left and 10 pixels from the bottom of the // graphic window: T2(10,-10,0){"Copyright (C) My Company"}; // in the model, at (X,Y,Z) = (0.0,0.11,0.0): T3(0,0.11,0,0){"Hole"}; }; Color Grey70{ Surface{ 22 }; } Color Purple{ Surface{ 24 }; } Color Red{ Line{ 1:14 }; }
122
Gmsh 1.63
7.5 t5.geo
/********************************************************************* * * Gmsh tutorial 5 * * Characteristic lengths, arrays of variables, functions, loops * *********************************************************************/ // Again, we start be defining some characteristic lengths: lcar1 = .1; lcar2 = .0005; lcar3 = .055; // // // // // // // // // // // // // // // // If we wanted to change these lengths 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 -clscale 1 this input file produces a mesh of approximately 2,500 nodes and 13,000 tetrahedra (in 4 seconds on a 1.2GHz PC). With > gmsh t5 -clscale 0.2 (i.e. with all characteristic lengths divided by 5), the mesh counts approximately 260,000 nodes and 1.6 million tetrahedra (and the computation takes 16 minutes on the same machine).
// Let us proceed by defining some elementary entities describing a // truncated cube: Point(1) = {0.5,0.5,0.5,lcar2}; Point(3) = {0,0.5,0.5,lcar1}; Point(5) = {0.5,0,0.5,lcar1}; Point(7) = {0,0.5,0,lcar1}; Point(9) = {1,1,0,lcar1}; Point(11) = {0,1,1,lcar1}; Point(13) = {1,0,1,lcar1}; Point(2) = {0.5,0.5,0,lcar1}; Point(4) = {0,0,0.5,lcar1}; Point(6) = {0.5,0,0,lcar1}; Point(8) = {0,1,0,lcar1}; Point(10) = {0,0,1,lcar1}; Point(12) = {1,1,1,lcar1}; Point(14) = {1,0,0,lcar1};
Chapter 7: Tutorial
123
Line(1) = {8,9}; Line(4) = {11,8}; Line(7) = {13,12}; Line(10) = {10,4}; Line(13) = {6,2}; Line(16) = {3,7}; Line(19) = {5,1}; Line Line Line Line Line Line Line Line Line Loop(22) Loop(24) Loop(26) Loop(28) Loop(30) Loop(32) Loop(34) Loop(36) Loop(38) = = = = = = = = =
Line(2) = {9,12}; Line(5) = {9,14}; Line(8) = {11,10}; Line(11) = {4,5}; Line(14) = {2,1}; Line(17) = {7,2}; Line(20) = {7,8};
Line(3) = {12,11}; Line(6) = {14,13}; Line(9) = {10,13}; Line(12) = {5,6}; Line(15) = {1,3}; Line(18) = {3,4}; Line(21) = {6,14}; {22}; {24}; {26}; {28}; {30}; {32}; {34}; = {36}; {38};
{-11,-19,-15,-18}; Plane Surface(23) = {16,17,14,15}; Plane Surface(25) = {-17,20,1,5,-21,13}; Plane Surface(27) = {-4,-1,-2,-3}; Plane Surface(29) = {-7,2,-5,-6}; Plane Surface(31) = {6,-9,10,11,12,21}; Plane Surface(33) = {7,3,8,9}; Plane Surface(35) = {-10,18,-16,-20,4,-8}; Plane Surface(37) {-14,-13,-12,19}; Plane Surface(39) =
// Instead of using included files, let us now use a user-defined // function in order to carve some holes in the cube: Function CheeseHole // // // // // // // p1 p2 p3 p4 p5 p6 p7 c1 c2 c3 c4 c5 c6 c7 c8 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 newc, news, newv and newreg select the highest number amongst currently defined curves, surfaces, volumes and any entities other than points, respectively.) = = = = = = = = = = = = = = = newp; newp; newp; newp; newp; newp; newp; Point(p1) Point(p2) Point(p3) Point(p4) Point(p5) Point(p6) Point(p7) = = = = = = = {x, y, z, lcar3} {x+r,y, z, lcar3} {x, y+r,z, lcar3} {x, y, z+r,lcar3} {x-r,y, z, lcar3} {x, y-r,z, lcar3} {x, y, z-r,lcar3} = = = = = = = = {p2,p1,p7}; {p7,p1,p5}; {p5,p1,p4}; {p4,p1,p2}; {p2,p1,p3}; {p3,p1,p5}; {p5,p1,p6}; {p6,p1,p2}; ; ; ; ; ; ; ;
124
Gmsh 1.63
c9 = newreg; Circle(c9) = c10 = newreg; Circle(c10) c11 = newreg; Circle(c11) c12 = newreg; Circle(c12)
// We need non-plane surfaces to define the spherical cheese // holes. Here we use ruled surfaces, which can have 3 or 4 // sides: l1 l2 l3 l4 l5 l6 l7 l8 // // // // = = = = = = = = newreg; newreg; newreg; newreg; newreg; newreg; newreg; newreg; Line Line Line Line Line Line Line Line Loop(l1) Loop(l2) Loop(l3) Loop(l4) Loop(l5) Loop(l6) Loop(l7) Loop(l8) = = = = = = = = {c5,c10,c4}; Ruled {c9,-c5,c1}; Ruled {c12,-c8,-c1}; Ruled {c8,-c4,c11}; Ruled {-c10,c6,c3}; Ruled {-c11,-c3,c7}; Ruled {-c2,-c7,-c12};Ruled {-c6,-c9,c2}; Ruled Surface(newreg) Surface(newreg) Surface(newreg) Surface(newreg) Surface(newreg) Surface(newreg) Surface(newreg) Surface(newreg) = = = = = = = = {l1}; {l2}; {l3}; {l4}; {l5}; {l6}; {l7}; {l8};
Please note that all surface meshes are generated by projecting a 2D planar mesh onto the surface, and that this method gives nice results only if the surfaces curvature is small enough. If not, you will have to cut the surface in pieces.
// We then use an array of variables to store the surface loops // identification numbers 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 ; Call CheeseHole ;
Chapter 7: Tutorial
125
// 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):
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 ; Surface Loop(theloops[0]) = {35,31,29,37,33,23,39,25,27} ; // // // // The volume of the cube, without the 5 cheese holes, is now defined by 6 surface loops (the exterior surface and the five interior loops). To reference an array of variables, its identifier is followed by []:
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 ;
7.6 t6.geo
/********************************************************************* * * Gmsh tutorial 6 * * Transfinite meshes * *********************************************************************/ // We start by defining a more complex geometry, using the same // commands as in the previous examples:
126
Gmsh 1.63
= = = = = =
nbpt_phi = 5 ; nbpt_int = 20 ; nbpt_arc1 = 10 ; nbpt_arc2 = 10 ; nbpt_shell = 10 ; nbpt_far = 25 ; nbpt_inf = 15 ; lc0 = 0.1 ; lc1 = 0.1 ; lc2 = 0.3 ; Point(1) Point(2) Point(3) Point(4) Point(5) Point(6) Point(7) Point(8) Point(9) Point(10) Point(11) Point(12) Point(13) Point(14) Point(15) Point(16) Point(17) Point(18) Point(19) Point(20) = = = = = = = = = = = = = = = = = = = = {0, {r_int, {r_ext, {r_far, {r_inf, {0, 0, {0, 0, {0, 0, {0, 0, 0, 0, lc0} ; 0, 0, lc0} ; 0, 0, lc1} ; 0, 0, lc2} ; 0, 0, lc2} ; r_int, lc0} ; r_ext, lc1} ; r_far, lc2} ; r_inf, lc2} ; r_int*Sin(phi1), r_ext*Sin(phi1), r_far*Sin(phi1), r_inf*Sin(phi1), 0, 0, 0, 0, lc0} lc1} lc2} lc2} ; ; ; ;
{r_int/2, 0, 0, lc2} ; {r_int/2*Cos(phi1), r_int/2*Sin(phi1), 0, lc2} ; {r_int/2, 0, r_int/2, lc2} ; {r_int/2*Cos(phi1), r_int/2*Sin(phi1), r_int/2, lc2} ; {0, 0, r_int/2, lc2} ; {r_int*Cos(angl), 0, r_int*Sin(angl), lc2} ; {r_int*Cos(angl)*Cos(phi1), r_int*Cos(angl)*Sin(phi1), r_int*Sin(angl), lc2} ; {r_ext*Cos(angl), 0, r_ext*Sin(angl), lc2} ; {r_ext*Cos(angl)*Cos(phi1), r_ext*Cos(angl)*Sin(phi1), r_ext*Sin(angl), lc2} ; {r_far*Cos(angl), 0, r_far*Sin(angl), lc2} ; {r_far*Cos(angl)*Cos(phi1), r_far*Cos(angl)*Sin(phi1), r_far*Sin(angl), lc2} ; {r_inf, 0, r_inf, lc2} ; {r_inf*Cos(phi1), r_inf*Sin(phi1), r_inf, lc2} ; Circle(2) = {19,1,6}; Circle(3) = {3,1,21};
Circle(1) = {2,1,19};
Chapter 7: Tutorial
127
Circle(4) = Line(7) = Circle(9) = Circle(12)= Line(15) = Circle(17)= Circle(20)= Circle(23)= Line(25) Line(28) Line(31) Line(34) Line(37) Line(40) Line(43) Line(46) Line(49) Line(52) Line Line Line Line Line Line Line Line Line Line Line Line Line Line Line Line Line Line Line Line Line Line Line Line Line Line Line = = = = = = = = = =
{21,1,7}; {5,25}; {10,1,20}; {22,1,7}; {13,26}; {19,1,20}; {25,1,26}; {4,1,12}; {1,14}; {3,4}; {15,10}; {12,13}; {15,17}; {18,17}; {6,7}; {21,23}; {20,22}; {7,8};
Circle(6) = {23,1,8}; Circle(11) = {11,1,22}; Circle(14) = {24,1,8}; Circle(19) = {23,1,24}; Circle(22) = {3,1,11};
Line(26) Line(29) Line(32) Line(35) Line(38) Line(41) Line(44) Line(47) Line(50) Line(53)
{14,2}; {4,5}; {10,11}; {14,15}; {16,17}; {1,18}; {16,19}; {23,25}; {22,24}; {8,9}; Ruled Ruled Ruled Ruled Ruled Ruled Ruled Ruled Ruled Ruled Ruled Ruled Ruled Ruled Ruled Ruled Ruled Ruled Ruled Ruled Ruled Ruled Ruled Ruled Ruled Ruled Ruled
= = = = = = = = =
Loop(54) = {39,-36,-25,41}; Loop(56) = {44,-1,-26,36}; Loop(58) = {3,-45,-1,27}; Loop(60) = {5,-46,-3,28}; Loop(62) = {7,-47,-5,29}; Loop(64) = {-2,-44,-39,42}; Loop(66) = {-4,-45,2,43}; Loop(68) = {-6,-46,4,52}; Loop(70) = {-8,-47,6,53}; Loop(72) = {-40,-41,30,37}; Loop(74) = {48,-9,-31,37}; Loop(76) = {49,-11,-32,9}; Loop(78) = {-50,-11,33,13}; Loop(80) = {-51,-13,34,15}; Loop(82) = {10,-42,40,48}; Loop(84) = {12,-43,-10,49}; Loop(86) = {14,-52,-12,50}; Loop(88) = {16,-53,-14,51}; Loop(90) = {-30,25,35}; Loop(92) = {-40,39,38}; Loop(94) = {37,-38,-36,35}; Loop(96) = {-48,-38,44,17}; Loop(98) = {18,-49,-17,45}; Loop(100) = {19,-50,-18,46}; Loop(102) = {20,-51,-19,47}; Loop(104) = {-2,17,10}; Loop(106) = {-9,-21,1,17};
Surface(55) = {54}; Surface(57) = {56}; Surface(59) = {58}; Surface(61) = {60}; Surface(63) = {62}; Surface(65) = {64}; Surface(67) = {66}; Surface(69) = {68}; Surface(71) = {70}; Surface(73) = {72}; Surface(75) = {74}; Surface(77) = {76}; Surface(79) = {78}; Surface(81) = {80}; Surface(83) = {82}; Surface(85) = {84}; Surface(87) = {86}; Surface(89) = {88}; Surface(91) = {90}; Surface(93) = {92}; Surface(95) = {94}; Surface(97) = {96}; Surface(99) = {98}; Surface(101) = {100}; Surface(103) = {102}; Surface(105) = {104}; Surface(107) = {106};
128
Gmsh 1.63
Line Line Line Line Line Line Line Line Line Line
Loop(108) Loop(110) Loop(112) Loop(114) Loop(116) Loop(118) Loop(120) Loop(122) Loop(124) Loop(126)
= = = = = = = = = =
{-4,18,12}; {-11,-22,3,18}; {-13,-23,5,19}; {-6,19,14}; {-15,-24,7,20}; {-8,20,16}; {-31,-35,26,21}; {32,-22,-27,21}; {33,-23,-28,22}; {34,-24,-29,23};
Ruled Ruled Ruled Ruled Ruled Ruled Ruled Ruled Ruled Ruled
Surface(109) Surface(111) Surface(113) Surface(115) Surface(117) Surface(119) Surface(121) Surface(123) Surface(125) Surface(127)
= = = = = = = = = =
{108}; {110}; {112}; {114}; {116}; {118}; {120}; {122}; {124}; {126};
Surface Loop(128) = {93,-73,-55,95,-91}; Volume(129) = {128}; // int Surface Loop(130) = {107,-75,-97,95,57,121}; Volume(131) = {130}; // int b Surface Loop(132) = {105,-65,-97,-83,-93}; Volume(133) = {132}; // int h Surface Loop(134) = {99,-111,77,123,59,107}; Volume(135) = {134}; // shell b Surface Loop(136) = {99,-109,67,105,85}; Volume(137) = {136}; // shell h Surface Loop(138) = {113,79,-101,-111,-125,-61}; Volume(139) = {138}; // ext b Surface Loop(140) = {115,-69,-101,-87,-109}; Volume(141) = {140}; // ext h Surface Loop(142) = {103,-117,-81,113,127,63}; Volume(143) = {142}; // inf b Surface Loop(144) = {89,-119,71,103,115}; Volume(145) = {144}; // inf h // Once the geometry is defined, we then add transfinite mesh commands // in order to explicitly define a structured mesh. // 1. Transfinite line commands specify the number of points on the // curves and their distribution (Progression 2 means that each line // element in the series will be twice as long as the preceding one): Transfinite Transfinite Transfinite Transfinite Transfinite Transfinite Transfinite Line{35,21,22,23,24,38,17,18,19,20} = nbpt_phi ; Line{31,26,48,44,42} = nbpt_int Using Progression Line{41,37,36,9,11,1,3,13,5,15,7} = nbpt_arc1 ; Line{30,25,40,39,10,2,12,4,14,6,16,8} = nbpt_arc2 Line{32,27,49,45,43} = nbpt_shell ; Line{33,28,46,50,52} = nbpt_far Using Progression Line{34,29,51,47,53} = nbpt_inf Using Progression
// 2. Transfinite surfaces are defined by an ordered list of the // points on their boundary (the ordering of these points defines the
Chapter 7: Tutorial
129
// ordering of the mesh elements). Note that a transfinite surface can // only have 3 or 4 sides: Transfinite Transfinite Transfinite Transfinite Transfinite Transfinite Transfinite Transfinite Transfinite Transfinite Transfinite Transfinite Transfinite Transfinite Transfinite Transfinite Transfinite Transfinite Transfinite Transfinite Transfinite Transfinite Transfinite Transfinite Transfinite Transfinite Transfinite Transfinite Transfinite Transfinite Transfinite Transfinite Transfinite Transfinite Transfinite Transfinite Transfinite Surface{55} = {1,14,16,18}; Surface{57} = {14,2,19,16}; Surface{59} = {2,3,21,19}; Surface{61} = {3,4,23,21}; Surface{63} = {4,5,25,23}; Surface{73} = {1,15,17,18}; Surface{75} = {15,10,20,17}; Surface{77} = {10,11,22,20}; Surface{79} = {11,12,24,22}; Surface{81} = {12,13,26,24}; Surface{65} = {18,16,19,6}; Surface{67} = {6,19,21,7}; Surface{69} = {7,21,23,8}; Surface{71} = {8,23,25,9}; Surface{83} = {17,18,6,20}; Surface{85} = {20,6,7,22}; Surface{87} = {22,7,8,24}; Surface{89} = {24,8,9,26}; Surface{91} = {1,14,15}; Surface{95} = {15,14,16,17}; Surface{93} = {18,16,17}; Surface{121} = {15,14,2,10}; Surface{97} = {17,16,19,20}; Surface{123} = {10,2,3,11}; Surface{99} = {20,19,21,22}; Surface{107} = {10,2,19,20}; Surface{105} = {6,20,19}; Surface{109} = {7,22,21}; Surface{111} = {11,3,21,22}; Surface{101} = {22,21,23,24}; Surface{125} = {11,3,4,12}; Surface{115} = {8,24,23}; Surface{113} = {24,12,4,23}; Surface{127} = {12,13,5,4}; Surface{103} = {24,23,25,26}; Surface{119} = {9,26,25}; Surface{117} = {13,5,25,26};
// 3. Transfinite volumes are also defined by an ordered list of the // points on their boundary (the ordering defines the ordering of the // mesh elements). A transfinite volume can only have 6 or 8 faces: Transfinite Volume{129} = {1,14,15,18,16,17}; Transfinite Volume{131} = {17,16,14,15,20,19,2,10};
130
Gmsh 1.63
= = = = = = =
// As with Extruded meshes, the Recombine command tells Gmsh to // recombine the simplices into quadrangles, prisms or hexahedra when // possible: Recombine Surface {55:127}; // We finish by defing some physical entities: VolInt SurfIntPhi0 SurfIntZ0 VolShell SurfShellInt SurfShellPhi0 SurfShellZ0 LineShellIntPhi0 LineShellIntPhi1 PointShellInt VolExt VolInf SurfInf SurfExtInfPhi0 SurfExtInfZ0 SurfInfRight SurfInfTop Physical Physical Physical Physical Physical Physical Physical Physical Physical Physical Volume Surface Surface Surface Volume Surface Surface Surface Surface Surface = 1000 ; = 1001 ; = 1003 ; = = = = = = = = = = = = = = 2000 2001 2003 2005 2006 2007 2009 3000 3001 3002 3003 3005 3006 3007 ; ; ; ; ; ; ; ; ; ; ; ; ; ;
SurfIntPhi1
= 1002 ;
SurfShellExt SurfShellPhi1
= 2002 ; = 2004 ;
LineShellIntZ0
= 2008 ;
SurfExtInfPhi1
= 3004 ;
(VolInt) (SurfIntPhi0) (SurfIntPhi1) (SurfIntZ0) (VolShell) (SurfShellInt) (SurfShellExt) (SurfShellPhi0) (SurfShellPhi1) (SurfShellZ0)
= = = = = = = = = =
{129,131,133} ; {55,57,65} ; {73,75,83} ; {91,121} ; {135,137} ; {105,107} ; {109,111} ; {59,67} ; {77,85} ; {123} ;
Chapter 7: Tutorial
131
Physical Line (LineShellIntPhi0) = {1,2} ; Physical Line (LineShellIntPhi1) = {9,10} ; Physical Line (LineShellIntZ0) = 21 ; //Physical Point (PointShellInt) = 6 ; Physical Physical Physical Physical Physical Physical Physical Volume Volume Surface Surface Surface Surface Surface (VolExt) (VolInf) (SurfExtInfPhi0) (SurfExtInfPhi1) (SurfExtInfZ0) (SurfInfRight) (SurfInfTop) = = = = = = = {139,141} ; {143,145} ; {61,63,69,71} ; {79,87,81,89} ; {125,127} ; {117} ; {119} ;
7.7 t7.geo
/********************************************************************* * * Gmsh tutorial 7 * * Anisotropic meshes, attractors * *********************************************************************/ // The anisotropic 2D mesh generator can be selected with: Mesh.Algorithm = 2 ; // One can force a 4 step Laplacian smoothing of the mesh with: Mesh.Smoothing = 4 ; lc = .1; Point(1) Point(2) Point(3) Point(4) Line(1) Line(2) Line(3) Line(4) = = = = = = = = {0.0,0.0,0,lc}; {1.2,-0.2,0,lc}; {1,1,0,lc}; {0,1,0,lc}; {3,2}; {2,1}; {1,4}; {4,3};
132
Gmsh 1.63
Point(5) = {0.1,0.2,0,lc}; Point(11) = {0.4,0.7,-1,lc}; Point(12) = {0.5,0.5,0,lc}; Point(22) = {0.9,0.9,1,lc}; Line(5) = {11,22}; Spline(7) = {4,5,12,2}; // Isotropic and anisotropic attractors can be defined on points and // lines (this is still experimental and known to be unstable: use at // your own risk!): Attractor Point{1} = {0.01, 0.01, 2}; Attractor Line{5} = {0.3, 0.01, 2}; Attractor Line{7} = {0.1, 0.02, 8};
7.8 t8.geo
/********************************************************************* * * Gmsh tutorial 8 * * Post-processing, scripting, animations, options * *********************************************************************/ // We first include t1.geo as well as some post-processing views: Include Include Include Include "t1.geo" ; "view1.pos" ; "view1.pos" ; "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 ; General.Color.Text = Black ;
Chapter 7: Tutorial
133
General.Orthographic = 0 ; General.Axes = 0 ; General.SmallAxes = 0 ; // We also set some options for each post-processing view: v0 v1 v2 v3 = = = = PostProcessing.NbViews-4; v0+1; v0+2; 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 255 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 ;
134
Gmsh 1.63
= = = =
t t t t
; ; ; ;
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 320x240 frames when num == 3: General.GraphicsWidth = 320 ; General.GraphicsHeight = 240 ; EndIf // It is possible to nest loops: For num2 In {1:50} General.RotationX += 10 ; General.RotationY = General.RotationX / 3 ; General.RotationZ += 0.1 ; Sleep 0.01; // sleep for 0.01 second Draw; // draw the scene 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.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: // // System "mpeg_encode t8.par"; // with mencoder:
Chapter 7: Tutorial
135
// // 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
7.9 t9.geo
/********************************************************************* * * Gmsh tutorial 9 * * Post-processing, plugins * *********************************************************************/ // // // // // // // // 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. CutMap, 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 CutMap plugin (which extracts an // isovalue surface from a 3D scalar view), and run it: Plugin(CutMap).A = 0.67 ; // iso-value level Plugin(CutMap).iView = 0 ; // source view is View[0] Plugin(CutMap).Run ; // We also set some options for the CutPlane plugin (which computes
136
Gmsh 1.63
// a section of a 3D view), and then run it: Plugin(CutPlane).A = Plugin(CutPlane).B = Plugin(CutPlane).C = Plugin(CutPlane).D = Plugin(CutPlane).Run // Add a title Plugin(Annotate).Text = "A nice title" ; // By convention, 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).X = 1.e5; Plugin(Annotate).Y = 50 ; Plugin(Annotate).Font = "Times-BoldItalic" ; Plugin(Annotate).FontSize = 28 ; Plugin(Annotate).Align = "Center" ; Plugin(Annotate).Run ; Plugin(Annotate).Text = "(and a small subtitle)" ; Plugin(Annotate).Y = 70 ; Plugin(Annotate).Font = "Times-Roman" ; Plugin(Annotate).FontSize = 12 ; Plugin(Annotate).Run ; // We finish by setting some options and redrawing the scene: General.BackgroundGradient = 1; View[0].Light = 1; View[0].IntervalsType = 1; View[0].NbIso = 6; View[0].SmoothNormals = 1; View[1].IntervalsType = 2; View[2].IntervalsType = 2; Draw; 0 ; 0.2 ; 1 ; 0 ; ;
137
8 Running Gmsh
8.1 Interactive mode
Gmshs rst operating mode is the interactive graphical mode. To launch Gmsh in interactive mode, just click or double-click on the Gmsh icon (Windows and Mac), or type > gmsh at your shell prompt in a terminal (Unix). This will open two windows: the graphic window (with a status bar at the bottom) and the menu window (with a menu bar and some context-dependent buttons). To open the rst tutorial le (see Chapter 7 [Tutorial], page 113), select the File->Open menu, and choose t1.geo in the input eld. When using a terminal, you can also specify the le 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 module menu) and choose the required dimension in the context-dependent buttons (1D will mesh all the lines; 2D will mesh all the surfacesas well as all the lines if 1D was not called before; 3D will mesh all the volumesand all the surfaces if 2D was not called before). To save the resulting mesh in the current mesh format, choose Save in the context-dependent buttons, or select the appropriate format with the File->Save As menu. The default mesh le name is based on the name of the rst input le on the command line (or untitled if there wasnt any input le given), with an appended extension depending on the mesh format1 . To create a new geometry or to modify an existing geometry, select Geometry in the module menu, and follow the context-dependent buttons. 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 nish 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 project le. You can edit this project le by hand at any time by pressing the Edit button in the Geometry menu and then reloading the project by pressing Reload. For example, it is often faster to dene variables and points directly in the project le, and then use the graphical user interface to dene the lines, the surfaces and the volumes interactively. Several les can be loaded simultaneously in Gmsh. The rst one denes the project, while the others are appended (merged) to this project. You can merge such les with the File->Merge menu, or by directly specifying the names of the les on the command line. For example, to merge the post-processing views contained in the les view1.pos and view2.pos together with the geometry of the rst tutorial t1.geo, you can type the following command: > gmsh t1.geo view1.pos view2.pos In the Post-Processing module (select Post-Processing in the module menu), two view buttons will appear, respectively labeled a scalar map and a vector map. A mouse click
1
Nearly all the interactive commands have shortcuts: see Section 8.5 [Keyboard shortcuts], page 141, or select Help->Keyboard Shortcuts in the menu.
138
Gmsh 1.63
on the name will toggle the visibility of the selected view, while a click on the arrow button on the right will provide access to the views options. If you want the modications made to one view to aect also all the other views, select the Apply next changes to all views or Force same options for all views option in the Tools->Options->Post-processing menu. Note that all the options specied interactively can also be directly specied in the ASCII input les. All available options, with their current values, can be saved into a le by selecting File->Save As->Gmsh options, or simply viewed by pressing the ? button in the status bar. To save the current options as your default preferences for all future Gmsh sessions, use the Tools->Options->Save button.
Mesh options: -1, -2, -3 Perform batch 1D, 2D and 3D mesh generation -saveall -o file Save all elements (discard physical group denitions) Specify mesh output le name
-format string Set output mesh format (msh, unv, gref, stl, p3d) -algo string Select mesh algorithm (iso, tri, aniso, netgen) -smooth int Set number of mesh smoothing steps -optimize Optimize quality of tetrahedral elements
2
If you compile Gmsh without the graphical user interface, i.e., with ./configure --disable-gui, this is the only mode you have access to.
139
-order int Set the order of the generated elements (1, 2) -scale float Set global scaling factor -meshscale float Set mesh scaling factor -clscale float Set characteristic length scaling factor -rand float Set random perturbation factor -bgm file Load background mesh from le -constrain Constrain background mesh with characteristic lengths -histogram Print mesh quality histogram -extrude -recombine Recombine meshes from old extrusion mesh generator -interactive Display 2D mesh construction interactively Post-processing options: -noview Hide all views on startup Use old extrusion mesh generator
-link int Select link mode between views (0, 1, 2, 3, 4) -smoothview Smooth views -combine Combine views having identical names into multi-time-step views
-fontsize int Specify the font size for the GUI -scheme string Specify FLTK GUI scheme -display string Specify display Other options:
140
Gmsh 1.63
-a, -g, -m, -s, -p Start in automatic, geometry, mesh, solver or post-processing mode -pid -listen -v int -nopopup Print pid on stdout Always listen to external solver requests Set verbosity level Dont popup dialog windows in scripts
-string "string" Parse option string at startup -option file Parse option le at startup -convert file file Perform batch conversion of views and meshes into latest le formats -version -info -help Show version number Show detailed version information Show this message
Ctrl+Left button: Start a lasso zoom or a lasso selection Middle button: Zoom Unselect an entity Cancel a lasso zoom or a lasso selection Ctrl+Middle button: Orthogonalize display Right button: Pan Cancel a lasso zoom or a lasso selection Pop-up menu on post-processing view button Ctrl+Right button: Reset to default viewpoint
141
Down arrow Make next view visible < > 0 1 or F1 2 or F2 3 or F3 Escape g m p s Shift+a Shift+g Shift+m Shift+o Shift+p Shift+s Shift+w Ctrl+i Ctrl+l Ctrl+n Ctrl+o Ctrl+q Go back to previous context Go forward to next context Reload project le Mesh lines Mesh surfaces Mesh volumes Cancel lasso zoom/selection, toggle mouse selection ON/OFF Go to geometry module Go to mesh module Go to post-processing module Go to solver module Bring all windows to front Show geometry options Show mesh options Show general options Show post-processing options Show solver options Show post-processing view options Show statistics window Show message console Create new project le Open project le Quit
142
Gmsh 1.63
Show clipping plane window Shift+Ctrl+m Show manipulator window Shift+Ctrl+n Show option window Shift+Ctrl+o Merge le(s) Shift+Ctrl+s Save mesh in default format Shift+Ctrl+v Show visibility window Alt+a Alt+b Alt+c Alt+d Alt+f Alt+g Alt+h Alt+i Alt+l Alt+m Alt+n Alt+o Alt+p Alt+s Alt+t Alt+v Alt+w Alt+x Alt+y Loop through axes modes Hide/show bounding boxes Loop through predened color schemes Change surface mesh display mode (solid/wireframe) Change redraw mode (fast/full) Loop through grid modes for visible post-processing views Hide/show all post-processing views Hide/show all post-processing view scales Hide/show geometry lines Toggle visibility of all mesh entities Hide/show all post-processing view annotations Change projection mode (orthographic/perspective) Hide/show geometry points Hide/show geometry surfaces Loop through interval modes for visible post-processing views Hide/show geometry volumes Enable/disable all lighting Set X view Set Y view
143
Alt+z Alt+Shift+a
Set Z view
Hide/show small axes Alt+Shift+l Hide/show surface mesh edges Alt+Shift+o Adjust projection parameters Alt+Shift+p Hide/show mesh points Alt+Shift+s Hide/show mesh surfaces Alt+Shift+v Hide/show mesh volumes Alt+Shift+x Set -X view Alt+Shift+y Set -Y view Alt+Shift+z Set -Z view
144
Gmsh 1.63
145
9 File formats
This chapter describes Gmshs native mesh and post-processing le formats. (These formats have version numbers that are independent of Gmshs main version number.) All non-parsed le formats have sections enclosed between $Key and $EndKey tags.
146
Gmsh 1.63
elm-type
denes the geometrical type of the n-th element: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 Line (2 nodes). Triangle (3 nodes). Quadrangle (4 nodes). Tetrahedron (4 nodes). Hexahedron (8 nodes). Prism (6 nodes). Pyramid (5 nodes). Second order line (3 nodes: 2 associated with the vertices and 1 with the edge). Second order triangle (6 nodes: 3 associated with the vertices and 3 with the edges). Second order quadrangle (9 nodes: 4 associated with the vertices, 4 with the edges and 1 with the face). Second order tetrahedron (10 nodes: 4 associated with the vertices and 6 with the edges). Second order hexahedron (27 nodes: 8 associated with the vertices, 12 with the edges, 6 with the faces and 1 with the volume). Second order prism (18 nodes: 6 associated with the vertices, 9 with the edges and 3 with the quadrangular faces). Second order pyramid (14 nodes: 5 associated with the vertices, 8 with the edges and 1 with the quadrangular face). Point (1 node).
See below for the ordering of the nodes. reg-phys reg-elem is the number of the physical entity to which the element belongs. is the number of the elementary entity to which the element belongs.
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 [Gmsh node ordering], page 155; for second order elements, the rst order nodes are given rst, followed by the nodes associated with the edges, followed by the nodes associated with the quadrangular faces (if any), followed by the nodes associated with the volume (if any). The ordering of these additional nodes follows the ordering of the edges and quadrangular faces given in Section 9.3 [Gmsh node ordering], page 155.
147
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. Note that the node-numbers do not have to be given in a consecutive (or even an ordered) way. x-coord y-coord z-coord are the oating 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. Note that the elm-numbers do not have to be given in a consecutive (or even an ordered) way. elm-type denes the geometrical type of the n-th element: 1 2 Line (2 nodes). Triangle (3 nodes).
148
Gmsh 1.63
3 4 5 6 7 8 9 10 11 12 13 14 15
Quadrangle (4 nodes). Tetrahedron (4 nodes). Hexahedron (8 nodes). Prism (6 nodes). Pyramid (5 nodes). Second order line (3 nodes: 2 associated with the vertices and 1 with the edge). Second order triangle (6 nodes: 3 associated with the vertices and 3 with the edges). Second order quadrangle (9 nodes: 4 associated with the vertices, 4 with the edges and 1 with the face). Second order tetrahedron (10 nodes: 4 associated with the vertices and 6 with the edges). Second order hexahedron (27 nodes: 8 associated with the vertices, 12 with the edges, 6 with the faces and 1 with the volume). Second order prism (18 nodes: 6 associated with the vertices, 9 with the edges and 3 with the quadrangular faces). Second order pyramid (14 nodes: 5 associated with the vertices, 8 with the edges and 1 with the quadrangular face). Point (1 node).
See below for the ordering of the nodes. number-of-tags gives the number of tags for the n-th element. By default, Gmsh generates meshes with two tags and reads les with an arbitrary number of tags: see below. tag is an integer tag associated with the n-th element. By default, the rst 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 a mesh partition to which the element belongs.
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 [Gmsh node ordering], page 155; for second order elements, the rst order nodes are given rst, followed by the nodes associated with the edges, followed by the nodes associated with the quadrangular faces (if any), followed by the nodes associated with the volume (if any). The ordering of these additional nodes follows the ordering of the edges and quadrangular faces given in Section 9.3 [Gmsh node ordering], page 155.
149
150
Gmsh 1.63
Scalar tetrahedron Vector tetrahedron Tensor tetrahedron Scalar hexahedron Vector hexahedron Tensor hexahedron Scalar prism Vector prism Tensor prism Scalar pyramid Vector pyramid Tensor pyramid Second order scalar Second order vector Second order tensor Second order scalar Second order vector Second order tensor Second order scalar Second order vector Second order tensor Second order scalar Second order vector Second order tensor Second order scalar Second order vector Second order tensor Second order scalar Second order vector Second order tensor Second order scalar Second order vector Second order tensor 2D text 3D text
line line line triangle triangle triangle quadrangle quadrangle quadrangle tetrahedron tetrahedron tetrahedron hexahedron hexahedron hexahedron prism prism prism pyramid pyramid pyramid
SS VS TS SH VH TH SI VI TI SY VY TY SL2 VL2 TL2 ST2 VT2 TT2 SQ2 VQ2 TQ2 SS2 VS2 TS2 SH2 VH2 TH2 SI2 VI2 TI2 SY2 VY2 TY2 T2 T3
12 12 12 24 24 24 18 18 18 15 15 15 9 9 9 18 18 18 27 27 27 30 30 30 81 81 81 54 54 54 42 42 42 3 4
4 * nb-time-steps 12 * nb-time-steps 36 * nb-time-steps 8 * nb-time-steps 24 * nb-time-steps 72 * nb-time-steps 6 * nb-time-steps 18 * nb-time-steps 54 * nb-time-steps 5 * nb-time-steps 15 * nb-time-steps 45 * nb-time-steps 3 * nb-time-steps 9 * nb-time-steps 27 * nb-time-steps 6 * nb-time-steps 18 * nb-time-steps 54 * nb-time-steps 9 * nb-time-steps 27 * nb-time-steps 81 * nb-time-steps 10 * nb-time-steps 30 * nb-time-steps 90 * nb-time-steps 27 * nb-time-steps 81 * nb-time-steps 243* nb-time-steps 18 * nb-time-steps 54 * nb-time-steps 162* nb-time-steps 14 * nb-time-steps 42 * nb-time-steps 126* nb-time-steps arbitrary arbitrary
The coordinates are given by node1 , 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.
1
Beware that this is dierent from the ordering of the node coordinates in the ASCII and binary postprocessing le formats.
151
The ordering of the nodes is given in Section 9.3 [Gmsh node ordering], page 155. For second order elements, the rst order nodes are given rst, followed by the nodes associated with the edges, followed by the nodes associated with the quadrangular faces (if any), followed by the nodes associated with the volume (if any). The ordering of these additional nodes follows the ordering of the edges and quadrangular faces given in Section 9.3 [Gmsh node ordering], page 155. 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 rst 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 rst (respectively second) expression is negative, the position is measured from the right (respectively bottom) edge of the window. If the value of the rst (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 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 dene the text alignment (0=bottom-left, 1=bottom-center, 2=bottom-right, 3=top-left, 4=topcenter, 5=top-right, 6=center-left, 7=center-center, 8=center-right). For the 3D text objects, the three rst 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. 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.
152
Gmsh 1.63
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 > ... < 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 > ...
153
$EndView where le-type data-size is an integer equal to 0 in the ASCII le format. is an integer equal to the size of the oating point numbers used in the le (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.
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 dened 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 [Gmsh node ordering], page 155. For second order elements, the rst order nodes are given rst, followed by the nodes associated with the edges, followed by the nodes associated with the quadrangular faces (if any), followed by the nodes associated with the volume (if any). The ordering of these additional nodes follows the ordering of the edges and quadrangular faces given in Section 9.3 [Gmsh node ordering], page 155.
154
Gmsh 1.63
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 coordinates (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 bottom) 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 dene 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 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.
155
"%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, 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 containing 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.
156
Gmsh 1.63
Line: edge 1: nodes 1 2 v | | --1-----2--u | | Triangle: v | | 3 |\ | \ |__\___u 1 2 Quadrangle: v | 4--|--3 | | | -----------u | | | 1--|--2 | Tetrahedron: v | | | 3 |\ | \ |__\2_____u 1\ / \4 \ w edge 1: nodes 1 2 2: 2 3 3: 3 1 4: 4 1 5: 4 3 6: 4 2 edge 1: nodes 1 2 2: 2 3 3: 3 4 4: 4 1 quad. face 1: nodes 1 2 3 4 edge 1: nodes 1 2 2: 2 3 3: 3 1
157
Hexahedron: edge 1: nodes 1 2 v 2: 1 4 | 3: 1 5 | 4: 2 3 4----|--3 5: 2 6 |\ | |\ 6: 3 4 | 8-------7 7: 3 7 | | ----|---u 8: 4 8 1-|---\-2 | 9: 5 6 \| \ \| 10: 5 8 5-----\-6 11: 6 7 \ 12: 7 8 w Prism: v 3 | |\| | | 1_|2 \| 6 |_|_\___u \| \ 4 __5 \ \ w Pyramid: v | | 4---|---3 | \ | /| | \ -/-|---u | / 5\ | 1/----\-2 \ \ w edge 1: nodes 1 2 2 1 4 3 1 5 4 2 3 5 2 5 6 3 4 7 3 5 8 4 5 quad. face 1: nodes 1 2 3 4 edge 1: nodes 1 2 2: 1 3 3: 1 4 4: 2 3 5: 2 5 6: 3 6 7: 4 5 8: 4 6 9: 5 6 quad. face 1: nodes 1 2 4 5 2: 1 3 4 6 3: 2 3 5 6 quad. face 1: nodes 1 2 3 4 2: 1 2 5 6 3: 1 4 5 8 4: 2 3 6 7 5: 3 4 7 8 6: 5 6 7 8
158
Gmsh 1.63
159
10 Programming notes
Gmsh was originally written in C, and later enhanced with various C++ additions. The resulting code is a hybrid C/C++ beast, hopefully not too badly structured... The scripting language is parsed using Lex and Yacc (actually, Flex and Bison), while the GUI relies on OpenGL for the 3D graphics and FLTK for the widget set. See http://www.opengl.org, http://www.mesa3d.org and http://www.fltk.org for more information. Gmshs build system is based on autoconf, and should work on most modern platforms providing standard compliant C and C++ compilers. Practical notes on how to compile Gmshs source code are included in the distribution. Note that compiling the Windows version requires the Cygwin tools (freely available from http://www.cygwin.com). See Appendix B [Frequently asked questions], page 177, for more information.
160
Gmsh 1.63
161
11.2 Versions
$Id: VERSIONS,v 1.358 2006/01/30 03:43:18 geuzaine Exp $ New in 1.63: 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. New in 1.62: 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. New in 1.61: 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
162
Gmsh 1.63
improvements. New in 1.60: added support for discrete curves; new Window menu on Mac OS X; generalized all octree-based plugins (CutGrid, StreamLines, Probe, etc.) to handle all element types (and not only scalar and vector triangles+tetrahedra); generalized Plugin(Evaluate), Plugin(Extract) and Plugin(Annotate); enhanced clipping plane interface; new grid/axes/rulers for 3D post-processing views (renamed the AbscissaName, NbAbscissa and AbscissaFormat options to more general names in the process); better automatic positioning of 2D graphs; new manipulator dialog to specify rotations, translations and scalings "by hand"; various small enhancements and bug fixes. New in 1.59: 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 Matlabs "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 Gmshs version number in the parser (to help write backward compatible scripts); fixed white space in unv mesh output; fixed various small bugs. New in 1.58: 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. New in 1.57: 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,
163
Solver.NameCommand, View.ArrowSizeProportional, View.Normals, View.Tangents and General.ClipFactor); fixed display of undesired solver plugin popups; enhanced interactive plugin behavior; new plugins (HarmonicToTime, Integrate, Eigenvectors); tetrahedral mesh file reading speedup (50% faster on large meshes); large memory footprint reduction (up to 50%) for the visualization of triangular/tetrahedral meshes; the solver interface now supports TCP/IP connections; new generalized raise mode (allows to use complex expressions to offset post-processing maps); upgraded Netgen kernel to version 4.4; new optional TIME list in parsed views to specify the values of the time steps; several bug fixes in the Elliptic mesh algorithm; various other small bug fixes and enhancements. New in 1.56: 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. New in 1.55: 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. New in 1.54: 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. New in 1.53: 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
164
Gmsh 1.63
(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. New in 1.52: new raster ("bitmap") PostScript/EPS/PDF output formats; new Plugin(Extract) to extract a given component from a post-processing view; new Plugin(CutGrid) and Plugin(StreamLines); improved mesh projection on non-planar surfaces; added support for second order tetrahedral elements; added interactive control of element order; refined mesh entity drawing selection (and renamed most of the corresponding options); enhanced log scale in post-processing; better font selection; simplified View.Raise{X,Y,Z} by removing the scaling; various bug fixes (default postscript printing mode, drawing of 3D arrows/cylinders on Linux, default home directory on Windows, default initial file browser directory, extrusion of points with non-normalized axes of rotation, computation of the scene bounding box in scripts, + the usual documentation updates). New in 1.51: 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.). New in 1.50: 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.
165
New in 1.49: 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. New in 1.48: 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.). New in 1.47: fixed extrusion of surfaces defined by only two curves; new syntax to retrieve point coordinates and indices of entities created through geometrical transformations; new PDF and compressed PostScript output formats; fixed numbering of elements created with "Extrude Point/Line"; use $GMSH_HOME as home directory if defined. New in 1.46: fixed crash for very long command lines; new options for setting the displacement factor and Triangles parameters + renamed a couple of options to more sensible names (View.VectorType, View.ArrowSize); various small bug fixes; documentation update. New in 1.45: 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. New in 1.44: new reference manual; added support for PNG output; fixed small configure script bugs. New in 1.43: 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)). New in 1.42: 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. New in 1.41: Gmsh is now licensed under the GNU General Public License; general code cleanup (indent). New in 1.40: various small bug fixes (mainly GSL-related).
166
Gmsh 1.63
New in 1.39: removed all non-free routines; more build system work; implemented Von-Mises tensor display for all element types; fixed small GUI bugs. New in 1.38: 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. New in 1.37: generalized smoothing and cuts of post-processing views; better Windows integration (solvers, external editors, etc.); small bug fixes. New in 1.36: 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.). New in 1.35: 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, ...). New in 1.34: 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. New in 1.33: new parameterizable solver interface (allowing up to 5 user-defined solvers); enhanced 2D aniso algorithm; 3D initial mesh speedup. New in 1.32: 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, ...). New in 1.31: 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
167
in unv format; various small fixes. New in 1.30: interface polish; fix crash when extruding quadrangles. New in 1.29: translations and rotations can now be combined in extrusions; fixed coherence bug in Extrude Line; various small bug fixes and additions. New in 1.28: 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. New in 1.27: 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. New in 1.26: enhanced 2D anisotropic mesh generator (metric 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). New in 1.25: 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. New in 1.24: 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 Shewchuks 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. New in 1.23: 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
168
Gmsh 1.63
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). New in 1.22: 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. New in 1.21: 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. New in 1.20: 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. New in 1.19: fixed seg. fault for scalar simplex post-processing; new Solver menu; interface for GetDP solver through sockets; fixed multiple scale alignment; added some options + full option descriptions. New in 1.18: fixed many small bugs and incoherences in post-processing; fixed broken background mesh in 1D mesh generation. New in 1.17: 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. New in 1.16: 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.
169
New in 1.15: added automatic visibility setting during entity selection; corrected geometrical extrusion bug. New in 1.14: 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. New in 1.13: added support for JPEG output on Windows. New in 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. New in 1.11: corrected included file loading problem. New in 1.10: switched from Motif to FLTK for the GUI. Many small tweaks. New in 1.00: added PPM and YUV output; corrected nested If/Endif; Corrected several bugs for pixel output and enhanced GIF output (dithering, transparency); slightly changed the post-processing file format to allow both single and double precision numbers. New in 0.999: added JPEG output and easy MPEG generation (see t8.geo in the tutorial); clean up of export functions; small fixes; Linux versions are now compiled with gcc 2.95.2, which should fix the problems encountered with Mandrake 7.2. New in 0.998: corrected bug introduced in 0.997 in the generation of the initial 3D mesh. New in 0.997: corrected bug in interactive surface/volume selection; Added interactive symmetry; corrected geometrical extrusion with rotation in degenerated or partially degenerated cases; corrected bug in 2D mesh when meshing in the mean plane. New in 0.996: arrays of variables; enhanced Printf and Sprintf; Simplified options (suppression of option arrays). New in 0.995: totally rewritten geometrical database (performance has
170
Gmsh 1.63
been drastically improved for all geometrical transformations, and most notably for extrusion). As a consequence, the internal numbering of geometrical entities has changed: this will cause incompatibilities with old .geo files, and will require a partial rewrite of your old .geo files if these files made use of geometrical transformations. The syntax of the .geo file has also been clarified. Many additions for scripting purposes. New extrusion mesh generator. Preliminary version of the coupling between extruded and Delaunay meshes. New option and procedural database. All interactive operations can be scripted in the input files. See the last example in the tutorial for an example. Many stability enhancements in the 2D and 3D mesh algorithms. Performance boost of the 3D algorithm. Gmsh is still slow, but the performance becomes acceptable. An average 1000 tetrahedra/second is obtained on a 600Mhz computer for a mesh of one million tetrahedra. New anisotropic 2D mesh algorithm. New (ASCII and binary) post-processing file format and clarified mesh file format. New handling for interactive rotations (trackball mode). New didactic interactive mesh construction (watch the Delaunay algorithm in real time on complex geometries: thats exciting ;-). And many, many bug fixes and cleanups. New in 0.992: corrected recombined extrusion; corrected ellipses; added simple automatic animation of post-processing maps; fixed various bugs. New in 0.991: fixed a serious allocation bug in 2D algorithm, which caused random crashes. All users should upgrade to 0.991. New in 0.990: bug fix in non-recombined 3D transfinite meshes. New in 0.989: added ability to reload previously saved meshes; some new command line options; reorganization of the scale menu; GIF output. New in 0.987: fixed bug with smoothing (leading to the possible generation of erroneous 3d meshes); corrected bug for mixed 3D meshes; moved the toggle view link option to Opt->Postprocessing_Options. New in 0.986: fixed overlay problems; SGI version should now also run on 32 bits machines; fixed small 3d mesh bug. New in 0.985: corrected colormap bug on HP, SUN, SGI and IBM versions; corrected small initialization bug in postscript output. New in 0.984: corrected bug in display lists; added some options in Opt->General. New in 0.983: corrected some seg. faults in interactive mode; corrected bug in rotations; changed default window sizes for better match with
171
1024x768 screens (default X resources can be changed: see ex03.geo). New in 0.982: lighting for mesh and post-processing; corrected 2nd order mesh on non plane surfaces; added example 13.
11.3 Credits
$Id: CREDITS,v 1.34 2006/01/06 00:34:33 geuzaine Exp $ Gmsh is copyright (C) 1997-2006 Christophe Geuzaine <christophe.geuzaine at case.edu> and Jean-Francois Remacle <remacle at gce.ucl.ac.be> Major code contributions to Gmsh have been provided by Nicolas Tardieu <ntardieu at giref.ulaval.ca> (help with the GSL integration, new "STL to elementary geometry" interface, Netgen integration). Other code contributors include: David Colignon <David.Colignon at ulg.ac.be> for new colormaps; Patrick Dular <patrick.dular at ulg.ac.be> for transfinite mesh bug fixes; Laurent Stainier <l.stainier at ulg.ac.be> for the eigenvalue solvers and for help with the MacOS port and the tensor display code; Pierre Badel <badel at freesurf.fr> for help with the GSL integration; Marc Ume <Marc.Ume at digitalgraphics.be> for the original list code; Matt Gundry <mjgundry at faa-engineers.com> for the Plot3d mesh format; Jozef Vesely <vesely at gjh.sk> for the Tetgen integration. The AVL tree code (DataStr/avl.*) and the YUV image code (Graphics/gl2yuv.*) 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.
172
Gmsh 1.63
The trackball code (Common/Trackball.*) 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. This version of Gmsh may contain code (in the contrib/ANN subdirectory) copyright (C) 1997-2005 University of Maryland and Sunil Arya and David Mount: check the configuration options. This version of Gmsh may contain code (in the contrib/MathEval subdirectory) based on GNU libmatheval, copyright (C) 1999, 2002, 2003 Free Software Foundation, Inc: check the configuration options. This version of Gmsh may contain code (in the contrib/Netgen subdirectory) copyright (C) 1994-2004, Joachim Sch"oberl: check the configuration options. This version of Gmsh may contain code (in the contrib/Triangle subdirectory) copyright (C) 1993, 1995, 1997, 1998, 2002, Jonathan Richard Shewchuk: check the configuration options. This version of Gmsh may contain code (in the contrib/Tetgen subdirectory) copyright (C) 2002, 2004 Hang Si: check the configuration options. This version of Gmsh may contain code (in the contrib/Metis subdirectory) written by George Karypis (karypis at cs.umn.edu), copyright (C) 1998, Regents of the University of Minnesota: check the
173
configuration options. Special thanks to Bill Spitzak <spitzak at users.sourceforge.net>, Michael Sweet <easysw at users.sourceforge.net>, Matthias Melcher <mm at matthiasm.com> and others for the Fast Light Tool Kit on which Gmshs GUI is based. See http://www.fltk.org for more info on this excellent object-oriented, cross-platform toolkit. 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 <juanabanto at yahoo.com>, Olivier Adam <o.adam at ulg.ac.be>, Guillaume Alleon <guillaume.alleon at airbus.aeromatra.com>, Eric Bechet <eric.bechet at epost.de>, Laurent Champaney <laurent.champaney at meca.uvsq.fr>, Pascal Dupuis <Pascal.Dupuis at esat.kuleuven.ac.be>, Philippe Geuzaine <geuzaine at gnat.colorado.edu>, Johan Gyselinck <johan.gyselinck at ulg.ac.be>, Francois Henrotte <fhenrott at esat.kuleuven.ac.be>, Benoit Meys <bmeys at techspace-aero.be>, Nicolas Moes <moes at tam9.mech.nwu.edu>, Osamu Nakamura <naka at hasaki.sumitomometals.co.jp>, Chad Schmutzer <schmutze at acm.caltech.edu>, Jean-Luc Flejou <jean-luc.flejou at edf.fr>, Xavier Dardenne <dardenne at tele.ucl.ac.be>, Christophe Prudhomme <prudhomm at debian.org>, Sebastien.Clerc <Sebastien.Clerc at space.alcatel.fr>, Jose Miguel Pasini <jmp84 at cornell.edu>, Philippe Lussou <plussou at necs.fr>, Jacques Kools <JKools at veeco.com>, Bayram Yenikaya <yenikaya at math.umn.edu>, Peter Hornby <p.hornby at arrc.csiro.au>, Krishna Mohan Gundu <gkmohan at gmail.com>, Christopher Stott <C.Stott at surrey.ac.uk>, Timmy Schumacher <Tim.Schumacher at colorado.edu>, Carl Osterwisch <osterwischc at asme.org>, Bruno Frackowiak <bruno.frackowiak at onecert.fr>.
174
Gmsh 1.63
175
176
Gmsh 1.63
177
178
Gmsh 1.63
system, provided that you have access to a recent C and C++ compiler. * 2.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. * 2.3 What do I need to compile Gmsh from the sources? You need a C and a C++ compiler (e.g. the GNU compilers gcc and g++) as well as the GSL (version 1.2 or higher; freely available from http://sources.redhat.com/gsl/) and FLTK (version 1.1.x, configured with OpenGL support; freely available from http://www.fltk.org). Youll also need the jpeg library if you want to save jpeg images, and the libpng and zlib libraries if you want to save png images. Under Windows, you will need the Cygwin tools and compilers (freely available from http://www.cygwin.com), as well as a "cygwin-enabled" version of FLTK (i.e., you have to configure FLTK with ./configure --enable-cygwin). * 2.4 How do I compile Gmsh? Just type ./configure; make; make install. If you change some configuration options (type ./configure --help to get the list of all available choices), dont forget to do make clean before rebuilding Gmsh. ******************************************************************** Section 3: General problems * 3.1 Gmsh (from a binary distribution) complains about missing libraries. 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 doesnt work, recompile Gmsh from the sources. * 3.2 Gmsh keeps re-displaying its graphics when other windows partially hide the graphical window. Disable opaque move in your window manager. * 3.3 The graphics display very slowly.
179
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). * 3.4 There is an ugly "ghost triangulation" in the vector PostScript/PDF files generated by Gmsh! No, there isnt. 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). * 3.5 How can I save GIF, JPEG, ..., images? Just choose the appropriate format in File->Save As. * 3.6 How can I save MPEG, AVI, ..., animations? See question 7.9. ******************************************************************** Section 4: Geometry module * 4.1 Does Gmsh support NURBS curves/surfaces? Not yet. * 4.2 Gmsh is very slow when I use many transformations (Translate, Rotate, Symmetry, Extrude, etc. ). Whats wrong? The default behavior of Gmsh is to check and suppress all duplicate entities (points, lines and surfaces) each time a transformation command is issued. This can slow down things a lot if many transformations are performed. There are two solutions to this problem: - you may save the unrolled geometry in another file (e.g. with gmsh file.geo -0 > flat.geo), and use this new file for subsequent computations; - 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.).
180
Gmsh 1.63
* 4.3 How can I display only selected parts of my model? By using Tool->Visibility: - In the Browser tab, you can select which group of entities to show (several entities can be selected at once by dragging the mouse or by holding the Ctrl and Shift keys while clicking). There are three main modes: Elementary, in which the numbers in the list correspond to elementary geometrical entities; Physical, in which the numbers in the list correspond to physical entities; and Partitions, in which the numbers in the list correspond to indices of mesh partitions (for multi-domain meshes read from "new" .msh files). If Geometry+Mesh is selected, the selection applies to both the geometrical entities and their associated meshes; if Mesh is selected, the selection applies only to the mesh; if Geometry is selected, the selection applies only to the geometry. If the Recursive option is set, selecting an entity implies that all the entities that are used to construct it (all the "boundaries") are selected too, recursively. For example, if Recursive is set, selecting a surface will automatically select its boundary curves, as well as the boundaries of these curves (i.e., points). If Recursive is not set, only the surface (the dashed cross) would be shown. - In the Numeric Input tab, you can choose to show or hide any entity or mesh element by giving its number. You can also use the "*" character to select all the entities/elements at once. For example, to show only the mesh element 13245 in the mesh, you would enter "*" in the Element input field and click on Hide (this will hide all the mesh elements); and then enter "13245" in the Element input field and click on Show (this will show the element 13245). To show other element, you would just enter another number in the input field, click on Show, etc. ******************************************************************** Section 5: Mesh module * 5.1 What should I do when the 2D unstructured algorithm fails? Try one of the other 2D algorithms, e.g.: - on the command line: gmsh -algo tri - in the interface: Tools->Options->Mesh->2D->Isotropic algorithm (Triangle) - in input files: Mesh.Algorithm = 3 The old 2D algorithm may disappear once all its features are integrated in the new ones, so please dont send bug reports on the old algorithm anymore.
181
* 5.2 The new 2D unstructured algorithms also fail! Then what? Send us your geometry, and we will investigate. Please keep the following in mind though: 2D (surface) meshes are generated by projecting the 2D mesh in a "mean plane" of the surface. This gives nice results only if the surface curvature is small enough. Otherwise you must cut the surface into several pieces (patches). For example, using half circles to define a cylinder will fail with the unstructured algorithm: you should define arcs with angles smaller than Pi, and thus define the cylinder with at least three patches. * 5.3 What should I do when the 3D unstructured algorithm fails? The 3D algorithm is still very experimental. Try to change some characteristic lengths in your input file to generate meshes that better suit the geometrical details of your structure. * 5.4 I changed the characteristic lengths, but the 3D algorithm still does not work. What should I do? Buy a professional mesh generator ;-) You can also try to use Netgen instead of the default algorithm for the 3D mesh. Note that all surface meshes have to be oriented with exterior normals in this case. * 5.5 The 3D algorithm is reaaaaally slow. Can you improve it? We are working on it. But since we have a (very) limited amount of time to spend on the development of Gmsh, this may take a while. For very big meshes, see the answer to the previous question... * 5.6 The quality of the elements generated by the 3D algorithm is very bad. Upgrade to Gmsh >= 1.54 and use Optimize quality. If badly shaped elements still exist due to the surface recovery step, you can try to use Netgen instead of the default algorithm for the 3D mesh. Note that all surface meshes have to be oriented with exterior normals in this case. * 5.7 Non-recombined 3D extruded meshes sometimes fail. The swapping algorithm is not very clever at the moment. Try to change the surface mesh a bit, or recombine your mesh to generate prisms or hexahedra instead of tetrahedra. * 5.8 Tools->Visibility does not seem to work with extruded meshes.
182
Gmsh 1.63
This is fixed in Gmsh >= 1.54. However, when region numbers are explicitly assigned to mesh entities in the extrude commands (which partially destroys the geometry/mesh relationship), the Visibility tool will only work as expected when displaying elementary entities. In this particular case, the only solution to visualize extruded physical entities is to save the mesh, and to read it again. * 5.9 Does Gmsh support curved elements? Yes, Gmsh can generate both 1st order and 2nd order elements. To generate second order elements, click on Second 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. * 5.10 Can I import an existing surface mesh in Gmsh and use it to build a 3D mesh? Yes, see for example demos/sphere-discrete.geo. Note that Gmsh does not currently modify the surface mesh that you provide in this way, so this surface mesh has to be conform (without gaps, hanging nodes, etc.) and must contain surface elements having the final desired sizes. Gmsh can also import discrete geometries in the form of STL triangulations, and remesh these to respect certain constraints. This is an experimental and undocumented feature as of this writing (version 1.61). * 5.11 How do I define boundary conditions or material properties in Gmsh? By design, Gmsh does not try to incorporate every possible definition of boundary conditions or material 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 tutorial/t1.geo) for a detailed description and some examples. * 5.12 How can I display only the mesh associated with selected geometrical entities? See question 4.3.
183
* 5.13 How can I "explore" a mesh (for example, to see inside a complex structure)? You can use Tools->Clipping Planes to extract 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. There is also one additional clipping plane available for "cutting" only the mesh (by keeping entire elements), in Tools->Options->Mesh->Cut Plane. * 5.14 What is the signification of Rho, Eta and Gamma in Tools->Statistics? They measure the quality of the tetrahedra in a mesh: Rho ~ min_edge_length / max_edge_length Eta ~ volume^(2/3) / sum_edge_length^2 Gamma ~ volume / sum_face_area / max_edge_length For the exact definitions, look at Mesh/Element.cpp and Mesh/Simplex.cpp. The graphs plot the the number of elements vs the quality measure. ******************************************************************** Section 6: Solver module * 6.1 How do I integrate my own solver with Gmsh? If you want to simply launch a program from within Gmsh, just edit the options to define your solver commands (e.g. Solver.Name0, Solver.Executable0, etc.), and set the ClientServer option to zero (e.g. Solver.ClientServer0 = 0). If you want your solver to interact with Gmsh (for error messages, option definitions, post-processing, etc.), you will need to link your solver with the GmshClient routines and add the appropriate function calls inside your program. You will of course also need to define your solver commands in an option file, but this time you should set the ClientServer variable to 1 (e.g. Solver.ClientServer = 1). C, C++, Perl and Python solver examples are available in the source distribution in the utils/solvers directory.
184
Gmsh 1.63
* 6.2 On Windows, Gmsh does not seem to find the solver executable. Whats wrong? The solver executable (for example, getdp.exe) has to be in your path. If not, simply go to the solver options (for example, Solver->GetDP->Options->Executable) to specify its location. On recent versions of Microsoft Windows (XP SP2), it seems that you need to execute the solver (e.g. launch getdp.exe) at least once independently first in order to authorize future executions. * 6.3 Can I launch Gmsh from my solver (instead of launching my solver from Gmsh) in order to monitor a solution? Sure. A simple C program showing how to do this is given in utils/misc/callgmsh.c. * 6.4 Is it possible for Gmsh top listen to an external program not launched from Gmsh? Yes: just create a program as described in 6.1 above (you can skip the option file creation). Then run gmsh -listen and Gmsh will listen for the program on the Solver.SocketName socket. ******************************************************************** Section 7: Post-processing module * 7.1 How do I compute a section of a plot? Use View->Plugins->Cut Plane. * 7.2 Can I save an isosurface to a file? Yes: first run View->Plugins->Cut Map to extract the isosurface, then use View->Save As to save the new view. * 7.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). * 7.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
185
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. * 7.5 How do I visualize a deformed mesh? Load a vector view containing the displacement field, and set Vector display to Displacement 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. * 7.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 DiplacementRaise plugin. * 7.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.
186
Gmsh 1.63
* 7.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. * 7.9 Is there a way to save animations? Yes, using scripts. Have a look at tutorial/t8.geo or demos/anim.script for some examples. * 7.10 Is there a way to visualize only certain components of vector/tensor fields? Yes, using View->Plugin->Extract. * 7.11 Can I do arithmetic operations on a view? Can I perform operations involving different views? Yes, with the Evaluate plugin. * 7.12 Some plugins seem to create empty views. Whats 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. A 3D version of this plugin is not available yet but it is on our TODO list. - 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. * 7.13 My code generates data "time step by time step", and thus cannot easily output Gmshs multi-time-step post-processing files, where the values for all the time steps are given per element. How can I use Gmshs post-processor in this situation?
187
Just create one view for each time step: Gmsh can handle an arbitrary number of views and it can deal with these separate views as efficiently as with a single multi-time-step view. The only disadvantage is that the total amount of disk space used is greater (since the node data is repeated for each time step). In practice, depending on the size of the data set, you may want to store all the views in a single file or create one separate file for each view, which you can then load selectively (and thus reduce the memory required for the analysis). In any case you can use Tools->Options->Post-processing->View links to apply options to multiple views at once, and the up and down arrow keys to loop through (animate) the views (instead of the left and right arrow keys for multi-time-step views). Also note that if all the views are based on the same grid, Gmsh can combine the separate views into a multi-time-step view by using the View->Combine->Time Steps menu, or by using the -combine command line option. * 7.14 How can I see "inside" a complicated post-processing view? See question 5.13. 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. * 7.15 I am loading a valid 3D scalar view but Gmsh does not display anything! In versions < 1.61, the default drawing mode for 3D scalar views was to draw iso-surfaces. If your data set was constant per element, Gmsh would not draw anything (a fix for this would be to run Plugin(Smooth), which would average the data on the nodes of the grid)... This behavior has changed in version 1.61, and Gmsh now draws the solution on the boundary of the elements by default. Iso-surfaces are of course still available by setting Intervals type to Iso-values in Tools->Options->View->Range. Note that the most efficient way to visualize the dataset on the boundary of the elements is to run Plugin(Skin) on the view: this will
188
Gmsh 1.63
extract the boundary of the dataset and only draw the data on this boundary.
Appendix C: License
189
Appendix C License
GNU General Public License Version 2, June 1991 Copyright c 1989, 1991 Free Software Foundation, Inc. 59 Temple Place - Suite 330, Boston, MA 02111-1307, 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 softwareto make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundations software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Library General Public License instead.) You can apply it to your programs, too. 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) oer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each authors protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modied 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 reect 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 eect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyones free use or not licensed at all. The precise terms and conditions for copying, distribution and modication follow.
190
Gmsh 1.63
Appendix C: License
191
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 oer, 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 oer 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 oer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface denition les, 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 oering access to copy from a designated place, then oering 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
192
Gmsh 1.63
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 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 dier in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program species 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.
Appendix C: License
193
10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are dierent, 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 POSSIBILITY OF SUCH DAMAGES.
194
Gmsh 1.63
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) 19yy 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 itemswhatever 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
195
Concept index
.
.msh le . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 145 .pos le . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 149
E
E-mail, authors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 161 Edges, ordering . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 155 Eciency, tips . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 175 Elementary lines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 Elementary points . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 Elementary surfaces . . . . . . . . . . . . . . . . . . . . . . . . . . 41 Elementary volumes . . . . . . . . . . . . . . . . . . . . . . . . . 42 Elliptic, mesh . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51 Evaluation order . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 Example, solver . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79 Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113 Expressions, aectation . . . . . . . . . . . . . . . . . . . . . . 15 Expressions, character . . . . . . . . . . . . . . . . . . . . . . . . 10 Expressions, color . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 Expressions, denition . . . . . . . . . . . . . . . . . . . . . . . . 9 Expressions, oating point . . . . . . . . . . . . . . . . . . . . . 9 Expressions, identiers . . . . . . . . . . . . . . . . . . . . . . . 15 Expressions, lists . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 Extrusion, geometry . . . . . . . . . . . . . . . . . . . . . . . . . 42 Extrusion, mesh . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
2
2D plots . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83
3
3D plots . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83
A
Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . . . . . 171 Authors, e-mail . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 161
B
Background mesh . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50 Binary operators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 Bindings, keyboard . . . . . . . . . . . . . . . . . . . . . . . . . 141 Bindings, mouse . . . . . . . . . . . . . . . . . . . . . . . . . . . . 140 Bugs, reporting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 161
F
Faces, ordering . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 155 FAQ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 177 File format, mesh . . . . . . . . . . . . . . . . . . . . . . . . . . . 145 File format, post-processing, ASCII . . . . . . . . . . 151 File format, post-processing, binary . . . . . . . . . . 154 File format, post-processing, parsed . . . . . . . . . . 149 File formats . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 145 File, comments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 Floating point numbers . . . . . . . . . . . . . . . . . . . . . . . 9 Frequently asked questions . . . . . . . . . . . . . . . . . . 177 Functions, built-in . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 Functions, user-dened . . . . . . . . . . . . . . . . . . . . . . . 14
C
Changelog . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 161 Characteristic lengths . . . . . . . . . . . . . . . . . . . . . . . . 50 Colors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 Command-line options . . . . . . . . . . . . . . . . . . . . . . 138 Commands, general . . . . . . . . . . . . . . . . . . . . . . . . . . 15 Commands, geometry . . . . . . . . . . . . . . . . . . . . . . . . 39 Commands, mesh . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49 Commands, post-processing . . . . . . . . . . . . . . . . . . 83 Comments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 Concepts, index . . . . . . . . . . . . . . . . . . . . . . . . . . . . 195 Conditionals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 Constants . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 Contact information . . . . . . . . . . . . . . . . . . . . . . . . 161 Contributors, list . . . . . . . . . . . . . . . . . . . . . . . . . . . 171 Copyright . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 Credits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 171
G
General commands . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 Geometry commands . . . . . . . . . . . . . . . . . . . . . . . . . 39 Geometry, extrusion . . . . . . . . . . . . . . . . . . . . . . . . . 42 Geometry, module . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 Geometry, options . . . . . . . . . . . . . . . . . . . . . . . . . . . 44 Geometry, transformations . . . . . . . . . . . . . . . . . . . 43 GNU General Public License . . . . . . . . . . . . . . . . 189 Graphs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83
D
Document syntax . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 Download . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
H
History, versions . . . . . . . . . . . . . . . . . . . . . . . . . . . . 161
196
Gmsh 1.63
I
Index, concepts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 195 Index, syntax . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 199 Interactive mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . 137 Internet address . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
P
Physical lines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 Physical points . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 Physical surfaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 Physical volumes . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42 Plots . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83 Plugins, post-processing . . . . . . . . . . . . . . . . . . . . . . 85 Points, elementary . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 Points, physical . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 Post-processing commands . . . . . . . . . . . . . . . . . . . 83 Post-processing plugins . . . . . . . . . . . . . . . . . . . . . . . 85 Post-processing, ASCII le format . . . . . . . . . . . 151 Post-processing, binary le format . . . . . . . . . . . 154 Post-processing, module . . . . . . . . . . . . . . . . . . . . . . 83 Post-processing, options . . . . . . . . . . . . . . . . . . . . . . 96 Post-processing, parsed le format . . . . . . . . . . . 149 Precedence, operators . . . . . . . . . . . . . . . . . . . . . . . . 12 Programming, notes . . . . . . . . . . . . . . . . . . . . . . . . 159
K
Keyboard, shortcuts . . . . . . . . . . . . . . . . . . . . . . . . 141 Keywords, index . . . . . . . . . . . . . . . . . . . . . . . . . . . . 199
L
License . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1, 189 Lines, elementary . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 Lines, physical . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 Loops . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
M
Mailing list . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1, 161 Mesh commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49 Mesh, background . . . . . . . . . . . . . . . . . . . . . . . . . . . 50 Mesh, element size . . . . . . . . . . . . . . . . . . . . . . . . . . . 50 Mesh, elliptic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51 Mesh, extrusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51 Mesh, le format . . . . . . . . . . . . . . . . . . . . . . . . . . . 145 Mesh, module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49 Mesh, options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53 Mesh, transnite . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51 Module, geometry . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 Module, Mesh . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49 Module, Post-processing . . . . . . . . . . . . . . . . . . . . . . 83 Module, Solver . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65 Mouse, actions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 140
Q
Questions, frequently asked . . . . . . . . . . . . . . . . . . 177
R
Real numbers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 Reporting bugs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 161 Rotation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43 Rules, syntactic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 Running Gmsh . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 137
S
Scale . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43 Shortcuts, keyboard . . . . . . . . . . . . . . . . . . . . . . . . . 141 Size, elements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50 Solver commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65 Solver example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79 Solver, module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65 Strings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 Surfaces, elementary . . . . . . . . . . . . . . . . . . . . . . . . . 41 Surfaces, physical . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 Symmetry . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43 Syntax, index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 199 Syntax, rules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
N
Nodes, ordering . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 155 Non-interactive mode . . . . . . . . . . . . . . . . . . . . . . . 138 Numbers, real . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
O
Operating system . . . . . . . . . . . . . . . . . . . . . . . . . . . 137 Operator precedence . . . . . . . . . . . . . . . . . . . . . . . . . 12 Operators, denition . . . . . . . . . . . . . . . . . . . . . . . . . 11 Options, command-line . . . . . . . . . . . . . . . . . . . . . . 138 Options, geometry . . . . . . . . . . . . . . . . . . . . . . . . 44, 65 Options, mesh . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53 Options, post-processing . . . . . . . . . . . . . . . . . . . . . 96 Order, evaluation . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
T
Ternary operators . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 Tips . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 175 Transnite, mesh . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51 Transformations, geometry . . . . . . . . . . . . . . . . . . . 43 Translation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43 Tricks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 175 Tutorial . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113
Concept index
197
U
Unary operators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
V
Versions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 161
W
Web site . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
198
Gmsh 1.63
Syntax index
199
Syntax index
!
! . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 != . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 -noview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . -o file . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . -optimize . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . -option file . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . -order int . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . -pid . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . -rand float . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . -recombine . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . -saveall . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . -scale float . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . -scheme string . . . . . . . . . . . . . . . . . . . . . . . . . . . . -smooth int . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . -smoothview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . -string "string" . . . . . . . . . . . . . . . . . . . . . . . . . . -v int . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . -version . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 139 138 138 140 139 140 139 139 138 139 139 138 139 140 140 140
%
% . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
&
&& . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
(
() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
*
* . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 *= . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
/
/ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 /*, */ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 // . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 /= . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
+
+ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 ++ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 += . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
:
: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
- . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11, 12 -- . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 -= . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 -0 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 138 -1, -2, -3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 138 -a, -g, -m, -s, -p . . . . . . . . . . . . . . . . . . . . . . . . . 140 -algo string . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 138 -bgm file . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 139 -clscale float . . . . . . . . . . . . . . . . . . . . . . . . . . . . 139 -combine . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 139 -constrain . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 139 -convert file file . . . . . . . . . . . . . . . . . . . . . . . . 140 -display string . . . . . . . . . . . . . . . . . . . . . . . . . . . 139 -extrude . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 139 -fontsize int . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 139 -format string . . . . . . . . . . . . . . . . . . . . . . . . . . . . 138 -help . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 140 -histogram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 139 -info . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 140 -interactive . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 139 -link int . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 139 -listen . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 140 -meshscale float . . . . . . . . . . . . . . . . . . . . . . . . . . 139 -nodb . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 139 -nopopup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 140
<
< . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 <= . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
=
= . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 == . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
>
> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 >= . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
?
? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
^
^ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
|
|| . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
200
Gmsh 1.63
A
Acos ( expression ) . . . . . . . . . . . . . . . . . . . . . . . . . . 13 Alias View[expression]; . . . . . . . . . . . . . . . . . . . . . 83 AliasWithOptions View[expression]; . . . . . . . . . 84 Asin ( expression ) . . . . . . . . . . . . . . . . . . . . . . . . . . 13 Atan ( expression ) . . . . . . . . . . . . . . . . . . . . . . . . . . 13 Atan2 ( expression, expression ) . . . . . . . . . . . . . . 13 Attractor Point | Line { expression-list } = { expression, expression, expression }; . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
Draw; . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
E
Ellipse ( expression ) = { expression, expression, expression, expression }; . . . . . . . . . . 40 Elliptic Surface { expression } = { expression-list }; . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52 EndFor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 EndIf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 Exit; . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 Exp ( expression ) . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 extrude . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42 Extrude { { expression-list }, { expression-list }, { expression-list }, expression } { extrude-list } . . . . . . . . . . . . . . . . . . . . . 42 Extrude { { expression-list }, { expression-list }, { expression-list }, expression } { extrude-list layers } . . . . . . . . . . . . . . . . 51 Extrude { { expression-list }, { expression-list }, expression } { extrude-list } . . . . . . . . 42 Extrude { { expression-list }, { expression-list }, expression } { extrude-list layers } . . 51 Extrude { expression-list } { extrude-list } . . . . . . 42 Extrude { expression-list } { extrude-list layers } . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
B
Background Mesh View[expression]; . . . . . . . . . . . 84 Bezier ( expression ) = { expression-list }; . . . . . 40 BoundingBox { expression, expression, expression, expression, expression, expression }; . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 BoundingBox; . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 BSpline ( expression ) = { expression-list }; . . . 40 build-in-function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
C
Call string; . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 CatmullRom ( expression ) = { expression-list }; . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 Ceil ( expression ) . . . . . . . . . . . . . . . . . . . . . . . . . . 13 char-option = char-expression; . . . . . . . . . . . . . . . . 16 Characteristic Length { expression-list } = expression; . . . . . . . . . . . . . . . . . . . . . . . 51 Circle ( expression ) = { expression, expression, expression }; . . . . . . . . . . . . . . . . . . . . . 40 Coherence; . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44 Color color-expression { Point | Line | Surface | Volume { expression-list }; ... } . . . 52 color-option = color-expression; . . . . . . . . . . . . . . . . 16 Combine ElementsByViewName; . . . . . . . . . . . . . . . 84 Combine ElementsFromAllViews | Combine Views; . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84 Combine ElementsFromVisibleViews; . . . . . . . . . 84 Combine TimeStepsByViewName | Combine TimeSteps; . . . . . . . . . . . . . . . . . . . . . . 84 Combine TimeStepsFromAllViews; . . . . . . . . . . . . 84 Combine TimeStepsFromVisibleViews; . . . . . . . . 84 Cos ( expression ) . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 Cosh ( expression ) . . . . . . . . . . . . . . . . . . . . . . . . . . 13
F
Fabs ( expression ) . . . . . . . . . . . . . . . . . . . . . . . . . . 13 Floor ( expression ) . . . . . . . . . . . . . . . . . . . . . . . . . 13 Fmod ( expression, expression ) . . . . . . . . . . . . . . . 13 For ( expression : expression ) . . . . . . . . . . . . . . . . 14 For ( expression : expression : expression ) . . . . 15 For string In { expression : expression : expression } . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 For string In { expression : expression } . . . . . . . 15 Function string . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
G
General.AlphaBlending . . . . . . . . . . . . . . . . . . . . . General.ArrowHeadRadius . . . . . . . . . . . . . . . . . . . General.ArrowStemLength . . . . . . . . . . . . . . . . . . . General.ArrowStemRadius . . . . . . . . . . . . . . . . . . . General.Axes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . General.AxesAutoPosition . . . . . . . . . . . . . . . . . . General.AxesFormatX . . . . . . . . . . . . . . . . . . . . . . . . General.AxesFormatY . . . . . . . . . . . . . . . . . . . . . . . . General.AxesFormatZ . . . . . . . . . . . . . . . . . . . . . . . . General.AxesLabelX . . . . . . . . . . . . . . . . . . . . . . . . . General.AxesLabelY . . . . . . . . . . . . . . . . . . . . . . . . . General.AxesLabelZ . . . . . . . . . . . . . . . . . . . . . . . . . General.AxesMaxX . . . . . . . . . . . . . . . . . . . . . . . . . . . General.AxesMaxY . . . . . . . . . . . . . . . . . . . . . . . . . . . General.AxesMaxZ . . . . . . . . . . . . . . . . . . . . . . . . . . . General.AxesMinX . . . . . . . . . . . . . . . . . . . . . . . . . . . General.AxesMinY . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 20 20 20 20 20 18 18 19 19 19 19 21 21 21 21 21
D
Delete { Point | Line | Surface | Volume { expression-list }; ... } . . . . . . . . . . . . Delete All; . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Delete Empty Views; . . . . . . . . . . . . . . . . . . . . . . . . Delete Physicals; . . . . . . . . . . . . . . . . . . . . . . . . . . Delete View[expression]; . . . . . . . . . . . . . . . . . . . . Dilate { { expression-list }, expression } { transform-list } . . . . . . . . . . . . . . . . . . . 44 18 84 18 84 43
Syntax index
201
General.AxesMinZ . . . . . . . . . . . . . . . . . . . . . . . . . . . General.AxesTicsX . . . . . . . . . . . . . . . . . . . . . . . . . . General.AxesTicsY . . . . . . . . . . . . . . . . . . . . . . . . . . General.AxesTicsZ . . . . . . . . . . . . . . . . . . . . . . . . . . General.BackgroundGradient . . . . . . . . . . . . . . . . General.Clip0 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . General.Clip0A . . . . . . . . . . . . . . . . . . . . . . . . . . . . . General.Clip0B . . . . . . . . . . . . . . . . . . . . . . . . . . . . . General.Clip0C . . . . . . . . . . . . . . . . . . . . . . . . . . . . . General.Clip0D . . . . . . . . . . . . . . . . . . . . . . . . . . . . . General.Clip1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . General.Clip1A . . . . . . . . . . . . . . . . . . . . . . . . . . . . . General.Clip1B . . . . . . . . . . . . . . . . . . . . . . . . . . . . . General.Clip1C . . . . . . . . . . . . . . . . . . . . . . . . . . . . . General.Clip1D . . . . . . . . . . . . . . . . . . . . . . . . . . . . . General.Clip2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . General.Clip2A . . . . . . . . . . . . . . . . . . . . . . . . . . . . . General.Clip2B . . . . . . . . . . . . . . . . . . . . . . . . . . . . . General.Clip2C . . . . . . . . . . . . . . . . . . . . . . . . . . . . . General.Clip2D . . . . . . . . . . . . . . . . . . . . . . . . . . . . . General.Clip3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . General.Clip3A . . . . . . . . . . . . . . . . . . . . . . . . . . . . . General.Clip3B . . . . . . . . . . . . . . . . . . . . . . . . . . . . . General.Clip3C . . . . . . . . . . . . . . . . . . . . . . . . . . . . . General.Clip3D . . . . . . . . . . . . . . . . . . . . . . . . . . . . . General.Clip4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . General.Clip4A . . . . . . . . . . . . . . . . . . . . . . . . . . . . . General.Clip4B . . . . . . . . . . . . . . . . . . . . . . . . . . . . . General.Clip4C . . . . . . . . . . . . . . . . . . . . . . . . . . . . . General.Clip4D . . . . . . . . . . . . . . . . . . . . . . . . . . . . . General.Clip5 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . General.Clip5A . . . . . . . . . . . . . . . . . . . . . . . . . . . . . General.Clip5B . . . . . . . . . . . . . . . . . . . . . . . . . . . . . General.Clip5C . . . . . . . . . . . . . . . . . . . . . . . . . . . . . General.Clip5D . . . . . . . . . . . . . . . . . . . . . . . . . . . . . General.ClipFactor . . . . . . . . . . . . . . . . . . . . . . . . . General.ClipPositionX . . . . . . . . . . . . . . . . . . . . . General.ClipPositionY . . . . . . . . . . . . . . . . . . . . . General.Color.AmbientLight . . . . . . . . . . . . . . . . General.Color.Axes . . . . . . . . . . . . . . . . . . . . . . . . . General.Color.Background . . . . . . . . . . . . . . . . . . General.Color.BackgroundGradient . . . . . . . . . . General.Color.DiffuseLight . . . . . . . . . . . . . . . . General.Color.Foreground . . . . . . . . . . . . . . . . . . General.Color.SmallAxes . . . . . . . . . . . . . . . . . . . General.Color.SpecularLight . . . . . . . . . . . . . . . General.Color.Text . . . . . . . . . . . . . . . . . . . . . . . . . General.ColorScheme . . . . . . . . . . . . . . . . . . . . . . . . General.ConfirmOverwrite . . . . . . . . . . . . . . . . . . General.ContextPositionX . . . . . . . . . . . . . . . . . . General.ContextPositionY . . . . . . . . . . . . . . . . . . General.DefaultFileName . . . . . . . . . . . . . . . . . . . General.Display . . . . . . . . . . . . . . . . . . . . . . . . . . . . General.DoubleBuffer . . . . . . . . . . . . . . . . . . . . . . . General.DrawBoundingBoxes . . . . . . . . . . . . . . . . . General.ErrorFileName . . . . . . . . . . . . . . . . . . . . . General.FastRedraw . . . . . . . . . . . . . . . . . . . . . . . . . General.FileChooserPositionX . . . . . . . . . . . . . .
21 21 21 21 21 21 22 22 22 22 22 22 22 22 22 22 23 23 23 23 23 23 23 23 23 23 24 24 24 24 24 24 24 24 24 24 25 25 36 35 35 35 36 35 36 36 35 25 25 25 25 19 19 25 25 19 25 25
General.FileChooserPositionY . . . . . . . . . . . . . . General.FileName . . . . . . . . . . . . . . . . . . . . . . . . . . . General.FontSize . . . . . . . . . . . . . . . . . . . . . . . . . . . General.GraphicsFont . . . . . . . . . . . . . . . . . . . . . . . General.GraphicsFontSize . . . . . . . . . . . . . . . . . . General.GraphicsHeight . . . . . . . . . . . . . . . . . . . . General.GraphicsPositionX . . . . . . . . . . . . . . . . . General.GraphicsPositionY . . . . . . . . . . . . . . . . . General.GraphicsWidth . . . . . . . . . . . . . . . . . . . . . General.InitialModule . . . . . . . . . . . . . . . . . . . . . General.Light0 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . General.Light0W . . . . . . . . . . . . . . . . . . . . . . . . . . . . General.Light0X . . . . . . . . . . . . . . . . . . . . . . . . . . . . General.Light0Y . . . . . . . . . . . . . . . . . . . . . . . . . . . . General.Light0Z . . . . . . . . . . . . . . . . . . . . . . . . . . . . General.Light1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . General.Light1W . . . . . . . . . . . . . . . . . . . . . . . . . . . . General.Light1X . . . . . . . . . . . . . . . . . . . . . . . . . . . . General.Light1Y . . . . . . . . . . . . . . . . . . . . . . . . . . . . General.Light1Z . . . . . . . . . . . . . . . . . . . . . . . . . . . . General.Light2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . General.Light2W . . . . . . . . . . . . . . . . . . . . . . . . . . . . General.Light2X . . . . . . . . . . . . . . . . . . . . . . . . . . . . General.Light2Y . . . . . . . . . . . . . . . . . . . . . . . . . . . . General.Light2Z . . . . . . . . . . . . . . . . . . . . . . . . . . . . General.Light3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . General.Light3W . . . . . . . . . . . . . . . . . . . . . . . . . . . . General.Light3X . . . . . . . . . . . . . . . . . . . . . . . . . . . . General.Light3Y . . . . . . . . . . . . . . . . . . . . . . . . . . . . General.Light3Z . . . . . . . . . . . . . . . . . . . . . . . . . . . . General.Light4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . General.Light4W . . . . . . . . . . . . . . . . . . . . . . . . . . . . General.Light4X . . . . . . . . . . . . . . . . . . . . . . . . . . . . General.Light4Y . . . . . . . . . . . . . . . . . . . . . . . . . . . . General.Light4Z . . . . . . . . . . . . . . . . . . . . . . . . . . . . General.Light5 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . General.Light5W . . . . . . . . . . . . . . . . . . . . . . . . . . . . General.Light5X . . . . . . . . . . . . . . . . . . . . . . . . . . . . General.Light5Y . . . . . . . . . . . . . . . . . . . . . . . . . . . . General.Light5Z . . . . . . . . . . . . . . . . . . . . . . . . . . . . General.LineWidth . . . . . . . . . . . . . . . . . . . . . . . . . . General.ManipulatorPositionX . . . . . . . . . . . . . . General.ManipulatorPositionY . . . . . . . . . . . . . . General.MenuPositionX . . . . . . . . . . . . . . . . . . . . . General.MenuPositionY . . . . . . . . . . . . . . . . . . . . . General.MessageHeight . . . . . . . . . . . . . . . . . . . . . General.MessagePositionX . . . . . . . . . . . . . . . . . . General.MessagePositionY . . . . . . . . . . . . . . . . . . General.MessageWidth . . . . . . . . . . . . . . . . . . . . . . . General.NoPopup . . . . . . . . . . . . . . . . . . . . . . . . . . . . General.OptionsFileName . . . . . . . . . . . . . . . . . . . General.OptionsPositionX . . . . . . . . . . . . . . . . . . General.OptionsPositionY . . . . . . . . . . . . . . . . . . General.Orthographic . . . . . . . . . . . . . . . . . . . . . . . General.PointSize . . . . . . . . . . . . . . . . . . . . . . . . . . General.PolygonOffsetAlwaysOn . . . . . . . . . . . . . General.PolygonOffsetFactor . . . . . . . . . . . . . . . General.PolygonOffsetUnits . . . . . . . . . . . . . . . .
26 19 26 19 26 26 26 26 26 26 26 27 26 27 27 27 27 27 27 27 27 28 28 28 28 28 28 28 28 28 28 29 29 29 29 29 29 29 29 29 29 30 30 30 30 30 30 30 30 30 19 30 30 31 31 31 31 31
202
Gmsh 1.63
General.QuadricSubdivisions . . . . . . . . . . . . . . . General.RotationCenterGravity . . . . . . . . . . . . . General.RotationCenterX . . . . . . . . . . . . . . . . . . . General.RotationCenterY . . . . . . . . . . . . . . . . . . . General.RotationCenterZ . . . . . . . . . . . . . . . . . . . General.RotationX . . . . . . . . . . . . . . . . . . . . . . . . . . General.RotationY . . . . . . . . . . . . . . . . . . . . . . . . . . General.RotationZ . . . . . . . . . . . . . . . . . . . . . . . . . . General.SaveOptions . . . . . . . . . . . . . . . . . . . . . . . . General.SaveSession . . . . . . . . . . . . . . . . . . . . . . . . General.ScaleX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . General.ScaleY . . . . . . . . . . . . . . . . . . . . . . . . . . . . . General.ScaleZ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . General.Scheme . . . . . . . . . . . . . . . . . . . . . . . . . . . . . General.SessionFileName . . . . . . . . . . . . . . . . . . . General.Shininess . . . . . . . . . . . . . . . . . . . . . . . . . . General.ShininessExponent . . . . . . . . . . . . . . . . . General.SmallAxes . . . . . . . . . . . . . . . . . . . . . . . . . . General.SmallAxesPositionX . . . . . . . . . . . . . . . . General.SmallAxesPositionY . . . . . . . . . . . . . . . . General.SmallAxesSize . . . . . . . . . . . . . . . . . . . . . General.SolverPositionX . . . . . . . . . . . . . . . . . . . General.SolverPositionY . . . . . . . . . . . . . . . . . . . General.StatisticsPositionX . . . . . . . . . . . . . . . General.StatisticsPositionY . . . . . . . . . . . . . . . General.SystemMenuBar . . . . . . . . . . . . . . . . . . . . . General.Terminal . . . . . . . . . . . . . . . . . . . . . . . . . . . General.TextEditor . . . . . . . . . . . . . . . . . . . . . . . . . General.TmpFileName . . . . . . . . . . . . . . . . . . . . . . . . General.Tooltips . . . . . . . . . . . . . . . . . . . . . . . . . . . General.Trackball . . . . . . . . . . . . . . . . . . . . . . . . . . General.TrackballQuaternion0 . . . . . . . . . . . . . . General.TrackballQuaternion1 . . . . . . . . . . . . . . General.TrackballQuaternion2 . . . . . . . . . . . . . . General.TrackballQuaternion3 . . . . . . . . . . . . . . General.TranslationX . . . . . . . . . . . . . . . . . . . . . . . General.TranslationY . . . . . . . . . . . . . . . . . . . . . . . General.TranslationZ . . . . . . . . . . . . . . . . . . . . . . . General.VectorType . . . . . . . . . . . . . . . . . . . . . . . . . General.Verbosity . . . . . . . . . . . . . . . . . . . . . . . . . . General.VisibilityMode . . . . . . . . . . . . . . . . . . . . General.VisibilityPositionX . . . . . . . . . . . . . . . General.VisibilityPositionY . . . . . . . . . . . . . . . General.WebBrowser . . . . . . . . . . . . . . . . . . . . . . . . . General.ZoomFactor . . . . . . . . . . . . . . . . . . . . . . . . . Geometry.AutoCoherence . . . . . . . . . . . . . . . . . . . . Geometry.CirclePoints . . . . . . . . . . . . . . . . . . . . . Geometry.CircleWarning . . . . . . . . . . . . . . . . . . . . Geometry.Color.Lines . . . . . . . . . . . . . . . . . . . . . . . Geometry.Color.LinesSelect . . . . . . . . . . . . . . . . Geometry.Color.Normals . . . . . . . . . . . . . . . . . . . . Geometry.Color.Points . . . . . . . . . . . . . . . . . . . . . Geometry.Color.PointsSelect . . . . . . . . . . . . . . . Geometry.Color.Surfaces . . . . . . . . . . . . . . . . . . . Geometry.Color.SurfacesSelect . . . . . . . . . . . . . Geometry.Color.Tangents . . . . . . . . . . . . . . . . . . . Geometry.Color.Volumes . . . . . . . . . . . . . . . . . . . . Geometry.Color.VolumesSelect . . . . . . . . . . . . . .
31 31 32 32 32 31 31 31 32 32 32 32 32 20 19 32 32 33 33 33 33 33 33 33 33 33 33 20 20 34 34 34 34 34 34 34 34 34 34 35 35 35 35 20 35 44 44 44 47 47 48 47 47 47 47 48 47 48
Geometry.ExtrudeSplinePoints . . . . . . . . . . . . . . Geometry.Light . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Geometry.LineNumbers . . . . . . . . . . . . . . . . . . . . . . . Geometry.Lines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Geometry.LineSelectWidth . . . . . . . . . . . . . . . . . . Geometry.LineType . . . . . . . . . . . . . . . . . . . . . . . . . . Geometry.LineWidth . . . . . . . . . . . . . . . . . . . . . . . . . Geometry.Normals . . . . . . . . . . . . . . . . . . . . . . . . . . . Geometry.OldCircle . . . . . . . . . . . . . . . . . . . . . . . . . Geometry.OldNewReg . . . . . . . . . . . . . . . . . . . . . . . . . Geometry.PointNumbers . . . . . . . . . . . . . . . . . . . . . Geometry.Points . . . . . . . . . . . . . . . . . . . . . . . . . . . . Geometry.PointSelectSize . . . . . . . . . . . . . . . . . . Geometry.PointSize . . . . . . . . . . . . . . . . . . . . . . . . . Geometry.PointType . . . . . . . . . . . . . . . . . . . . . . . . . Geometry.ScalingFactor . . . . . . . . . . . . . . . . . . . . Geometry.SnapX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Geometry.SnapY . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Geometry.SnapZ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Geometry.SurfaceNumbers . . . . . . . . . . . . . . . . . . . Geometry.Surfaces . . . . . . . . . . . . . . . . . . . . . . . . . . Geometry.Tangents . . . . . . . . . . . . . . . . . . . . . . . . . . Geometry.VolumeNumbers . . . . . . . . . . . . . . . . . . . . Geometry.Volumes . . . . . . . . . . . . . . . . . . . . . . . . . . . GMSH_MAJOR_VERSION . . . . . . . . . . . . . . . . . . . . . . . . . GMSH_MINOR_VERSION . . . . . . . . . . . . . . . . . . . . . . . . . GMSH_PATCH_VERSION . . . . . . . . . . . . . . . . . . . . . . . . .
45 45 45 45 45 45 45 45 45 45 46 45 46 46 46 46 46 46 46 46 46 47 47 47 15 15 15
H
Hide { Point | Line | Surface | Volume { expression-list }; ... } . . . . . . . . . 44, 52 Hide char-expression; . . . . . . . . . . . . . . . . . . . . . 44, 52 Hypot ( expression, expression ) . . . . . . . . . . . . . . 13
I
If ( expression ) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 Include char-expression; . . . . . . . . . . . . . . . . . . . . . 18
L
Line ( expression ) = { expression, expression }; . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 Line Loop ( expression ) = { expression-list }; . . 40 Log ( expression ) . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 Log10 ( expression ) . . . . . . . . . . . . . . . . . . . . . . . . . 14
Syntax index
203
M
Merge char-expression; . . . . . . . . . . . . . . . . . . . . . . . Mesh.Algorithm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Mesh.Algorithm3D . . . . . . . . . . . . . . . . . . . . . . . . . . . Mesh.AllowDegeneratedExtrude . . . . . . . . . . . . . . Mesh.AngleSmoothNormals . . . . . . . . . . . . . . . . . . . Mesh.BetaSmoothMetric . . . . . . . . . . . . . . . . . . . . . Mesh.CharacteristicLengthFactor . . . . . . . . . . . Mesh.Color.Eight . . . . . . . . . . . . . . . . . . . . . . . . . . . Mesh.Color.Eighteen . . . . . . . . . . . . . . . . . . . . . . . . Mesh.Color.Eleven . . . . . . . . . . . . . . . . . . . . . . . . . . Mesh.Color.Fifteen . . . . . . . . . . . . . . . . . . . . . . . . . Mesh.Color.Five . . . . . . . . . . . . . . . . . . . . . . . . . . . . Mesh.Color.Four . . . . . . . . . . . . . . . . . . . . . . . . . . . . Mesh.Color.Fourteen . . . . . . . . . . . . . . . . . . . . . . . . Mesh.Color.Hexahedra . . . . . . . . . . . . . . . . . . . . . . . Mesh.Color.Lines . . . . . . . . . . . . . . . . . . . . . . . . . . . Mesh.Color.Nine . . . . . . . . . . . . . . . . . . . . . . . . . . . . Mesh.Color.Nineteen . . . . . . . . . . . . . . . . . . . . . . . . Mesh.Color.Normals . . . . . . . . . . . . . . . . . . . . . . . . . Mesh.Color.One . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Mesh.Color.Points . . . . . . . . . . . . . . . . . . . . . . . . . . Mesh.Color.PointsSup . . . . . . . . . . . . . . . . . . . . . . . Mesh.Color.Prisms . . . . . . . . . . . . . . . . . . . . . . . . . . Mesh.Color.Pyramids . . . . . . . . . . . . . . . . . . . . . . . . Mesh.Color.Quadrangles . . . . . . . . . . . . . . . . . . . . Mesh.Color.Seven . . . . . . . . . . . . . . . . . . . . . . . . . . . Mesh.Color.Seventeen . . . . . . . . . . . . . . . . . . . . . . . Mesh.Color.Six . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Mesh.Color.Sixteen . . . . . . . . . . . . . . . . . . . . . . . . . Mesh.Color.Tangents . . . . . . . . . . . . . . . . . . . . . . . . Mesh.Color.Ten . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Mesh.Color.Tetrahedra . . . . . . . . . . . . . . . . . . . . . Mesh.Color.Thirtheen . . . . . . . . . . . . . . . . . . . . . . . Mesh.Color.Three . . . . . . . . . . . . . . . . . . . . . . . . . . . Mesh.Color.Triangles . . . . . . . . . . . . . . . . . . . . . . . Mesh.Color.Twelve . . . . . . . . . . . . . . . . . . . . . . . . . . Mesh.Color.Two . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Mesh.Color.Zero . . . . . . . . . . . . . . . . . . . . . . . . . . . . Mesh.ColorCarousel . . . . . . . . . . . . . . . . . . . . . . . . . Mesh.ConstrainedBackgroundMesh . . . . . . . . . . . . Mesh.CpuTime . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Mesh.CutPlane . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Mesh.CutPlaneA . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Mesh.CutPlaneAsSurface . . . . . . . . . . . . . . . . . . . . Mesh.CutPlaneB . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Mesh.CutPlaneC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Mesh.CutPlaneD . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Mesh.CutPlaneOnlyVolume . . . . . . . . . . . . . . . . . . . Mesh.DihedralAngleTol . . . . . . . . . . . . . . . . . . . . . Mesh.Dual . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Mesh.EdgeProlongationThreshold . . . . . . . . . . . . Mesh.ElementOrder . . . . . . . . . . . . . . . . . . . . . . . . . . Mesh.Explode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Mesh.Format . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Mesh.Interactive . . . . . . . . . . . . . . . . . . . . . . . . . . . Mesh.LabelsFrequency . . . . . . . . . . . . . . . . . . . . . . . Mesh.LabelType . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 53 53 53 53 53 53 62 63 63 63 62 62 63 61 61 62 63 61 62 60 61 61 61 61 62 63 62 63 61 63 61 63 62 61 63 62 62 54 54 54 54 54 54 54 54 55 54 55 55 55 55 55 55 55 60 55
Mesh.Light . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Mesh.LightLines . . . . . . . . . . . . . . . . . . . . . . . . . . . . Mesh.LightTwoSide . . . . . . . . . . . . . . . . . . . . . . . . . . Mesh.LineNumbers . . . . . . . . . . . . . . . . . . . . . . . . . . . Mesh.Lines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Mesh.LineType . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Mesh.LineWidth . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Mesh.MinimumCirclePoints . . . . . . . . . . . . . . . . . . Mesh.MinimumElementSizeFact . . . . . . . . . . . . . . . Mesh.MshFileVersion . . . . . . . . . . . . . . . . . . . . . . . . Mesh.NbElemsPerRadiusOfCurv . . . . . . . . . . . . . . . Mesh.NbHexahedra . . . . . . . . . . . . . . . . . . . . . . . . . . . Mesh.NbNodes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Mesh.NbPrisms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Mesh.NbPyramids . . . . . . . . . . . . . . . . . . . . . . . . . . . . Mesh.NbQuadrangles . . . . . . . . . . . . . . . . . . . . . . . . . Mesh.NbTetrahedra . . . . . . . . . . . . . . . . . . . . . . . . . . Mesh.NbTriangles . . . . . . . . . . . . . . . . . . . . . . . . . . . Mesh.Normals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Mesh.Optimize . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Mesh.Partitioning . . . . . . . . . . . . . . . . . . . . . . . . . . Mesh.PointInsertion . . . . . . . . . . . . . . . . . . . . . . . . Mesh.PointNumbers . . . . . . . . . . . . . . . . . . . . . . . . . . Mesh.Points . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Mesh.PointSize . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Mesh.PointsPerElement . . . . . . . . . . . . . . . . . . . . . Mesh.PointType . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Mesh.Quality . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Mesh.QualityInf . . . . . . . . . . . . . . . . . . . . . . . . . . . . Mesh.QualitySup . . . . . . . . . . . . . . . . . . . . . . . . . . . . Mesh.QualityType . . . . . . . . . . . . . . . . . . . . . . . . . . . Mesh.RadiusInf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Mesh.RadiusSup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Mesh.RandomFactor . . . . . . . . . . . . . . . . . . . . . . . . . . Mesh.RecombineAlgo . . . . . . . . . . . . . . . . . . . . . . . . . Mesh.SaveAll . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Mesh.ScalingFactor . . . . . . . . . . . . . . . . . . . . . . . . . Mesh.Smoothing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Mesh.SmoothNormals . . . . . . . . . . . . . . . . . . . . . . . . . Mesh.SpeedMax . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Mesh.StlDistanceTol . . . . . . . . . . . . . . . . . . . . . . . . Mesh.SurfaceEdges . . . . . . . . . . . . . . . . . . . . . . . . . . Mesh.SurfaceFaces . . . . . . . . . . . . . . . . . . . . . . . . . . Mesh.SurfaceNumbers . . . . . . . . . . . . . . . . . . . . . . . . Mesh.Tangents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Mesh.TargetElmentSizeFact . . . . . . . . . . . . . . . . . Mesh.TriangleOptions . . . . . . . . . . . . . . . . . . . . . . . Mesh.VertexArrays . . . . . . . . . . . . . . . . . . . . . . . . . . Mesh.VolumeEdges . . . . . . . . . . . . . . . . . . . . . . . . . . . Mesh.VolumeFaces . . . . . . . . . . . . . . . . . . . . . . . . . . . Mesh.VolumeNumbers . . . . . . . . . . . . . . . . . . . . . . . . . Modulo ( expression, expression ) . . . . . . . . . . . . . MPI_Rank . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . MPI_Size . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
55 55 56 56 56 56 56 56 56 56 56 56 57 57 57 57 57 57 57 57 59 58 58 57 58 57 58 58 58 58 58 58 58 59 59 59 59 59 59 59 59 59 60 60 60 60 53 60 60 60 60 14 16 15
204
Gmsh 1.63
N
newl . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . newp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . newreg . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . news . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . newv . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 16 16 16 16
O
operator-binary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . operator-ternary-left . . . . . . . . . . . . . . . . . . . . . . . . . . operator-ternary-right . . . . . . . . . . . . . . . . . . . . . . . . . operator-unary-left . . . . . . . . . . . . . . . . . . . . . . . . . . . operator-unary-right . . . . . . . . . . . . . . . . . . . . . . . . . . 11 11 11 11 11
P
Physical Line ( expression ) = { expression-list }; . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 Physical Point ( expression ) = { expression-list }; . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 Physical Surface ( expression ) = { expression-list }; . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 Physical Volume ( expression ) = { expression-list }; . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42 Pi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 Plane Surface ( expression ) = { expression-list }; . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 Plugin (string) . Run; . . . . . . . . . . . . . . . . . . . . . . . 85 Plugin (string) . string = expression | char-expression; . . . . . . . . . . . . . . . . . . 85 Plugin(Annotate) . . . . . . . . . . . . . . . . . . . . . . . . . . . 85 Plugin(Curl) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86 Plugin(CutGrid) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86 Plugin(CutMap) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87 Plugin(CutParametric) . . . . . . . . . . . . . . . . . . . . . 87 Plugin(CutPlane) . . . . . . . . . . . . . . . . . . . . . . . . . . . 88 Plugin(CutSphere) . . . . . . . . . . . . . . . . . . . . . . . . . . 88 Plugin(DecomposeInSimplex) . . . . . . . . . . . . . . . . 88 Plugin(DisplacementRaise) . . . . . . . . . . . . . . . . . 89 Plugin(Divergence) . . . . . . . . . . . . . . . . . . . . . . . . . 89 Plugin(Eigenvalues) . . . . . . . . . . . . . . . . . . . . . . . . 89 Plugin(Eigenvectors) . . . . . . . . . . . . . . . . . . . . . . . 89 Plugin(Evaluate) . . . . . . . . . . . . . . . . . . . . . . . . . . . 90 Plugin(Extract) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90 Plugin(ExtractElements) . . . . . . . . . . . . . . . . . . . 91 Plugin(Gradient) . . . . . . . . . . . . . . . . . . . . . . . . . . . 92 Plugin(HarmonicToTime) . . . . . . . . . . . . . . . . . . . . 92 Plugin(Integrate) . . . . . . . . . . . . . . . . . . . . . . . . . . 92 Plugin(Lambda2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92 Plugin(ModulusPhase) . . . . . . . . . . . . . . . . . . . . . . . 93 Plugin(Probe) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93 Plugin(Remove) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93 Plugin(Skin) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94 Plugin(Smooth) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94 Plugin(SphericalRaise) . . . . . . . . . . . . . . . . . . . . 94 Plugin(StreamLines) . . . . . . . . . . . . . . . . . . . . . . . . 95 Plugin(Transform) . . . . . . . . . . . . . . . . . . . . . . . . . . 95
Plugin(Triangulate) . . . . . . . . . . . . . . . . . . . . . . . . Point ( expression ) = { expression, expression, expression, expression }; . . . . . . . . . . PostProcessing.AnimationCycle . . . . . . . . . . . . . PostProcessing.AnimationDelay . . . . . . . . . . . . . PostProcessing.CombineRemoveOriginal . . . . . PostProcessing.Format . . . . . . . . . . . . . . . . . . . . . PostProcessing.HorizontalScales . . . . . . . . . . . PostProcessing.Link . . . . . . . . . . . . . . . . . . . . . . . . PostProcessing.NbViews . . . . . . . . . . . . . . . . . . . . PostProcessing.Plugins . . . . . . . . . . . . . . . . . . . . PostProcessing.Smoothing . . . . . . . . . . . . . . . . . . PostProcessing.VertexArrays . . . . . . . . . . . . . . . Print char-expression; . . . . . . . . . . . . . . . . . . . . . . . Print.EpsBackground . . . . . . . . . . . . . . . . . . . . . . . . Print.EpsBestRoot . . . . . . . . . . . . . . . . . . . . . . . . . . Print.EpsCompress . . . . . . . . . . . . . . . . . . . . . . . . . . Print.EpsLineWidthFactor . . . . . . . . . . . . . . . . . . Print.EpsOcclusionCulling . . . . . . . . . . . . . . . . . Print.EpsPointSizeFactor . . . . . . . . . . . . . . . . . . Print.EpsPS3Shading . . . . . . . . . . . . . . . . . . . . . . . . Print.EpsQuality . . . . . . . . . . . . . . . . . . . . . . . . . . . Print.Format . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Print.GifDither . . . . . . . . . . . . . . . . . . . . . . . . . . . . Print.GifInterlace . . . . . . . . . . . . . . . . . . . . . . . . . Print.GifSort . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Print.GifTransparent . . . . . . . . . . . . . . . . . . . . . . . Print.JpegQuality . . . . . . . . . . . . . . . . . . . . . . . . . . Print.JpegSmoothing . . . . . . . . . . . . . . . . . . . . . . . . Printf ( char-expression , expression-list ); . . .
96 39 96 96 97 97 97 97 97 97 97 97 18 36 36 36 36 36 36 37 37 37 37 37 37 37 37 37 17
R
Rand ( expression ) . . . . . . . . . . . . . . . . . . . . . . . . . . 14 real-option = expression; . . . . . . . . . . . . . . . . . . . . . . 16 Recombine Surface { expression-list } < = expression >; . . . . . . . . . . . . . . . . . . . . . 52 Return . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 Rotate { { expression-list }, { expression-list }, expression } { transform-list } . . . . . . 43 Ruled Surface ( expression ) = { expression-list }; . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
S
Save char-expression; . . . . . . . . . . . . . . . . . . . . . . . . Save View[expression] char-expression; . . . . . . . . Show { Point | Line | Surface | Volume { expression-list }; ... } . . . . . . . . . 44, Show char-expression; . . . . . . . . . . . . . . . . . . . . . 44, Sin ( expression ) . . . . . . . . . . . . . . . . . . . . . . . . . . . Sinh ( expression ) . . . . . . . . . . . . . . . . . . . . . . . . . . Sleep expression; . . . . . . . . . . . . . . . . . . . . . . . . . . . . Solver.ClientServer0 . . . . . . . . . . . . . . . . . . . . . . . Solver.ClientServer1 . . . . . . . . . . . . . . . . . . . . . . . Solver.ClientServer2 . . . . . . . . . . . . . . . . . . . . . . . Solver.ClientServer3 . . . . . . . . . . . . . . . . . . . . . . . Solver.ClientServer4 . . . . . . . . . . . . . . . . . . . . . . . 53 85 53 53 14 14 18 77 77 78 78 78
Syntax index
205
Solver.Executable0 . . . . . . . . . . . . . . . . . . . . . . . . . Solver.Executable1 . . . . . . . . . . . . . . . . . . . . . . . . . Solver.Executable2 . . . . . . . . . . . . . . . . . . . . . . . . . Solver.Executable3 . . . . . . . . . . . . . . . . . . . . . . . . . Solver.Executable4 . . . . . . . . . . . . . . . . . . . . . . . . . Solver.Extension0 . . . . . . . . . . . . . . . . . . . . . . . . . . Solver.Extension1 . . . . . . . . . . . . . . . . . . . . . . . . . . Solver.Extension2 . . . . . . . . . . . . . . . . . . . . . . . . . . Solver.Extension3 . . . . . . . . . . . . . . . . . . . . . . . . . . Solver.Extension4 . . . . . . . . . . . . . . . . . . . . . . . . . . Solver.FifthButton0 . . . . . . . . . . . . . . . . . . . . . . . . Solver.FifthButton1 . . . . . . . . . . . . . . . . . . . . . . . . Solver.FifthButton2 . . . . . . . . . . . . . . . . . . . . . . . . Solver.FifthButton3 . . . . . . . . . . . . . . . . . . . . . . . . Solver.FifthButton4 . . . . . . . . . . . . . . . . . . . . . . . . Solver.FifthButtonCommand0 . . . . . . . . . . . . . . . . Solver.FifthButtonCommand1 . . . . . . . . . . . . . . . . Solver.FifthButtonCommand2 . . . . . . . . . . . . . . . . Solver.FifthButtonCommand3 . . . . . . . . . . . . . . . . Solver.FifthButtonCommand4 . . . . . . . . . . . . . . . . Solver.FifthOption0 . . . . . . . . . . . . . . . . . . . . . . . . Solver.FifthOption1 . . . . . . . . . . . . . . . . . . . . . . . . Solver.FifthOption2 . . . . . . . . . . . . . . . . . . . . . . . . Solver.FifthOption3 . . . . . . . . . . . . . . . . . . . . . . . . Solver.FifthOption4 . . . . . . . . . . . . . . . . . . . . . . . . Solver.FirstButton0 . . . . . . . . . . . . . . . . . . . . . . . . Solver.FirstButton1 . . . . . . . . . . . . . . . . . . . . . . . . Solver.FirstButton2 . . . . . . . . . . . . . . . . . . . . . . . . Solver.FirstButton3 . . . . . . . . . . . . . . . . . . . . . . . . Solver.FirstButton4 . . . . . . . . . . . . . . . . . . . . . . . . Solver.FirstButtonCommand0 . . . . . . . . . . . . . . . . Solver.FirstButtonCommand1 . . . . . . . . . . . . . . . . Solver.FirstButtonCommand2 . . . . . . . . . . . . . . . . Solver.FirstButtonCommand3 . . . . . . . . . . . . . . . . Solver.FirstButtonCommand4 . . . . . . . . . . . . . . . . Solver.FirstOption0 . . . . . . . . . . . . . . . . . . . . . . . . Solver.FirstOption1 . . . . . . . . . . . . . . . . . . . . . . . . Solver.FirstOption2 . . . . . . . . . . . . . . . . . . . . . . . . Solver.FirstOption3 . . . . . . . . . . . . . . . . . . . . . . . . Solver.FirstOption4 . . . . . . . . . . . . . . . . . . . . . . . . Solver.FourthButton0 . . . . . . . . . . . . . . . . . . . . . . . Solver.FourthButton1 . . . . . . . . . . . . . . . . . . . . . . . Solver.FourthButton2 . . . . . . . . . . . . . . . . . . . . . . . Solver.FourthButton3 . . . . . . . . . . . . . . . . . . . . . . . Solver.FourthButton4 . . . . . . . . . . . . . . . . . . . . . . . Solver.FourthButtonCommand0 . . . . . . . . . . . . . . . Solver.FourthButtonCommand1 . . . . . . . . . . . . . . . Solver.FourthButtonCommand2 . . . . . . . . . . . . . . . Solver.FourthButtonCommand3 . . . . . . . . . . . . . . . Solver.FourthButtonCommand4 . . . . . . . . . . . . . . . Solver.FourthOption0 . . . . . . . . . . . . . . . . . . . . . . . Solver.FourthOption1 . . . . . . . . . . . . . . . . . . . . . . . Solver.FourthOption2 . . . . . . . . . . . . . . . . . . . . . . . Solver.FourthOption3 . . . . . . . . . . . . . . . . . . . . . . . Solver.FourthOption4 . . . . . . . . . . . . . . . . . . . . . . . Solver.Help0 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Solver.Help1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Solver.Help2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
65 68 70 72 75 65 68 70 72 75 67 70 72 74 77 67 70 72 74 77 66 69 71 73 76 66 69 71 74 76 66 69 71 74 76 66 68 71 73 75 67 69 72 74 77 67 69 72 74 77 66 69 71 73 76 65 67 70
Solver.Help3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Solver.Help4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Solver.MaximumDelay . . . . . . . . . . . . . . . . . . . . . . . . Solver.MergeViews0 . . . . . . . . . . . . . . . . . . . . . . . . . Solver.MergeViews1 . . . . . . . . . . . . . . . . . . . . . . . . . Solver.MergeViews2 . . . . . . . . . . . . . . . . . . . . . . . . . Solver.MergeViews3 . . . . . . . . . . . . . . . . . . . . . . . . . Solver.MergeViews4 . . . . . . . . . . . . . . . . . . . . . . . . . Solver.MeshCommand0 . . . . . . . . . . . . . . . . . . . . . . . . Solver.MeshCommand1 . . . . . . . . . . . . . . . . . . . . . . . . Solver.MeshCommand2 . . . . . . . . . . . . . . . . . . . . . . . . Solver.MeshCommand3 . . . . . . . . . . . . . . . . . . . . . . . . Solver.MeshCommand4 . . . . . . . . . . . . . . . . . . . . . . . . Solver.MeshName0 . . . . . . . . . . . . . . . . . . . . . . . . . . . Solver.MeshName1 . . . . . . . . . . . . . . . . . . . . . . . . . . . Solver.MeshName2 . . . . . . . . . . . . . . . . . . . . . . . . . . . Solver.MeshName3 . . . . . . . . . . . . . . . . . . . . . . . . . . . Solver.MeshName4 . . . . . . . . . . . . . . . . . . . . . . . . . . . Solver.Name0 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Solver.Name1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Solver.Name2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Solver.Name3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Solver.Name4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Solver.NameCommand0 . . . . . . . . . . . . . . . . . . . . . . . . Solver.NameCommand1 . . . . . . . . . . . . . . . . . . . . . . . . Solver.NameCommand2 . . . . . . . . . . . . . . . . . . . . . . . . Solver.NameCommand3 . . . . . . . . . . . . . . . . . . . . . . . . Solver.NameCommand4 . . . . . . . . . . . . . . . . . . . . . . . . Solver.OptionCommand0 . . . . . . . . . . . . . . . . . . . . . Solver.OptionCommand1 . . . . . . . . . . . . . . . . . . . . . Solver.OptionCommand2 . . . . . . . . . . . . . . . . . . . . . Solver.OptionCommand3 . . . . . . . . . . . . . . . . . . . . . Solver.OptionCommand4 . . . . . . . . . . . . . . . . . . . . . Solver.Plugins . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Solver.PopupMessages0 . . . . . . . . . . . . . . . . . . . . . Solver.PopupMessages1 . . . . . . . . . . . . . . . . . . . . . Solver.PopupMessages2 . . . . . . . . . . . . . . . . . . . . . Solver.PopupMessages3 . . . . . . . . . . . . . . . . . . . . . Solver.PopupMessages4 . . . . . . . . . . . . . . . . . . . . . Solver.SecondButton0 . . . . . . . . . . . . . . . . . . . . . . . Solver.SecondButton1 . . . . . . . . . . . . . . . . . . . . . . . Solver.SecondButton2 . . . . . . . . . . . . . . . . . . . . . . . Solver.SecondButton3 . . . . . . . . . . . . . . . . . . . . . . . Solver.SecondButton4 . . . . . . . . . . . . . . . . . . . . . . . Solver.SecondButtonCommand0 . . . . . . . . . . . . . . . Solver.SecondButtonCommand1 . . . . . . . . . . . . . . . Solver.SecondButtonCommand2 . . . . . . . . . . . . . . . Solver.SecondButtonCommand3 . . . . . . . . . . . . . . . Solver.SecondButtonCommand4 . . . . . . . . . . . . . . . Solver.SecondOption0 . . . . . . . . . . . . . . . . . . . . . . . Solver.SecondOption1 . . . . . . . . . . . . . . . . . . . . . . . Solver.SecondOption2 . . . . . . . . . . . . . . . . . . . . . . . Solver.SecondOption3 . . . . . . . . . . . . . . . . . . . . . . . Solver.SecondOption4 . . . . . . . . . . . . . . . . . . . . . . . Solver.SocketCommand0 . . . . . . . . . . . . . . . . . . . . . Solver.SocketCommand1 . . . . . . . . . . . . . . . . . . . . . Solver.SocketCommand2 . . . . . . . . . . . . . . . . . . . . . Solver.SocketCommand3 . . . . . . . . . . . . . . . . . . . . .
72 75 77 77 78 78 78 78 66 68 70 73 75 65 68 70 73 75 65 67 70 72 75 66 68 70 73 75 66 68 71 73 75 77 77 78 78 78 79 67 69 71 74 76 67 69 71 74 76 66 68 71 73 76 66 68 70 73
206
Gmsh 1.63
Solver.SocketCommand4 . . . . . . . . . . . . . . . . . . . . . 75 Solver.SocketName . . . . . . . . . . . . . . . . . . . . . . . . . . 65 Solver.ThirdButton0 . . . . . . . . . . . . . . . . . . . . . . . . 67 Solver.ThirdButton1 . . . . . . . . . . . . . . . . . . . . . . . . 69 Solver.ThirdButton2 . . . . . . . . . . . . . . . . . . . . . . . . 72 Solver.ThirdButton3 . . . . . . . . . . . . . . . . . . . . . . . . 74 Solver.ThirdButton4 . . . . . . . . . . . . . . . . . . . . . . . . 76 Solver.ThirdButtonCommand0 . . . . . . . . . . . . . . . . 67 Solver.ThirdButtonCommand1 . . . . . . . . . . . . . . . . 69 Solver.ThirdButtonCommand2 . . . . . . . . . . . . . . . . 72 Solver.ThirdButtonCommand3 . . . . . . . . . . . . . . . . 74 Solver.ThirdButtonCommand4 . . . . . . . . . . . . . . . . 76 Solver.ThirdOption0 . . . . . . . . . . . . . . . . . . . . . . . . 66 Solver.ThirdOption1 . . . . . . . . . . . . . . . . . . . . . . . . 68 Solver.ThirdOption2 . . . . . . . . . . . . . . . . . . . . . . . . 71 Solver.ThirdOption3 . . . . . . . . . . . . . . . . . . . . . . . . 73 Solver.ThirdOption4 . . . . . . . . . . . . . . . . . . . . . . . . 76 Spline ( expression ) = { expression-list }; . . . . . 40 Sqrt ( expression ) . . . . . . . . . . . . . . . . . . . . . . . . . . 14 string = expression; . . . . . . . . . . . . . . . . . . . . . . . . . . 15 string [ ] = { expression-list }; . . . . . . . . . . . . . . . . 16 string [ { expression-list } ] *= { expression-list }; . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 string [ { expression-list } ] += { expression-list }; . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 string [ { expression-list } ] -= { expression-list }; . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 string [ { expression-list } ] /= { expression-list }; . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 string [ { expression-list } ] = { expression-list }; . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 string | real-option *= expression; . . . . . . . . . . . . . 16 string | real-option += expression; . . . . . . . . . . . . . 16 string | real-option -= expression; . . . . . . . . . . . . . 16 string | real-option /= expression; . . . . . . . . . . . . . 17 Surface Loop ( expression ) = { expression-list }; . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 Symmetry { expression-list } { transform-list } . . 43 System char-expression; . . . . . . . . . . . . . . . . . . . . . . 18
V
View "string" { string ( expression-list ) { expression-list }; ... }; . . . . . . . . . . . 85 View.AngleSmoothNormals . . . . . . . . . . . . . . . . . . . 99 View.ArrowHeadRadius . . . . . . . . . . . . . . . . . . . . . . 100 View.ArrowSize . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100 View.ArrowSizeProportional . . . . . . . . . . . . . . . 100 View.ArrowStemLength . . . . . . . . . . . . . . . . . . . . . . 100 View.ArrowStemRadius . . . . . . . . . . . . . . . . . . . . . . 100 View.AutoPosition . . . . . . . . . . . . . . . . . . . . . . . . . 100 View.Axes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100 View.AxesAutoPosition . . . . . . . . . . . . . . . . . . . . 100 View.AxesFormatX . . . . . . . . . . . . . . . . . . . . . . . . . . . 97 View.AxesFormatY . . . . . . . . . . . . . . . . . . . . . . . . . . . 97 View.AxesFormatZ . . . . . . . . . . . . . . . . . . . . . . . . . . . 98 View.AxesLabelX . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98 View.AxesLabelY . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98 View.AxesLabelZ . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98 View.AxesMaxX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100 View.AxesMaxY . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100 View.AxesMaxZ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101 View.AxesMinX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101 View.AxesMinY . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101 View.AxesMinZ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101 View.AxesTicsX . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101 View.AxesTicsY . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101 View.AxesTicsZ . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101 View.Boundary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101 View.Color.Axes . . . . . . . . . . . . . . . . . . . . . . . . . . . 111 View.Color.Hexahedra . . . . . . . . . . . . . . . . . . . . . . 110 View.Color.Lines . . . . . . . . . . . . . . . . . . . . . . . . . . 110 View.Color.Normals . . . . . . . . . . . . . . . . . . . . . . . . 110 View.Color.Points . . . . . . . . . . . . . . . . . . . . . . . . . 110 View.Color.Prisms . . . . . . . . . . . . . . . . . . . . . . . . . 110 View.Color.Pyramids . . . . . . . . . . . . . . . . . . . . . . . 110 View.Color.Quadrangles . . . . . . . . . . . . . . . . . . . 110 View.Color.Tangents . . . . . . . . . . . . . . . . . . . . . . . 110 View.Color.Tetrahedra . . . . . . . . . . . . . . . . . . . . 110 View.Color.Text2D . . . . . . . . . . . . . . . . . . . . . . . . . 111 View.Color.Text3D . . . . . . . . . . . . . . . . . . . . . . . . . 111 View.Color.Triangles . . . . . . . . . . . . . . . . . . . . . . 110 View.ColormapAlpha . . . . . . . . . . . . . . . . . . . . . . . . 101 View.ColormapAlphaPower . . . . . . . . . . . . . . . . . . 101 View.ColormapBeta . . . . . . . . . . . . . . . . . . . . . . . . . 102 View.ColormapBias . . . . . . . . . . . . . . . . . . . . . . . . . 102 View.ColormapCurvature . . . . . . . . . . . . . . . . . . . 102 View.ColormapInvert . . . . . . . . . . . . . . . . . . . . . . . 102 View.ColormapNumber . . . . . . . . . . . . . . . . . . . . . . . 102 View.ColormapRotation . . . . . . . . . . . . . . . . . . . . 102 View.ColormapSwap . . . . . . . . . . . . . . . . . . . . . . . . . 102 View.ColorTable . . . . . . . . . . . . . . . . . . . . . . . . . . . 111 View.CustomMax . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102 View.CustomMin . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102 View.DisplacementFactor . . . . . . . . . . . . . . . . . . 102 View.DrawHexahedra . . . . . . . . . . . . . . . . . . . . . . . . 103 View.DrawLines . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103 View.DrawPoints . . . . . . . . . . . . . . . . . . . . . . . . . . . 103 View.DrawPrisms . . . . . . . . . . . . . . . . . . . . . . . . . . . 103
T
Tan ( expression ) . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 Tanh ( expression ) . . . . . . . . . . . . . . . . . . . . . . . . . . 14 Transfinite Line { expression-list } = expression < Using Progression | Bump expression >; . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51 Transfinite Surface { expression } = { expression-list } < Left | Right | Alternate > ; . . . . . . . . . . . . . . . . . . . . 52 Transfinite Volume { expression } = { expression-list }; . . . . . . . . . . . . . . . . . . 52 transform . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43 Translate { expression-list } { transform-list } . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
Syntax index
207
View.DrawPyramids . . . . . . . . . . . . . . . . . . . . . . . . . 103 View.DrawQuadrangles . . . . . . . . . . . . . . . . . . . . . . 103 View.DrawScalars . . . . . . . . . . . . . . . . . . . . . . . . . . 103 View.DrawStrings . . . . . . . . . . . . . . . . . . . . . . . . . . 103 View.DrawTensors . . . . . . . . . . . . . . . . . . . . . . . . . . 103 View.DrawTetrahedra . . . . . . . . . . . . . . . . . . . . . . . 103 View.DrawTriangles . . . . . . . . . . . . . . . . . . . . . . . . 104 View.DrawVectors . . . . . . . . . . . . . . . . . . . . . . . . . . 104 View.Explode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104 View.ExternalView . . . . . . . . . . . . . . . . . . . . . . . . . 104 View.FakeTransparency . . . . . . . . . . . . . . . . . . . . 104 View.FileName . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98 View.Format . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98 View.GeneralizedRaiseFactor . . . . . . . . . . . . . . 104 View.GeneralizedRaiseView . . . . . . . . . . . . . . . . 104 View.GeneralizedRaiseX . . . . . . . . . . . . . . . . . . . . 98 View.GeneralizedRaiseY . . . . . . . . . . . . . . . . . . . . 98 View.GeneralizedRaiseZ . . . . . . . . . . . . . . . . . . . . 98 View.GlyphLocation . . . . . . . . . . . . . . . . . . . . . . . . 104 View.Grid . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104 View.Height . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104 View.IntervalsType . . . . . . . . . . . . . . . . . . . . . . . . 105 View.Light . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105 View.LightLines . . . . . . . . . . . . . . . . . . . . . . . . . . . 105 View.LightTwoSide . . . . . . . . . . . . . . . . . . . . . . . . . 105 View.LineType . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105 View.LineWidth . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105 View.Max . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105 View.MaxX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105 View.MaxY . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105 View.MaxZ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105 View.Min . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106 View.MinX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106 View.MinY . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106 View.MinZ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106 View.Name . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98 View.NbIso . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106 View.NbTimeStep . . . . . . . . . . . . . . . . . . . . . . . . . . . 106 View.Normals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106 View.OffsetX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106 View.OffsetY . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106 View.OffsetZ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106 View.PointSize . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106
View.PointType . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107 View.PositionX . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107 View.PositionY . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107 View.RaiseX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107 View.RaiseY . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107 View.RaiseZ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107 View.RangeType . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107 View.SaturateValues . . . . . . . . . . . . . . . . . . . . . . . 107 View.ScaleType . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107 View.ShowElement . . . . . . . . . . . . . . . . . . . . . . . . . . 107 View.ShowScale . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107 View.ShowTime . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108 View.SmoothNormals . . . . . . . . . . . . . . . . . . . . . . . . 108 View.Stipple . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108 View.Stipple0 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98 View.Stipple1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99 View.Stipple2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99 View.Stipple3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99 View.Stipple4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99 View.Stipple5 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99 View.Stipple6 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99 View.Stipple7 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99 View.Stipple8 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99 View.Stipple9 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99 View.Tangents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108 View.TensorType . . . . . . . . . . . . . . . . . . . . . . . . . . . 108 View.TimeStep . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108 View.Transform11 . . . . . . . . . . . . . . . . . . . . . . . . . . 108 View.Transform12 . . . . . . . . . . . . . . . . . . . . . . . . . . 108 View.Transform13 . . . . . . . . . . . . . . . . . . . . . . . . . . 108 View.Transform21 . . . . . . . . . . . . . . . . . . . . . . . . . . 108 View.Transform22 . . . . . . . . . . . . . . . . . . . . . . . . . . 109 View.Transform23 . . . . . . . . . . . . . . . . . . . . . . . . . . 109 View.Transform31 . . . . . . . . . . . . . . . . . . . . . . . . . . 109 View.Transform32 . . . . . . . . . . . . . . . . . . . . . . . . . . 109 View.Transform33 . . . . . . . . . . . . . . . . . . . . . . . . . . 109 View.Type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109 View.UseGeneralizedRaise . . . . . . . . . . . . . . . . . 109 View.VectorType . . . . . . . . . . . . . . . . . . . . . . . . . . . 109 View.Visible . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109 View.Width . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109 Volume ( expression ) = { expression-list }; . . . . . 42
208
Gmsh 1.63