This is the `Gmsh Reference Manual' for Gmsh 2.2 (19 April 2008). Copyright (C) 1997-2008 Christophe Geuzaine, Jean-Franc,ois Remacle Short Contents ************** Gmsh Copying conditions 1 Overview 2 General tools 3 Geometry module 4 Mesh module 5 Solver module 6 Post-processing module 7 Tutorial 8 Running Gmsh 9 File formats 10 Programming notes 11 Bugs, versions and credits Appendix A Tips and tricks Appendix B Frequently asked questions Appendix C License Concept index Syntax index Table of Contents ***************** Gmsh Copying conditions 1 Overview 1.1 Geometry: geometrical entity definition 1.2 Mesh: finite element mesh generation 1.3 Solver: external solver interface 1.4 Post-processing: scalar, vector and tensor field visualization 1.5 What Gmsh is pretty good at ... 1.6 ... and what Gmsh is not so good at 1.7 Syntactic rules used in this document 1.8 Comments 2 General tools 2.1 Expressions 2.1.1 Floating point expressions 2.1.2 Character expressions 2.1.3 Color expressions 2.2 Operators 2.3 Built-in functions 2.4 User-defined functions 2.5 Loops and conditionals 2.6 General commands 2.7 General options 3 Geometry module 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 3.2 Geometry options 4 Mesh module 4.1 Elementary vs. physical entities 4.2 Mesh commands 4.2.1 Characteristic lengths 4.2.2 Structured grids 4.2.3 Miscellaneous 4.3 Mesh options 5 Solver module 5.1 Solver options 5.2 Solver example 6 Post-processing module 6.1 Post-processing commands 6.2 Post-processing plugins 6.3 Post-processing options 7 Tutorial 7.1 `t1.geo' 7.2 `t2.geo' 7.3 `t3.geo' 7.4 `t4.geo' 7.5 `t5.geo' 7.6 `t6.geo' 7.7 `t7.geo' 7.8 `t8.geo' 7.9 `t9.geo' 8 Running Gmsh 8.1 Interactive mode 8.2 Non-interactive mode 8.3 Command-line options 8.4 Mouse actions 8.5 Keyboard shortcuts 9 File formats 9.1 MSH ASCII file format 9.2 MSH binary file format 9.3 Node ordering 9.4 Legacy formats 9.4.1 MSH file format version 1.0 9.4.2 POS ASCII file format 9.4.3 POS binary file format 10 Programming notes 10.1 Main code structure 10.2 Coding style 10.3 Option handling 11 Bugs, versions and credits 11.1 Bugs 11.2 Versions 11.3 Credits Appendix A Tips and tricks Appendix B Frequently asked questions Appendix C License Concept index Syntax index Gmsh **** Christophe Geuzaine and Jean-Franc,ois Remacle Gmsh is an automatic 3D finite element mesh generator with build-in pre- and post-processing facilities. This is the `Gmsh Reference Manual' for Gmsh 2.2 (19 April 2008). Copying conditions ****************** Gmsh is "free software"; this means that everyone is free to use it and to redistribute it on a free basis. Gmsh is not in the public domain; it is copyrighted and there are restrictions on its distribution, but these restrictions are designed to permit everything that a good cooperating citizen would want to do. What is not allowed is to try to prevent others from further sharing any version of Gmsh that they might get from you. Specifically, we want to make sure that you have the right to give away copies of Gmsh, that you receive source code or else can get it if you want it, that you can change Gmsh or use pieces of Gmsh in new free programs, and that you know you can do these things. To make sure that everyone has such rights, we have to forbid you to deprive anyone else of these rights. For example, if you distribute copies of Gmsh, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must tell them their rights. Also, for our own protection, we must make certain that everyone finds out that there is no warranty for Gmsh. If Gmsh is modified by someone else and passed on, we want their recipients to know that what they have is not what we distributed, so that any problems introduced by others will not reflect on our reputation. The precise conditions of the license for Gmsh are found in the General Public License that accompanies the source code (*note License::). 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 *Note Credits::. 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 . If you want to integrate Gmsh into a closed-source software, or want to sell a modified closed-source version of Gmsh, please contact one of the authors. You can purchase a version of Gmsh under a different license, with "no strings attached" (for example allowing you to take parts of Gmsh and integrate them into your own proprietary code). 1 Overview ********** Gmsh is an automatic three-dimensional finite element mesh generator 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 files using Gmsh's own scripting language. Interactive actions generate language bits in the input files, and vice versa. This makes it possible to automate all treatments, using loops, conditionals and external system calls. A brief description of the four modules is given hereafter. 1.1 Geometry: geometrical entity definition =========================================== Gmsh uses a boundary representation ("b-rep") to describe geometries. Models are created in a bottom-up flow by successively defining points, oriented lines (line segments, circles, ellipses, splines, ...), oriented surfaces (plane surfaces, ruled surfaces, triangulated surfaces, ...) and volumes. Compound groups of geometrical entities (called "physical groups") can also be defined, based on these elementary geometric entities. Gmsh's scripting language allows all geometrical entities to be fully parameterized. 1.2 Mesh: finite element mesh generation ======================================== A finite element mesh is a tessellation of a given subset of the three-dimensional space by elementary geometrical elements of various shapes (in Gmsh's case: lines, triangles, quadrangles, tetrahedra, prisms, hexahedra and pyramids), arranged in such a way that if two of them intersect, they do so along a face, an edge or a node, and never otherwise. All the finite element meshes produced by Gmsh are considered as "unstructured", even if they were generated in a "structured" way (e.g., by extrusion). This implies that the elementary geometrical elements are defined only by an ordered list of their nodes but that no predefined order relation is assumed between any two elements. The mesh generation is performed in the same bottom-up flow as the geometry creation: lines are discretized first; the mesh of the lines is then used to mesh the surfaces; then the mesh of the surfaces is used to mesh the volumes. In this process, the mesh of an entity is only constrained by the mesh of its boundary(1) (*note Mesh-Footnote-1::). This automatically assures the conformity of the mesh when, for example, two surfaces share a common line. But this also implies that the discretization of an "isolated" (N-1)-th dimensional entity inside an N-th dimensional entity does _not_ constrain the N-th dimensional mesh. Every meshing step is constrained by the characteristic length field, which can be uniform, specified by characteristic lengths associated with points in the geometry, or defined by general "fields" (a scalar field defined on another mesh using post-processing view, threshold fields associated with point or line "attractors", etc.). For each meshing step, all structured mesh directives are executed first, and serve as additional constraints for the unstructured parts (2) (*note Mesh-Footnote-2::). (1) For example, in three dimensions: * the triangles discretizing a surface will be forced to be faces of tetrahedra in the final 3D mesh only if the surface is part of the boundary of a volume; * the line elements discretizing a curve will be forced to be edges of tetrahedra in the final 3D mesh only if the curve is part of the boundary of a surface, itself part of the boundary of a volume; * a single node discretizing a point in the middle of a volume will be forced to be a vertex of one of the tetrahedra in the final 3D mesh only if this point is connected to a curve, itself part of the boundary of a surface, itself part of the boundary of a volume... (2) Note that mixing structured volume grids with unstructured volume grids generated with the default 3D isotropic Delaunay algorithm can result, in certain cases, to non-conform surface meshes on their shared boundary. If this happens, you may consider using the Netgen algorithm for the unstructured part. 1.3 Solver: external solver interface ===================================== External solvers can be interfaced with Gmsh through Unix or TCP/IP sockets, which permits to launch external computations and to collect and process the results directly from within Gmsh's post-processing module. The default solver interfaced with Gmsh is GetDP (`http://www.geuz.org/getdp/'). Examples on how to interface solvers written in C, C++, Perl and Python are available in the source distribution (in the `utils/solvers/' directory). 1.4 Post-processing: scalar, vector and tensor field visualization ================================================================== Gmsh can load and manipulate multiple post-processing scalar, vector or tensor maps along with the geometry and the mesh. Scalar fields are represented by iso-value lines/surfaces or color maps, while vector fields are represented by three-dimensional arrows or displacement maps. Post-processing functions include section computation, offset, elevation, boundary and component extraction, color map and range modification, animation, vector graphic output, etc. All the post-processing options can be accessed either interactively or through the input ASCII text files. Scripting permits to automate all post-processing operations, as for example to create animations. User-defined operations can also be performed on post-processing views through dynamically loadable plugins. 1.5 What Gmsh is pretty good at ... =================================== Gmsh is a (relatively) small program, and was principally developed "in academia, to solve academic problems"... Nevertheless, over the years, many people outside universities have found Gmsh useful in their day-to-day jobs. Here is a tentative list of what Gmsh does best: * quickly describe simple and/or "repetitive" geometries, thanks to user-defined functions, loops, conditionals and includes (see *Note User-defined functions::, *Note Loops and conditionals::, and *Note General commands::); * parameterize these geometries. Gmsh's scripting language enables all commands and command arguments to depend on previous calculations (see *Note Expressions::, and *Note Geometry commands::); * import complex models in industry-standard formats like STEP or IGES (when Gmsh is built with OpenCascade support); * generate 1D, 2D and 3D simplicial (i.e., using line segments, triangles and tetrahedra) finite element meshes. The performance of the 1D and 2D algorithms is pretty good; the 3D algorithm is still experimental and slow (see *Note Mesh module::, and *Note Tutorial::); * specify target element sizes accurately. Gmsh provides several mechanisms to control the size of the elements in the final mesh: through interpolation from sizes specified at geometry points or using flexible mesh size fields (*note Mesh commands::); * create simple extruded geometries and meshes (see *Note Geometry commands::, and *Note Mesh commands::); * interact with external solvers. Gmsh provides C, C++, Perl and Python interfaces, and others can be easily added (*note Solver module::); * visualize computational results in a great variety of ways. Gmsh can display scalar, vector and tensor data sets, and can perform various operations on the resulting post-processing views (*note Post-processing module::); * export plots in many different formats: vector PostScript or encapsulated PostScript, LaTeX, PNG, JPEG, ... (*note General options::); * generate complex animations (see *Note General tools::, and *Note t8.geo::); * run on low end machines and/or machines with no graphical interface. Gmsh can be compiled with or without the GUI, and all versions can be used either interactively or directly from the command line (*note Running Gmsh::); * configure your preferred options. Gmsh has a large number of configuration options that can be set interactively using the GUI, scattered inside command files, changed on the fly in scripts, set in per-user configuration files, or specified on the command-line (see *Note General options::, *Note Geometry options::, *Note Mesh options::, *Note Post-processing options::, and *Note Running Gmsh::); * and do all the above on various platforms (Windows, Mac and Unix), for free (*note Copying conditions::), using clear-text ASCII files and/or a small but powerful graphical user interface. 1.6 ... and what Gmsh is not so good at ======================================= Due to its historical background and limited developer manpower, Gmsh has also some (a lot of?) weaknesses: * the b-rep approach for describing geometries can become inconvenient for complex models; * there is no support for Nurbs and only very limited support for trimmed surfaces in Gmsh's scripting language (however you can import STEP or IGES models with such features when Gmsh is built with OpenCascade support); * Gmsh is not primarily a structured mesh generator: no automatic quadrilateral or hexahedral meshing algorithm is provided. If you want quadrangles, you have to use transfinite or extruded meshes or recombine unstructured triangular meshes. For hexahedra, your only choice is transfinite or extruded meshes; * Gmsh is not a multi-bloc generator: all meshes produced by Gmsh are conforming in the sense of finite element meshes; * Gmsh was designed to solve academic "test cases", not industrial-size problems. You may find that Gmsh is too slow for large problems (with thousands of geometric primitives, or millions of mesh/post-processing elements). If you have the skills and some free time, feel free to join the project! We gladly accept any code contributions (*note Programming notes::) to remedy the aforementioned (and all other) shortcomings... 1.7 Syntactic rules used in this document ========================================= Here are the rules we tried to follow when writing this user's guide. Note that metasyntactic variable definitions stay valid throughout the manual (and not only in the sections where the definitions appear). 1. Keywords and literal symbols are printed like `this'. 2. Metasyntactic variables (i.e., text bits that are not part of the syntax, but stand for other text bits) are printed like THIS. 3. A colon (`:') after a metasyntactic variable separates the variable from its definition. 4. Optional rules are enclosed in `<' `>' pairs. 5. Multiple choices are separated by `|'. 6. Three dots (...) indicate a possible (multiple) repetition of the preceding rule. 1.8 Comments ============ All Gmsh ASCII text input files support both C and C++ style comments: 1. any text comprised between `/*' and `*/' pairs is ignored; 2. the rest of a line after a double slash `//' is ignored. These commands won't have the described effects inside double quotes or inside keywords. Also note that `white space' (spaces, tabs, new line characters) is ignored inside all expressions. 2 General tools *************** This chapter describes the general commands and options that can be used in Gmsh's ASCII text input files. By "general", we mean "not specifically related to one of the geometry, mesh, solver or post-processing modules". Commands peculiar to these modules will be introduced in *Note Geometry module::, *Note Mesh module::, *Note Solver module::, and *Note Post-processing module::, respectively. Note that, if you are just beginning to use Gmsh, or just want to see what Gmsh is all about, you really don't need to read this chapter and the four next ones. Just have a quick look at *Note Running Gmsh::, and go play with the graphical user interface, running the tutorials and demonstration files bundled in the distribution! Most of the commands and options described in the following chapters are available interactively in the GUI, so you don't need to worry about Gmsh's internals for creating your first geometries, meshes and post-processing plots. Once you master the tutorial (read the source files: they are heavily commented--see *Note Tutorial::), you might want to come back here to learn more about the specific syntax of Gmsh's 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. 2.1.1 Floating point expressions -------------------------------- Floating point expressions (or, more simply, "expressions") are denoted by the metasyntactic variable EXPRESSION (remember the definition of the syntactic rules in *Note Syntactic rules::), and are evaluated during the parsing of the data file: EXPRESSION: REAL | STRING | STRING [ EXPRESSION ] | # STRING [ ] | ( EXPRESSION ) | OPERATOR-UNARY-LEFT EXPRESSION | EXPRESSION OPERATOR-UNARY-RIGHT | EXPRESSION OPERATOR-BINARY EXPRESSION | EXPRESSION OPERATOR-TERNARY-LEFT EXPRESSION OPERATOR-TERNARY-RIGHT EXPRESSION | BUILT-IN-FUNCTION | REAL-OPTION | GetValue("STRING", EXPRESSION) Such EXPRESSIONs are used in most of Gmsh's commands. The third and fourth cases in this definition permit to extract one item from a list (see below) and get the size of a list, respectively. The operators OPERATOR-UNARY-LEFT, OPERATOR-UNARY-RIGHT, OPERATOR-BINARY, OPERATOR-TERNARY-LEFT and OPERATOR-TERNARY-RIGHT are defined in *Note Operators::. For the definition of BUILT-IN-FUNCTIONs, see *Note Built-in functions::. The various REAL-OPTIONs are listed in *Note General options::, *Note Geometry options::, *Note Mesh options::, *Note Solver options::, and *Note Post-processing options::. The last case in the definition allows to ask the user for a value interactively. For example, inserting `GetValue("Value of parameter alpha?", 5.76)' in an input file will query the user for the value of a certain parameter alpha, assuming the default value is 5.76. If the option `General.NoPopup' is set (*note General options::), no question is asked and the default value is automatically used. List of expressions are also widely used, and are defined 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 definition permits to create a list containing the range of numbers comprised between two EXPRESSIONs, with a unit incrementation step. The third case also permits to create a list containing the range of numbers comprised between two EXPRESSIONs, but with a positive or negative incrementation step equal to the third EXPRESSION. The fourth case permits to reference an expression list. The fifth 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 (*note Points::). The last two cases permit to retrieve the indices of entities created through geometrical transformations and extrusions (see *Note Transformations::, and *Note Extrusions::). To see the practical use of such expressions, have a look at the first couple of examples in *Note Tutorial::. 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. 2.1.2 Character expressions --------------------------- Character expressions are defined as: CHAR-EXPRESSION: "STRING" | Today | StrPrefix ( CHAR-EXPRESSION ) | 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 definition permit to take the prefix (e.g. to remove the extension) or the relative path of a string. The fifth 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 floating 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 *Note General options::, *Note Geometry options::, *Note Mesh options::, *Note Solver options::, and *Note Post-processing options::. Character expressions are mostly used to specify non-numeric options and input/output file names. See *Note t8.geo::, for an interesting usage of CHAR-EXPRESSIONs in an animation script. 2.1.3 Color expressions ----------------------- Colors expressions are hybrids between fixed-length braced EXPRESSION-LISTs and STRINGs: COLOR-EXPRESSION: STRING | { EXPRESSION, EXPRESSION, EXPRESSION } | { EXPRESSION, EXPRESSION, EXPRESSION, EXPRESSION } | COLOR-OPTION The first case permits to use the X Windows names to refer to colors, e.g., `Red', `SpringGreen', `LavenderBlush3', ... (see `Common/Colors.h' in Gmsh's source tree for a complete list). The second case permits to define colors by using three expressions to specify their red, green and blue components (with values comprised between 0 and 255). The third case permits to define colors by using their red, green and blue color components as well as their alpha channel. The last case permits to use the value of a COLOR-OPTION as a COLOR-EXPRESSION. The various COLOR-OPTIONs are listed in *Note General options::, *Note Geometry options::, *Note Mesh options::, *Note Solver options::, and *Note Post-processing options::. See *Note t3.geo::, for an example of the use of color expressions. 2.2 Operators ============= Gmsh's operators are similar to the corresponding operators in C and C++. Here is the list of the unary, binary and ternary operators currently implemented. OPERATOR-UNARY-LEFT: `-' Unary minus. `!' Logical not. OPERATOR-UNARY-RIGHT: `++' Post-incrementation. `--' Post-decrementation. OPERATOR-BINARY: `^' Exponentiation. `*' Multiplication. `/' Division. `%' Modulo. `+' Addition. `-' Subtraction. `==' Equality. `!=' Inequality. `>' Greater. `>=' Greater or equality. `<' Less. `<=' Less or equality. `&&' Logical `and'. `||' Logical `or'. (Warning: the logical `or' always implies the evaluation of both arguments. That is, unlike in C or C++, the second operand of `||' is evaluated even if the first one is true). OPERATOR-TERNARY-LEFT: `?' OPERATOR-TERNARY-RIGHT: `:' The only ternary operator, formed by OPERATOR-TERNARY-LEFT and OPERATOR-TERNARY-RIGHT, returns the value of its second argument if the first argument is non-zero; otherwise it returns the value of its third argument. The evaluation priorities are summarized below(1) (*note Operators-Footnote-1::) (from stronger to weaker, i.e., `*' has a highest evaluation priority than `+'). Parentheses `()' may be used anywhere to change the order of evaluation: 1. `()', `[]', `.', `#' 2. `^' 3. `!', `++', `--', `-' (unary) 4. `*', `/', `%' 5. `+', `-' 6. `<', `>', `<=', `>=' 7. `==', `!=' 8. `&&' 9. `||' 10. `?:' 11. `=', `+=', `-=', `*=', `/=' (1) The affectation operators are introduced in *Note General commands::. 2.3 Built-in functions ====================== A built-in function is composed of an identifier followed by a pair of parentheses containing an EXPRESSION-LIST (the list of its arguments)(1) (*note Built-in functions-Footnote-1::). Here is the list of the built-in functions currently implemented: BUILD-IN-FUNCTION: `Acos ( EXPRESSION )' Arc cosine (inverse cosine) of an EXPRESSION in [-1,1]. Returns a value in [0,Pi]. `Asin ( EXPRESSION )' Arc sine (inverse sine) of an EXPRESSION in [-1,1]. Returns a value in [-Pi/2,Pi/2]. `Atan ( EXPRESSION )' Arc tangent (inverse tangent) of EXPRESSION. Returns a value in [-Pi/2,Pi/2]. `Atan2 ( EXPRESSION, EXPRESSION )' Arc tangent (inverse tangent) of the first EXPRESSION divided by the second. Returns a value in [-Pi,Pi]. `Ceil ( EXPRESSION )' Rounds EXPRESSION up to the nearest integer. `Cos ( EXPRESSION )' Cosine of EXPRESSION. `Cosh ( EXPRESSION )' Hyperbolic cosine of EXPRESSION. `Exp ( EXPRESSION )' Returns the value of e (the base of natural logarithms) raised to the power of EXPRESSION. `Fabs ( EXPRESSION )' Absolute value of EXPRESSION. `Fmod ( EXPRESSION, EXPRESSION )' Remainder of the division of the first EXPRESSION by the second, with the sign of the first. `Floor ( EXPRESSION )' Rounds EXPRESSION down to the nearest integer. `Hypot ( EXPRESSION, EXPRESSION )' Returns the square root of the sum of the square of its two arguments. `Log ( EXPRESSION )' Natural logarithm of EXPRESSION (EXPRESSION > 0). `Log10 ( EXPRESSION )' Base 10 logarithm of EXPRESSION (EXPRESSION > 0). `Modulo ( EXPRESSION, EXPRESSION )' see `Fmod( EXPRESSION, EXPRESSION )'. `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. (1) For compatibility with GetDP (`http://www.geuz.org/getdp/'), parentheses can be replaced by brackets `[]'. 2.4 User-defined functions ========================== User-defined functions take no arguments, and are evaluated as if a file containing the function body was included at the location of the `Call' statement. `Function STRING' Begins the declaration of a user-defined function named STRING. The body of the function starts on the line after ``Function STRING'', and can contain any Gmsh command. `Return' Ends the body of the current user-defined function. Function declarations cannot be imbricated. `Call STRING;' Executes the body of a (previously defined) function named STRING. See *Note t5.geo::, for an example of a user-defined function. 2.5 Loops and conditionals ========================== Loops and conditionals are defined as follows, and can be imbricated: `For ( EXPRESSION : EXPRESSION )' Iterates from the value of the first EXPRESSION to the value of the second EXPRESSION, with a unit incrementation step. At each iteration, the commands comprised between ``For ( EXPRESSION : EXPRESSION )'' and the matching `EndFor' are executed. `For ( EXPRESSION : EXPRESSION : EXPRESSION )' Iterates from the value of the first EXPRESSION to the value of the second 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 first EXPRESSION to the value of the second EXPRESSION, with a unit incrementation step. At each iteration, the value of the iterate is affected to an expression named STRING, and the commands comprised between ``For STRING In { EXPRESSION : EXPRESSION }'' and the matching `EndFor' are executed. `For STRING In { EXPRESSION : EXPRESSION : EXPRESSION }' Iterates from the value of the first EXPRESSION to the value of the second EXPRESSION, with a positive or negative incrementation step equal to the third EXPRESSION. At each iteration, the value of the iterate is affected to an expression named STRING, and the commands comprised between ``For STRING In { EXPRESSION : EXPRESSION : 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 *Note t5.geo::, for an example of `For' and `If' commands. Gmsh does not provide any `Else' (or similar) command at the time of this writing. 2.6 General commands ==================== The following commands can be used anywhere in a Gmsh ASCII text input file: `STRING = EXPRESSION;' Creates a new expression identifier STRING, or affects EXPRESSION to an existing expression identifier. Eleven expression identifiers are predefined (hardcoded in Gmsh's parser): `Pi' Returns 3.1415926535897932. `GMSH_MAJOR_VERSION' Returns Gmsh's major version number. `GMSH_MINOR_VERSION' Returns Gmsh's minor version number. `GMSH_PATCH_VERSION' Returns Gmsh's patch version number. `MPI_Size' Returns the number of processors on which Gmsh is running (always 1, except if you compiled Gmsh's parallel extensions). `MPI_Rank' Returns the rank of the current processor. `newp' Returns the next available point number. As explained in *Note Geometry module::, a unique number must be associated with every geometrical point: `newp' permits to know the highest number already attributed (plus one). This is mostly useful when writing user-defined functions (*note User-defined functions::) or general geometric primitives, when one does not know _a priori_ which numbers are already attributed, and which ones are still available. `newl' Returns the next available line number. `news' Returns the next available surface number. `newv' Returns the next available volume number. `newll' Returns the next available line loop number. `newsl' Returns the next available surface loop number. `newreg' Returns the next available region number. That is, `newreg' returns the maximum of `newp', `newl', `news', `newv' and all physical entity numbers(1) (*note General commands-Footnote-1::). `STRING [ ] = { };' Creates a new expression list identifier `STRING[]' with an empty list. `STRING [ ] = { EXPRESSION-LIST };' Creates a new expression list identifier `STRING[]' with the list EXPRESSION-LIST, or affects EXPRESSION-LIST to an existing expression list identifier. (Remember the remark we made when we defined EXPRESSION-LISTs: the braces enclosing an EXPRESSION-LIST are optional if the list only contains a single item.) `STRING [ { EXPRESSION-LIST } ] = { EXPRESSION-LIST };' Affects each item in the right hand side EXPRESSION-LIST to the elements (indexed by the left hand side EXPRESSION-LIST) of an existing expression list identifier. The two EXPRESSION-LISTs must contain the same number of items. `REAL-OPTION = EXPRESSION;' Affects EXPRESSION to a real option. `CHAR-OPTION = CHAR-EXPRESSION;' Affects CHAR-EXPRESSION to a character option. `COLOR-OPTION = COLOR-EXPRESSION;' Affects COLOR-EXPRESSION to a color option. `STRING | REAL-OPTION += EXPRESSION;' Adds and affects EXPRESSION to an existing expression identifier or to a real option. `STRING | REAL-OPTION -= EXPRESSION;' Subtracts and affects EXPRESSION to an existing expression identifier or to a real option. `STRING | REAL-OPTION *= EXPRESSION;' Multiplies and affects EXPRESSION to an existing expression identifier or to a real option. `STRING | REAL-OPTION /= EXPRESSION;' Divides and affects EXPRESSION to an existing expression identifier or to a real option. `STRING [ ] += { EXPRESSION-LIST };' Appends EXPRESSION-LIST to an existing expression list or creates a new expression list with EXPRESSION-LIST). `STRING [ { EXPRESSION-LIST } ] += { EXPRESSION-LIST };' Adds and affects, item per item, the right hand side EXPRESSION-LIST to an existing expression list identifier. `STRING [ { EXPRESSION-LIST } ] -= { EXPRESSION-LIST };' Subtracts and affects, item per item, the right hand side EXPRESSION-LIST to an existing expression list identifier. `STRING [ { EXPRESSION-LIST } ] *= { EXPRESSION-LIST };' Multiplies and affects, item per item, the right hand side EXPRESSION-LIST to an existing expression list identifier. `STRING [ { EXPRESSION-LIST } ] /= { EXPRESSION-LIST };' Divides and affects, item per item, the right hand side EXPRESSION-LIST to an existing expression list identifier. `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 floating point values in Gmsh (*note Expressions::), so that only valid floating point formatting characters make sense in CHAR-EXPRESSION. See *Note t5.geo::, for an example of the use of `Printf'. `Printf ( CHAR-EXPRESSION , EXPRESSION-LIST ) > CHAR-EXPRESSION;' Same as `Printf' above, but output the expression in a file. `Printf ( CHAR-EXPRESSION , EXPRESSION-LIST ) >> CHAR-EXPRESSION;' Same as `Printf' above, but appends the expression at the end of the file. `Merge CHAR-EXPRESSION;' Merges a file 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 file. `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 files are included or merged). The bounding box is computed as follows: 1. If there is a mesh (i.e., at least one mesh vertex), the bounding box is taken as the box enclosing all the mesh vertices; 2. If there is no mesh but there is a geometry (i.e., at least one geometrical point), the bounding box is taken as the box enclosing all the geometrical points; 3. If there is no mesh and no geometry, but there are some post-processing views, the bounding box is taken as the box enclosing all the primitives in the views. `BoundingBox { EXPRESSION, EXPRESSION, EXPRESSION, EXPRESSION, EXPRESSION, EXPRESSION };' Forces the bounding box of the scene to the given EXPRESSIONs (X min, X max, Y min, Y max, Z min, Z max). `Delete 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 file named CHAR-EXPRESSION, using the current `Print.Format' (*note General options::). If the path in CHAR-EXPRESSION is not absolute, CHAR-EXPRESSION is appended to the path of the current file. `Sleep EXPRESSION;' Suspends the execution of Gmsh during EXPRESSION seconds. `Status EXPRESSION;' Forces mesh status to EXPRESSION. `System CHAR-EXPRESSION;' Executes a system call. `Include CHAR-EXPRESSION;' Includes the file named CHAR-EXPRESSION at the current position in the input file. The include command should be given on a line of its own. If the path in CHAR-EXPRESSION is not absolute, CHAR-EXPRESSION is appended to the path of the current file. (1) For compatibility purposes, the behavior of `newl', `news', `newv' and `newreg' can be modified with the `Geometry.OldNewReg' option (*note Geometry options::). 2.7 General options =================== Here is the list of the general CHAR-OPTIONs, REAL-OPTIONs and COLOR-OPTIONs (in that order--check the default values to see the actual types). Most of these options are accessible in the graphical user interface, but not all of them. When running Gmsh interactively, changing an option in the ASCII text input file will modify the option in the GUI in real time. This permits for example to resize the graphical window in a script, or to interact with animations in the script and in the GUI at the same time. Gmsh's default behavior is to save some of these options in a per-user "session resource" file (`General.SessionFileName') every time Gmsh is shut down. This permits for example to automatically remember the size and location of the windows or which fonts to use. Other options can be saved in a per-user "option" file (`General.OptionsFileName'), automatically loaded by Gmsh every time it starts up, by using the `Tools->Options->Save as defaults' menu. `General.AxesFormatX' Number format for X-axis (in standard C form) Default value: `"%.3g"' Saved in: `General.OptionsFileName' `General.AxesFormatY' Number format for Y-axis (in standard C form) Default value: `"%.3g"' Saved in: `General.OptionsFileName' `General.AxesFormatZ' Number format for Z-axis (in standard C form) Default value: `"%.3g"' Saved in: `General.OptionsFileName' `General.AxesLabelX' X-axis label Default value: `""' Saved in: `General.OptionsFileName' `General.AxesLabelY' Y-axis label Default value: `""' Saved in: `General.OptionsFileName' `General.AxesLabelZ' Z-axis label Default value: `""' Saved in: `General.OptionsFileName' `General.DefaultFileName' Default project file name Default value: `"untitled.geo"' Saved in: `General.OptionsFileName' `General.Display' X server to use (only for Unix versions) Default value: `""' Saved in: `-' `General.ErrorFileName' File into which the log is saved if a fatal error occurs Default value: `".gmsh-errors"' Saved in: `General.OptionsFileName' `General.FileName' Current project file name (read-only) Default value: `""' Saved in: `-' `General.FltkTheme' FLTK user interface theme (try e.g. plastic or gtk+) Default value: `""' Saved in: `General.OptionsFileName' `General.GraphicsFont' Font used in the graphic window Default value: `"Helvetica"' Saved in: `General.OptionsFileName' `General.OptionsFileName' Option file created with `Tools->Options->Save'; automatically read on startup Default value: `".gmsh-options"' Saved in: `General.SessionFileName' `General.SessionFileName' Option file into which session specific information is saved; automatically read on startup Default value: `".gmshrc"' Saved in: `-' `General.TextEditor' System command to launch a text editor Default value: `"open -t %s"' Saved in: `General.OptionsFileName' `General.TmpFileName' Temporary file used by the geometry module Default value: `".gmsh-tmp"' Saved in: `General.SessionFileName' `General.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.Antialiasing' Use multisample antialiasing (will slow down rendering) Default value: `0' Saved in: `General.OptionsFileName' `General.ArrowHeadRadius' Relative radius of arrow head Default value: `0.12' Saved in: `General.OptionsFileName' `General.ArrowStemLength' Relative length of arrow stem Default value: `0.56' Saved in: `General.OptionsFileName' `General.ArrowStemRadius' Relative radius of arrow stem Default value: `0.02' Saved in: `General.OptionsFileName' `General.Axes' Axes (0=none, 1=simple axes, 2=box, 3=full grid, 4=open grid, 5=ruler) Default value: `0' Saved in: `General.OptionsFileName' `General.AxesMikado' Mikado axes style Default value: `0' Saved in: `General.OptionsFileName' `General.AxesAutoPosition' Position the axes automatically Default value: `1' Saved in: `General.OptionsFileName' `General.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' `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 coefficient in equation for clipping plane 0 (`A' in `AX+BY+CZ+D=0') Default value: `1' Saved in: `-' `General.Clip0B' Second coefficient in equation for clipping plane 0 (`B' in `AX+BY+CZ+D=0') Default value: `0' Saved in: `-' `General.Clip0C' Third coefficient in equation for clipping plane 0 (`C' in `AX+BY+CZ+D=0') Default value: `0' Saved in: `-' `General.Clip0D' Fourth coefficient in equation for clipping plane 0 (`D' in `AX+BY+CZ+D=0') Default value: `0' Saved in: `-' `General.Clip1' Enable clipping plane 1 (Geometry=2^0, Mesh=2^1, View[i]=2^(2+i)) Default value: `0' Saved in: `-' `General.Clip1A' First coefficient in equation for clipping plane 1 Default value: `1' Saved in: `-' `General.Clip1B' Second coefficient in equation for clipping plane 1 Default value: `0' Saved in: `-' `General.Clip1C' Third coefficient in equation for clipping plane 1 Default value: `0' Saved in: `-' `General.Clip1D' Fourth coefficient in equation for clipping plane 1 Default value: `0' Saved in: `-' `General.Clip2' Enable clipping plane 2 (Geometry=2^0, Mesh=2^1, View[i]=2^(2+i)) Default value: `0' Saved in: `-' `General.Clip2A' First coefficient in equation for clipping plane 2 Default value: `1' Saved in: `-' `General.Clip2B' Second coefficient in equation for clipping plane 2 Default value: `0' Saved in: `-' `General.Clip2C' Third coefficient in equation for clipping plane 2 Default value: `0' Saved in: `-' `General.Clip2D' Fourth coefficient 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 coefficient in equation for clipping plane 3 Default value: `1' Saved in: `-' `General.Clip3B' Second coefficient in equation for clipping plane 3 Default value: `0' Saved in: `-' `General.Clip3C' Third coefficient in equation for clipping plane 3 Default value: `0' Saved in: `-' `General.Clip3D' Fourth coefficient in equation for clipping plane 3 Default value: `0' Saved in: `-' `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 coefficient in equation for clipping plane 4 Default value: `1' Saved in: `-' `General.Clip4B' Second coefficient in equation for clipping plane 4 Default value: `0' Saved in: `-' `General.Clip4C' Third coefficient in equation for clipping plane 4 Default value: `0' Saved in: `-' `General.Clip4D' Fourth coefficient 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 coefficient in equation for clipping plane 5 Default value: `1' Saved in: `-' `General.Clip5B' Second coefficient in equation for clipping plane 5 Default value: `0' Saved in: `-' `General.Clip5C' Third coefficient in equation for clipping plane 5 Default value: `0' Saved in: `-' `General.Clip5D' Fourth coefficient 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-buffer resolution) 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=dark, 1=light or 2=grayscale) Default value: `1' Saved in: `General.OptionsFileName' `General.ConfirmOverwrite' Ask confirmation before overwriting files? Default value: `1' Saved in: `General.OptionsFileName' `General.ContextPositionX' Horizontal position (in pixels) of the upper left corner of the contextual windows Default value: `650' Saved in: `General.SessionFileName' `General.ContextPositionY' Vertical position (in pixels) of the upper left corner of the contextual windows Default value: `150' Saved in: `General.SessionFileName' `General.DoubleBuffer' Use a double buffered graphic window (on Unix, should be set to 0 when working on a remote host without GLX) Default value: `1' Saved in: `General.OptionsFileName' `General.DrawBoundingBoxes' Draw bounding boxes Default value: `0' Saved in: `General.OptionsFileName' `General.ExpertMode' Enable expert mode (to disable all the messages meant for inexperienced users) Default value: `0' Saved in: `General.OptionsFileName' `General.FastRedraw' Draw simplified model while rotating, panning and zooming Default value: `0' Saved in: `General.OptionsFileName' `General.FileChooserPositionX' Horizontal position (in pixels) of the upper left corner of the file chooser windows Default value: `200' Saved in: `General.SessionFileName' `General.FileChooserPositionY' Vertical position (in pixels) of the upper left corner of the file chooser windows Default value: `200' Saved in: `General.SessionFileName' `General.FontSize' Size of the font in the user interface (-1=automatic) Default value: `-1' Saved in: `General.OptionsFileName' `General.GraphicsFontSize' Size of the font in the graphic window Default value: `17' 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' `General.Light0X' X position of light source 0 Default value: `0.65' Saved in: `General.OptionsFileName' `General.Light0Y' Y position of light source 0 Default value: `0.65' Saved in: `General.OptionsFileName' `General.Light0Z' Z position of light source 0 Default value: `1' Saved in: `General.OptionsFileName' `General.Light0W' Divisor of the X, Y and Z coordinates of light source 0 (W=0 means infinitely far source) Default value: `0' Saved in: `General.OptionsFileName' `General.Light1' Enable light source 1 Default value: `0' Saved in: `General.OptionsFileName' `General.Light1X' X position of light source 1 Default value: `0.5' Saved in: `General.OptionsFileName' `General.Light1Y' Y position of light source 1 Default value: `0.3' Saved in: `General.OptionsFileName' `General.Light1Z' Z position of light source 1 Default value: `1' Saved in: `General.OptionsFileName' `General.Light1W' Divisor of the X, Y and Z coordinates of light source 1 (W=0 means infinitely far source) Default value: `0' Saved in: `General.OptionsFileName' `General.Light2' Enable light source 2 Default value: `0' Saved in: `General.OptionsFileName' `General.Light2X' X position of light source 2 Default value: `0.5' Saved in: `General.OptionsFileName' `General.Light2Y' Y position of light source 2 Default value: `0.3' Saved in: `General.OptionsFileName' `General.Light2Z' Z position of light source 2 Default value: `1' Saved in: `General.OptionsFileName' `General.Light2W' Divisor of the X, Y and Z coordinates of light source 2 (W=0 means infinitely far source) Default value: `0' Saved in: `General.OptionsFileName' `General.Light3' Enable light source 3 Default value: `0' Saved in: `General.OptionsFileName' `General.Light3X' X position of light source 3 Default value: `0.5' Saved in: `General.OptionsFileName' `General.Light3Y' Y position of light source 3 Default value: `0.3' Saved in: `General.OptionsFileName' `General.Light3Z' Z position of light source 3 Default value: `1' Saved in: `General.OptionsFileName' `General.Light3W' Divisor of the X, Y and Z coordinates of light source 3 (W=0 means infinitely far source) Default value: `0' Saved in: `General.OptionsFileName' `General.Light4' Enable light source 4 Default value: `0' Saved in: `General.OptionsFileName' `General.Light4X' X position of light source 4 Default value: `0.5' Saved in: `General.OptionsFileName' `General.Light4Y' Y position of light source 4 Default value: `0.3' Saved in: `General.OptionsFileName' `General.Light4Z' Z position of light source 4 Default value: `1' Saved in: `General.OptionsFileName' `General.Light4W' Divisor of the X, Y and Z coordinates of light source 4 (W=0 means infinitely far source) Default value: `0' Saved in: `General.OptionsFileName' `General.Light5' Enable light source 5 Default value: `0' Saved in: `General.OptionsFileName' `General.Light5X' X position of light source 5 Default value: `0.5' Saved in: `General.OptionsFileName' `General.Light5Y' Y position of light source 5 Default value: `0.3' Saved in: `General.OptionsFileName' `General.Light5Z' Z position of light source 5 Default value: `1' Saved in: `General.OptionsFileName' `General.Light5W' Divisor of the X, Y and Z coordinates of light source 5 (W=0 means infinitely far source) Default value: `0' Saved in: `General.OptionsFileName' `General.LineWidth' Display width of lines (in pixels) Default value: `1' Saved in: `General.OptionsFileName' `General.ManipulatorPositionX' Horizontal position (in pixels) of the upper left corner of the manipulator 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.MaxX' Maximum model coordinate along the X-axis (read-only) Default value: `1' Saved in: `-' `General.MaxY' Maximum model coordinate along the Y-axis (read-only) Default value: `1' Saved in: `-' `General.MaxZ' Maximum model coordinate along the Z-axis (read-only) Default value: `1' Saved in: `-' `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: `490' Saved in: `General.SessionFileName' `General.MessageHeight' Height (in pixels) of the message window Default value: `180' Saved in: `General.SessionFileName' `General.MessageWidth' Width (in pixels) of the message window Default value: `100' Saved in: `General.SessionFileName' `General.MinX' Minimum model coordinate along the X-axis (read-only) Default value: `0' Saved in: `-' `General.MinY' Minimum model coordinate along the Y-axis (read-only) Default value: `0' Saved in: `-' `General.MinZ' Minimum model coordinate along the Z-axis (read-only) Default value: `0' Saved in: `-' `General.MouseHoverMeshes' Enable mouse hover on meshes Default value: `0' Saved in: `General.OptionsFileName' `General.MouseSelection' Enable mouse selection Default value: `1' Saved in: `General.OptionsFileName' `General.NonModalWindows' Force all control windows to be on top of the graphic window ("non-modal") Default value: `1' Saved in: `General.SessionFileName' `General.NoPopup' Disable interactive dialog windows in scripts (and use default values instead) Default value: `0' Saved in: `General.OptionsFileName' `General.OptionsPositionX' Horizontal position (in pixels) of the upper left corner of the option window Default value: `650' Saved in: `General.SessionFileName' `General.OptionsPositionY' Vertical position (in pixels) of the upper left corner of the option window Default value: `150' Saved in: `General.SessionFileName' `General.Orthographic' Orthographic projection mode (0=perspective projection) Default value: `1' Saved in: `General.OptionsFileName' `General.PluginPositionX' Horizontal position (in pixels) of the upper left corner of the plugin window Default value: `650' Saved in: `General.SessionFileName' `General.PluginPositionY' Vertical position (in pixels) of the upper left corner of the plugin window Default value: `550' Saved in: `General.SessionFileName' `General.PluginWidth' Width (in pixels) of the plugin window Default value: `100' Saved in: `General.SessionFileName' `General.PluginHeight' Height (in pixels) of the plugin window Default value: `100' Saved in: `General.SessionFileName' `General.FieldPositionX' Horizontal position (in pixels) of the upper left corner of the field window Default value: `650' Saved in: `General.SessionFileName' `General.FieldPositionY' Vertical position (in pixels) of the upper left corner of the field window Default value: `550' Saved in: `General.SessionFileName' `General.FieldWidth' Width (in pixels) of the field window Default value: `100' Saved in: `General.SessionFileName' `General.FieldHeight' Height (in pixels) of the field window Default value: `100' Saved in: `General.SessionFileName' `General.PointSize' Display size of points (in pixels) Default value: `3' Saved in: `General.OptionsFileName' `General.PolygonOffsetAlwaysOn' Always apply polygon offset, instead of trying to detect when it is required Default value: `0' Saved in: `General.OptionsFileName' `General.PolygonOffsetFactor' Polygon offset factor (offset = factor * DZ + r * units) Default value: `0.5' Saved in: `General.OptionsFileName' `General.PolygonOffsetUnits' Polygon offset units (offset = factor * DZ + r * units) Default value: `1' Saved in: `General.OptionsFileName' `General.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) 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 specific information in General.SessionFileName each time you quit Gmsh? Default value: `1' Saved in: `General.SessionFileName' `General.ScaleX' X-axis scale factor Default value: `1' Saved in: `-' `General.ScaleY' Y-axis scale factor Default value: `1' Saved in: `-' `General.ScaleZ' Z-axis scale factor Default value: `1' Saved in: `-' `General.Shininess' Material shininess Default value: `0.4' Saved in: `General.OptionsFileName' `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' `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: `-' `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.VisibilityPositionX' Horizontal position (in pixels) of the upper left corner of the visibility window Default value: `650' Saved in: `General.SessionFileName' `General.VisibilityPositionY' Vertical position (in pixels) of the upper left corner of the visibility window Default value: `150' Saved in: `General.SessionFileName' `General.ZoomFactor' Middle mouse button zoom acceleration factor Default value: `4' Saved in: `General.OptionsFileName' `General.Color.Background' Background color Default value: `{255,255,255}' Saved in: `General.OptionsFileName' `General.Color.BackgroundGradient' Background gradient color Default value: `{128,147,255}' Saved in: `General.OptionsFileName' `General.Color.Foreground' Foreground color Default value: `{85,85,85}' Saved in: `General.OptionsFileName' `General.Color.Text' Text color Default value: `{0,0,0}' Saved in: `General.OptionsFileName' `General.Color.Axes' Axes color Default value: `{0,0,0}' Saved in: `General.OptionsFileName' `General.Color.SmallAxes' Small axes color Default value: `{0,0,0}' Saved in: `General.OptionsFileName' `General.Color.AmbientLight' Ambient light color Default value: `{25,25,25}' Saved in: `General.OptionsFileName' `General.Color.DiffuseLight' Diffuse light color Default value: `{255,255,255}' Saved in: `General.OptionsFileName' `General.Color.SpecularLight' Specular light color Default value: `{255,255,255}' Saved in: `General.OptionsFileName' `Print.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 file size) Default value: `1' Saved in: `General.OptionsFileName' `Print.EpsPointSizeFactor' Size factor for points in PostScript/PDF output Default value: `1' Saved in: `General.OptionsFileName' `Print.EpsPS3Shading' Enable PostScript Level 3 shading Default value: `0' Saved in: `General.OptionsFileName' `Print.EpsQuality' PostScript/PDF quality (0=bitmap, 1=vector (simple sort), 2=vector (accurate sort), 3=vector (unsorted) Default value: `1' Saved in: `General.OptionsFileName' `Print.Format' File format (10=automatic) Default value: `10' Saved in: `General.OptionsFileName' `Print.GeoLabels' Save labels in unrolled Gmsh geometries Default value: `1' Saved in: `General.OptionsFileName' `Print.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' `Print.PostElementary' Save elementary region tags in mesh statistics exported as post-processing views Default value: `1' Saved in: `General.OptionsFileName' `Print.PostElement' Save element numbers in mesh statistics exported as post-processing views Default value: `0' Saved in: `General.OptionsFileName' `Print.PostGamma' Save Gamma quality measure in mesh statistics exported as post-processing views Default value: `0' Saved in: `General.OptionsFileName' `Print.PostEta' Save Eta quality measure in mesh statistics exported as post-processing views Default value: `0' Saved in: `General.OptionsFileName' `Print.PostRho' Save Rho quality measure in mesh statistics exported as post-processing views Default value: `0' Saved in: `General.OptionsFileName' `Print.TexAsEquation' Print all TeX strings as equations Default value: `0' Saved in: `General.OptionsFileName' `Print.Text' Print text strings? Default value: `1' Saved in: `General.OptionsFileName' 3 Geometry module ***************** Gmsh's geometry module provides a simple CAD engine, using a bottom-up (boundary representation) approach: you need to first define points (using the `Point' command: see below), then lines (using `Line', `Circle', `Spline', ..., commands or by extruding points), then surfaces (using for example the `Plane Surface' or `Ruled Surface' commands, or by extruding lines), and finally volumes (using the `Volume' command or by extruding surfaces). These geometrical entities are called "elementary" in Gmsh's jargon, and are assigned identification numbers when they are created: 1. each elementary point must possess a unique identification number; 2. each elementary line must possess a unique identification number; 3. each elementary surface must possess a unique identification number; 4. each elementary volume must possess a unique identification number. Elementary geometrical entities can then be manipulated in various ways, for example using the `Translate', `Rotate', `Scale' or `Symmetry' commands. Compound groups of elementary geometrical entities can also be defined and are called "physical" entities. These physical entities cannot be modified by geometry commands: their only purpose is to assemble elementary entities into larger groups, possibly modifying their orientation, so that they can be referred to by the mesh module as single entities. As is the case with elementary entities, each physical point, physical line, physical surface or physical volume must be assigned a unique identification number. See *Note Mesh module::, for more information about how physical entities affect the way meshes are saved. 3.1 Geometry commands ===================== The next subsections describe all the available geometry commands. These commands can be used anywhere in a Gmsh ASCII text input file. Note that the following general syntax rule is followed for the definition of geometrical entities: "If an EXPRESSION defines a new entity, it is enclosed between parentheses. If an EXPRESSION refers to a previously defined entity, it is enclosed between braces." 3.1.1 Points ------------ `Point ( EXPRESSION ) = { EXPRESSION, EXPRESSION, EXPRESSION, EXPRESSION };' Creates an elementary point. The EXPRESSION inside the parentheses is the point's identification number; the three first EXPRESSIONs inside the braces on the right hand side give the three X, Y and Z coordinates of the point in the three-dimensional Euclidean space; the last EXPRESSION sets the characteristic mesh length at that point. See *Note Characteristic lengths::, for more information about how this characteristic length information is used in the meshing process. `Physical Point ( EXPRESSION | CHAR-EXPRESSION ) = { EXPRESSION-LIST };' Creates a physical point. The EXPRESSION inside the parentheses is the physical point's identification number (if a CHAR-EXPRESSION is given instead, a unique identification number is automatically created); the EXPRESSION-LIST on the right hand side should contain the identification numbers of all the elementary points that need to be grouped inside the physical point. 3.1.2 Lines ----------- `BSpline ( EXPRESSION ) = { EXPRESSION-LIST };' Creates a B-spline curve. The EXPRESSION inside the parentheses is the B-spline curve's identification number; the EXPRESSION-LIST on the right hand side should contain the identification numbers of all the B-spline's control points. Repeating control points has the expected effect. `Circle ( EXPRESSION ) = { EXPRESSION, EXPRESSION, EXPRESSION };' Creates a circle arc (strictly) smaller than Pi. The EXPRESSION inside the parentheses is the circle arc's identification number; the first EXPRESSION inside the braces on the right hand side gives the identification number of the start point of the arc; the second EXPRESSION gives the identification number of the center of the circle; the last EXPRESSION gives the identification 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 arc's identification number; the first EXPRESSION inside the braces on the right hand side gives the identification number of the start point of the arc; the second EXPRESSION gives the identification number of the center of the ellipse; the third EXPRESSION gives the identification number of any point located on the major axis of the ellipse; the last EXPRESSION gives the identification 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 segment's identification number; the two EXPRESSIONs inside the braces on the right hand side give identification numbers of the start and end points of the segment. `Spline ( EXPRESSION ) = { EXPRESSION-LIST };' Creates a spline curve. The EXPRESSION inside the parentheses is the spline's identification number; the EXPRESSION-LIST on the right hand side should contain the identification numbers of all the spline's control points. `Line Loop ( EXPRESSION ) = { EXPRESSION-LIST };' Creates an oriented line loop. The EXPRESSION inside the parentheses is the line loop's identification number; the EXPRESSION-LIST on the right hand side should contain the identification numbers of all the elementary lines that constitute the line loop. A line loop must be a closed loop, and the elementary lines should be ordered and oriented (using negative identification numbers to specify reverse orientation). If the orientation is correct, but the ordering is wrong, Gmsh will actually reorder the list internally to create a consistent loop. Although Gmsh supports it, it is not recommended to specify multiple line loops (or subloops) in a single `Line Loop' command. (Line loops are used to create surfaces: see *Note Surfaces::.) `Physical Line ( EXPRESSION | CHAR-EXPRESSION ) = { EXPRESSION-LIST };' Creates a physical line. The EXPRESSION inside the parentheses is the physical line's identification number (if a CHAR-EXPRESSION is given instead, a unique identification number is automatically created); the EXPRESSION-LIST on the right hand side should contain the identification numbers of all the elementary lines that need to be grouped inside the physical line. Specifying negative identification numbers in the EXPRESSION-LIST will reverse the orientation of the mesh elements belonging to the corresponding elementary lines in the saved mesh. 3.1.3 Surfaces -------------- `Plane Surface ( EXPRESSION ) = { EXPRESSION-LIST };' Creates a plane surface. The EXPRESSION inside the parentheses is the plane surface's identification number; the EXPRESSION-LIST on the right hand side should contain the identification numbers of all the line loops defining the surface. The first line loop defines the exterior boundary of the surface; all other line loops define holes in the surface. A line loop defining a hole should not have any lines in common with the exterior line loop (in which case it is not a hole, and the two surfaces should be defined separately). Likewise, a line loop defining a hole should not have any lines in common with another line loop defining a hole in the same surface (in which case the two line loops should be combined). `Ruled Surface ( EXPRESSION ) = { EXPRESSION-LIST };' Creates a ruled surface, i.e., a surface that can be interpolated using transfinite interpolation. The EXPRESSION inside the parentheses is the ruled surface's identification number; the EXPRESSION-LIST on the right hand side should the identification 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 loop's identification number; the EXPRESSION-LIST on the right hand side should contain the identification numbers of all the elementary surfaces that constitute the surface loop. A surface loop must always represent a closed shell, and the elementary surfaces should be oriented consistently (using negative identification numbers to specify reverse orientation). (Surface loops are used to create volumes: see *Note Volumes::.) `Physical Surface ( EXPRESSION | CHAR-EXPRESSION ) = { EXPRESSION-LIST };' Creates a physical surface. The EXPRESSION inside the parentheses is the physical surface's identification number (if a CHAR-EXPRESSION is given instead, a unique identification number is automatically created); the EXPRESSION-LIST on the right hand side should contain the identification numbers of all the elementary surfaces that need to be grouped inside the physical surface. Specifying negative identification numbers in the EXPRESSION-LIST will reverse the orientation of the mesh elements belonging to the corresponding elementary surfaces in the saved mesh. 3.1.4 Volumes ------------- `Volume ( EXPRESSION ) = { EXPRESSION-LIST };' Creates a volume. The EXPRESSION inside the parentheses is the volume's identification number; the EXPRESSION-LIST on the right hand side should contain the identification numbers of all the surface loops defining the volume. The first surface loop defines the exterior boundary of the volume; all other surface loops define holes in the volume. A surface loop defining a hole should not have any surfaces in common with the exterior surface loop (in which case it is not a hole, and the two volumes should be defined separately). Likewise, a surface loop defining a hole should not have any surfaces in common with another surface loop defining a hole in the same volume (in which case the two surface loops should be combined). (A deprecated synonym for `Volume' is `Complex Volume'.) `Physical Volume ( EXPRESSION | CHAR-EXPRESSION ) = { EXPRESSION-LIST };' Creates a physical volume. The EXPRESSION inside the parentheses is the physical volume's identification number (if a CHAR-EXPRESSION is given instead, a unique identification number is automatically created); the EXPRESSION-LIST on the right hand side should contain the identification numbers of all the elementary volumes that need to be grouped inside the physical volume. 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 *Note Structured grids::, to see how these commands can be extended in order to also extrude the mesh): EXTRUDE: `Extrude { EXPRESSION-LIST } { EXTRUDE-LIST }' Extrudes all elementary entities (points, lines or surfaces) in EXTRUDE-LIST using a translation. The EXPRESSION-LIST should contain three EXPRESSIONs giving the X, Y and Z components of the translation vector. `Extrude { { EXPRESSION-LIST }, { EXPRESSION-LIST }, EXPRESSION } { EXTRUDE-LIST }' Extrudes all elementary entities (points, lines or surfaces) in EXTRUDE-LIST using a rotation. The first EXPRESSION-LIST should contain three EXPRESSIONs giving the X, Y and Z direction of the rotation axis; the second EXPRESSION-LIST should contain three EXPRESSIONs giving the X, Y and Z components of any point on this axis; the last EXPRESSION should contain the rotation angle (in radians). `Extrude { { EXPRESSION-LIST }, { EXPRESSION-LIST }, { EXPRESSION-LIST }, EXPRESSION } { EXTRUDE-LIST }' Extrudes all elementary entities (points, lines or surfaces) in EXTRUDE-LIST using a translation combined with a rotation. The first 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 first EXPRESSION-LIST should contain three EXPRESSIONs giving the X, Y and Z direction of the rotation axis; the second EXPRESSION-LIST should contain three EXPRESSIONs giving the X, Y and Z components of any point on this axis. `Symmetry { EXPRESSION-LIST } { TRANSFORM-LIST }' Transforms all elementary entities (points, lines or surfaces) symmetrically to a plane. The EXPRESSION-LIST should contain four EXPRESSIONs giving the coefficients of the plane's equation. `Translate { EXPRESSION-LIST } { TRANSFORM-LIST }' Translates all elementary entities (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. `Boundary { TRANSFORM-LIST }' (Not a transformation per-se.) Returns the boundary of the elementary entities in TRANSFORM-LIST. with TRANSFORM-LIST: Point | Line | Surface { EXPRESSION-LIST }; ... | Duplicata { Point | Line | Surface { EXPRESSION-LIST }; ... } | TRANSFORM 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 (*note Geometry options::). `Delete { Point | Line | Surface | Volume { EXPRESSION-LIST }; ... }' Deletes all elementary entities (points, lines, surfaces or volumes) whose identification 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 `"*"'). 3.2 Geometry options ==================== Geometry options control the behavior of geometry commands, as well as the way geometrical entities are handled in the graphical user interface. For the signification of the `Saved in:' field in the following list, see *Note General options::. `Geometry.AutoCoherence' Should all duplicate entities be automatically removed? Default value: `1' Saved in: `General.OptionsFileName' `Geometry.CirclePoints' Number of points used to draw a circle/ellipse Default value: `20' Saved in: `General.OptionsFileName' `Geometry.ExtrudeReturnLateralEntities' Add lateral entities in lists returned by extrusion commands? Default value: `1' Saved in: `General.OptionsFileName' `Geometry.ExtrudeSplinePoints' Number of control points for splines created during extrusion Default value: `5' Saved in: `General.OptionsFileName' `Geometry.HighlightOrphans' Highlight orphan entities (lines connected to a single surface, etc.)? Default value: `0' Saved in: `General.OptionsFileName' `Geometry.Light' Enable lighting for the geometry Default value: `1' Saved in: `General.OptionsFileName' `Geometry.LightTwoSide' Light both sides of surfaces (leads to slower rendering) Default value: `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), 3D cylinders (1) or tapered cylinders (2) Default value: `0' Saved in: `General.OptionsFileName' `Geometry.LineWidth' Display width of lines (in pixels) Default value: `2' Saved in: `General.OptionsFileName' `Geometry.Normals' Display size of normal vectors (in pixels) Default value: `0' Saved in: `General.OptionsFileName' `Geometry.OCCFixSmallEdges' Fix small edges in STEP, IGES and BRep models Default value: `1' Saved in: `General.OptionsFileName' `Geometry.OCCFixSmallFaces' Fix small faces in STEP, IGES and BRep models Default value: `1' Saved in: `General.OptionsFileName' `Geometry.OCCSewFaces' Sew faces in STEP, IGES and BRep models 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 definition for geometrical transformations (compatibility option for old Gmsh geometries) Default value: `1' Saved in: `General.OptionsFileName' `Geometry.Points' Display geometry points? Default value: `1' Saved in: `General.OptionsFileName' `Geometry.PointNumbers' Display points numbers? Default value: `0' Saved in: `General.OptionsFileName' `Geometry.PointSelectSize' Display size of selected points (in pixels) Default value: `5' Saved in: `General.OptionsFileName' `Geometry.PointSize' Display size of points (in pixels) Default value: `4' Saved in: `General.OptionsFileName' `Geometry.PointType' Display points as solid color dots (0), 3D spheres (1) or scaled spheres (2) 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' `Geometry.SurfaceNumbers' Display surface numbers? Default value: `0' Saved in: `General.OptionsFileName' `Geometry.SurfaceType' Surface display type (0=cross, 1=wireframe, 2=solid Default value: `2' Saved in: `General.OptionsFileName' `Geometry.Tangents' Display size of tangent vectors (in pixels) Default value: `0' Saved in: `General.OptionsFileName' `Geometry.Tolerance' Geometrical tolerance Default value: `1e-06' 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: `{90,90,90}' Saved in: `General.OptionsFileName' `Geometry.Color.Lines' Normal geometry curve color Default value: `{0,0,255}' Saved in: `General.OptionsFileName' `Geometry.Color.Surfaces' Normal geometry surface color Default value: `{128,128,128}' Saved in: `General.OptionsFileName' `Geometry.Color.Volumes' Normal geometry volume color Default value: `{255,255,0}' Saved in: `General.OptionsFileName' `Geometry.Color.Selection' Selected geometry color Default value: `{255,0,0}' Saved in: `General.OptionsFileName' `Geometry.Color.HighlightZero' Highlight 0 color Default value: `{255,0,0}' Saved in: `General.OptionsFileName' `Geometry.Color.HighlightOne' Highlight 1 color Default value: `{255,150,0}' Saved in: `General.OptionsFileName' `Geometry.Color.HighlightTwo' Highlight 2 color Default value: `{255,255,0}' Saved in: `General.OptionsFileName' `Geometry.Color.Tangents' Tangent geometry vectors color Default value: `{255,255,0}' Saved in: `General.OptionsFileName' `Geometry.Color.Normals' Normal geometry vectors color Default value: `{255,0,0}' Saved in: `General.OptionsFileName' `Geometry.Color.Projection' Projection surface color Default value: `{0,255,0}' Saved in: `General.OptionsFileName' 4 Mesh module ************* Gmsh's mesh module regroups several 1D, 2D and 3D mesh algorithms, all producing grids conforming in the sense of finite elements (*note Mesh::). The 2D _unstructured_ algorithms generate triangles or both triangles and quadrangles (when `Recombine Surface' is used: see *Note Miscellaneous mesh commands::). The 3D unstructured algorithms only generate tetrahedra. The 2D _structured_ algorithms (transfinite and extrusion) generate triangles by default, but quadrangles can be obtained by using the `Recombine' commands (see *Note Structured grids::, and *Note Miscellaneous mesh commands::). The 3D structured algorithms generate tetrahedra, hexahedra, prisms and pyramids, depending on the type of the surface meshes they are based on. 4.1 Elementary vs. physical entities ==================================== If only elementary geometrical entities are defined (or if the `Mesh.SaveAll' option is set; see *Note Mesh options::), the grid produced by the mesh module will be saved "as is". That is, all the elements in the grid will be saved to disk using the identification number of the elementary entities they discretize as their elementary region number (and 0 as their physical region number(1) (*note Elementary vs physical entities-Footnote-1::); *Note File formats::). This can sometimes be inconvenient: * mesh elements cannot be duplicated; * the orientation of the mesh elements (the ordering of their nodes) is determined entirely by the orientation of their "parent" elementary entities, and cannot be modified; * elements belonging to different elementary entities cannot be linked as being part of a larger group having a physical or mathematical meaning (like `Left wing', `Metallic part', `Dirichlet boundary condition', ...). To remedy these problems, the geometry module (*note Geometry module::) introduces the notion of "physical" entities (also called "physical groups"). The purpose of physical entities is to assemble elementary entities into larger, possibly overlapping groups, and to control the orientation of the elements in these groups. The introduction of physical entities in large models usually greatly facilitates the manipulation of the model (e.g., using `Tools->Visibility' in the GUI) and the interfacing with external solvers. In the MSH file format (*note File formats::), if physical entities are defined, the output mesh only contains those elements that belong to physical entities. Other file formats each treat physical entities in slightly different ways, depending on their capability to define groups. (1) This behaviour was introduced in Gmsh 2.0. In older versions, both the elementary and the physical region numbers would be set to the identification number of the elementary region. 4.2 Mesh commands ================= The mesh module commands mostly permit to modify the characteristic lengths and specify structured grid parameters. The actual mesh "actions" (i.e., "mesh the lines", "mesh the surfaces" and "mesh the volumes") cannot be specified in the input ASCII text input files. They have to be given either in the GUI or on the command line (see *Note Running Gmsh::, and *Note Command-line options::). 4.2.1 Characteristic lengths ---------------------------- There are two ways to specify the size of the mesh elements for a given geometry: 1. You can specify characteristic lengths at the points of the geometrical model (with the `Point' command: see *Note Points::). The size of the mesh elements will then be computed by linearly interpolating these characteristic lengths on the initial mesh (see *Note Mesh::). This might sometimes lead to over-refinement in some areas, so that you may have to add "dummy" geometrical entities in the model in order to get the desired element sizes. This method works with all the algorithms implemented in the mesh module. The final element sizes are of course constrained by the structured algorithms for which the element sizes are explicitly specified (e.g., transfinite and extruded grids: see *Note Structured grids::). 2. You can specify characteristic lengths using mesh size "fields". Various fields exist: * A `PostView' field specifies an explicit background mesh in the form of a scalar post-processing view (see *Note Post-processing commands::, and *Note File formats::) in which the nodal values are the target element sizes. This method is very general but it requires a first (usually rough) mesh and a way to compute the target sizes on this mesh (usually through an error estimation procedure, in an iterative process of mesh adaptation). (Note that you can also load a background mesh directly from the command line using the `-bgm' option (*note Command-line options::), or in the GUI by selecting `Apply as background mesh' in the post-processing view option menu.) * A `Box' field specifies the size of the elements inside and outside of a parallelipipedic region. * A `Threshold' field specifies the size of the mesh according to the distance to some geometrical entities. These entities can for example be geometry points and lines specified by an `Attractor' field. * A `MathEval' field specifies the size of the mesh using an explicit mathematical function. * A `Min' field specifies the size as the minimum of the sizes computed using other fields * ... All target element sizes specified by fields can also be constrained by the characteristic lengths defined in the geometrical model if the `Mesh.ConstrainedBackgroundMesh' option is set. Fields are supported by all the algorithms except those based on Netgen. Here are the mesh commands that are related to the specification of characteristic lengths: `Characteristic Length { EXPRESSION-LIST } = EXPRESSION;' Modifies the characteristic length of the points whose identification numbers are listed in EXPRESSION-LIST. The new value is given by EXPRESSION. `Field[EXPRESSION] = STRING;' `Field[EXPRESSION].STRING = CHAR-EXPRESSION | EXPRESSION | EXPRESSION-LIST;' `Background Field = EXPRESSION;' 4.2.2 Structured grids ---------------------- `Extrude { EXPRESSION-LIST } { EXTRUDE-LIST LAYERS }' Extrudes both the geometry and the mesh using a translation (*note Extrusions::). The LAYERS option determines how the mesh is extruded and has the following syntax: LAYERS: Layers { EXPRESSION } | Layers { { EXPRESSION-LIST }, { EXPRESSION-LIST } } | Recombine; ... In the first `Layers' form, EXPRESSION gives the number of elements to be created in the (single) layer. In the second form, the first EXPRESSION-LIST defines how many elements should be created in each extruded layer, and the second EXPRESSION-LIST gives the normalized height of each layer (the list should contain a sequence of N numbers 0 < H1 < H2 < ... < HN <= 1). See *Note t3.geo::, for an example. For line extrusions, the `Recombine' option will recombine triangles into quadrangles when possible. For surface extrusions, the `Recombine' option will recombine tetrahedra into prisms, hexahedra or pyramids. Please note that, starting with Gmsh 2.0, region numbers cannot be specified explicitly anymore in `Layers' commands. Instead, as with all other geometry commands, you must use the automatically created entity identifier created by the extrusion command. For example, the following extrusion command will return the id of the new "top" surface in `num[0]' and the id of the new volume in `num[1]': num[] = Extrude {0,0,1} { Surface{1}; Layers{10}; }; `Extrude { { EXPRESSION-LIST }, { EXPRESSION-LIST }, EXPRESSION } { EXTRUDE-LIST LAYERS }' Extrudes both the geometry and the mesh using a rotation (*note Extrusions::). The LAYERS option is defined as above. `Extrude { { EXPRESSION-LIST }, { EXPRESSION-LIST }, { EXPRESSION-LIST }, EXPRESSION } { EXTRUDE-LIST LAYERS }' Extrudes both the geometry and the mesh using a combined translation and rotation (*note Extrusions::). The LAYERS option is defined as above. `Extrude { Surface { EXPRESSION-LIST }; LAYERS }' Extrudes a boundary layer along the normals of the specified surfaces. `Transfinite Line { EXPRESSION-LIST } = EXPRESSION < Using Progression | Bump EXPRESSION >;' Selects the lines in EXPRESSION-LIST to be meshed with the 1D transfinite algorithm. The EXPRESSION on the right hand side gives the number of nodes that will be created on the line (this overrides any characteristic length prescription--see *Note Characteristic lengths::). The optional argument ``Using Progression EXPRESSION'' instructs the transfinite algorithm to distribute the nodes following a geometric progression (`Progression 2' meaning for example that each line element in the series will be twice as long as the preceding one). The optional argument ``Using Bump EXPRESSION'' instructs the transfinite algorithm to distribute the nodes with a refinement at both ends of the line. (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 transfinite algorithm. The EXPRESSION-LIST should contain the identification numbers of three or four points on the boundary of the surface, defining the corners of the transfinite interpolation. The optional argument specifies the way the triangles are oriented when the mesh is not recombined. `Transfinite Volume { EXPRESSION } = { EXPRESSION-LIST };' Selects a five- or six-face volume EXPRESSION to be meshed with the 3D transfinite algorithm. The EXPRESSION-LIST should contain the identification numbers of the six or eight points on the boundary of the volume that define the corners of the transfinite interpolation. 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 specifies the maximum difference (in degrees) allowed between the largest angle of a quadrangle and a right angle (a value of 0 would only accept quadrangles with right angles; a value of 90 would allow degenerate quadrangles; default value is 45). `Save CHAR-EXPRESSION;' Saves the mesh in a file named CHAR-EXPRESSION, using the current `Mesh.Format' (*note Mesh options::). If the path in CHAR-EXPRESSION is not absolute, CHAR-EXPRESSION is appended to the path of the current file. `Show { Point | Line | Surface | Volume { EXPRESSION-LIST }; ... }' Shows the mesh of the entities in EXPRESSION-LIST, if `General.VisibilityMode' is set to `0' or `2'. `Show CHAR-EXPRESSION;' Shows the mesh of the entity CHAR-EXPRESSION, if `General.VisibilityMode' is set to `0' or `2' (CHAR-EXPRESSION can for example be `"*"'). `Smoother Surface { EXPRESSION-LIST } = EXPRESSION;' Sets number of elliptic smoothing steps for the surfaces listed in EXPRESSION-LIST (smothing only applies to transfinite meshes at the moment). 4.3 Mesh options ================ Mesh options control the behavior of mesh commands, as well as the way meshes are displayed in the graphical user interface. For the signification of the `Saved in:' field in the following list, see *Note General options::. `Mesh.Algorithm' 2D mesh algorithm (1=MeshAdapt+Delaunay, 4=MeshAdapt, 5=Delaunay) Default value: `1' Saved in: `General.OptionsFileName' `Mesh.Algorithm3D' 3D mesh algorithm (1=Tetgen+Delaunay, 4=Netgen) Default value: `1' Saved in: `General.OptionsFileName' `Mesh.AngleSmoothNormals' Threshold angle below which normals are not smoothed Default value: `30' Saved in: `General.OptionsFileName' `Mesh.AllowSwapAngle' Treshold angle (in degrees) between faces normals under which we allow an edge swap Default value: `10' Saved in: `General.OptionsFileName' `Mesh.BdfFieldFormat' Field format for Nastran BDF files (0=free, 1=small, 2=large) Default value: `1' Saved in: `General.OptionsFileName' `Mesh.C1Continuity' Impose C1 continuity to high order meshes (only valid in 2D plane and ElemenOrder = 2) Default value: `0' Saved in: `General.OptionsFileName' `Mesh.CharacteristicLengthExtendFromBoundary' Extend characteristic lengths from the boundaries inside the surface/volume Default value: `1' Saved in: `General.OptionsFileName' `Mesh.CharacteristicLengthFactor' Factor applied to all characteristic lengths Default value: `1' Saved in: `General.OptionsFileName' `Mesh.CharacteristicLengthMin' Minimum characteristic length Default value: `0' Saved in: `General.OptionsFileName' `Mesh.CharacteristicLengthMax' Maximum characteristic length Default value: `1e+22' Saved in: `General.OptionsFileName' `Mesh.CharacteristicLengthFromCurvature' Compute characteristic lengths from curvature Default value: `0' Saved in: `General.OptionsFileName' `Mesh.CharacteristicLengthFromPoints' Compute characteristic lengths from values given at geometry points 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.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.CutPlaneDrawIntersect' Draw only the volume elements that intersect with the cut plane Default value: `0' Saved in: `-' `Mesh.CutPlaneOnlyVolume' Cut only the volume elements Default value: `0' Saved in: `-' `Mesh.CutPlaneA' First cut plane equation coefficient (`A' in `AX+BY+CZ+D=0') Default value: `1' Saved in: `-' `Mesh.CutPlaneB' Second cut plane equation coefficient (`B' in `AX+BY+CZ+D=0') Default value: `0' Saved in: `-' `Mesh.CutPlaneC' Third cut plane equation coefficient (`C' in `AX+BY+CZ+D=0') Default value: `0' Saved in: `-' `Mesh.CutPlaneD' Fourth cut plane equation coefficient (`D' in `AX+BY+CZ+D=0') Default value: `0' Saved in: `-' `Mesh.DrawSkinOnly' Draw only the skin of 3D meshes? Default value: `0' Saved in: `General.OptionsFileName' `Mesh.Dual' Display the dual mesh obtained by barycentric subdivision Default value: `0' Saved in: `General.OptionsFileName' `Mesh.ElementOrder' Element order (1=linear elements, N (<6) = elements of higher order) Default value: `1' Saved in: `General.OptionsFileName' `Mesh.Explode' Element shrinking factor (between 0 and 1) Default value: `1' Saved in: `General.OptionsFileName' `Mesh.Format' Mesh output format (1=msh, 2=unv, 19=vrml, 27=stl, 30=mesh, 31=bdf, 32=cgns, 33=med) Default value: `1' Saved in: `General.OptionsFileName' `Mesh.Hexahedra' Display mesh hexahedra? Default value: `1' Saved in: `General.OptionsFileName' `Mesh.LabelsFrequency' Labels display frequency? Default value: `100' 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: `1' Saved in: `General.OptionsFileName' `Mesh.LightLines' Enable lighting for mesh lines (element edges) Default value: `1' Saved in: `General.OptionsFileName' `Mesh.LightTwoSide' Light both sides of surfaces (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.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.MinimumCurvePoints' Minimum number of points used to mesh a (non-straight) curve Default value: `3' Saved in: `General.OptionsFileName' `Mesh.MshBinary' Write MSH files in binary format? Default value: `0' Saved in: `General.OptionsFileName' `Mesh.MshFileVersion' Version of the MSH file format to use Default value: `2' Saved in: `General.OptionsFileName' `Mesh.NbHexahedra' Number of hexahedra in the current mesh (read-only) Default value: `0' Saved in: `-' `Mesh.NbNodes' Number of nodes in the current mesh (read-only) Default value: `0' Saved in: `-' `Mesh.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 to improve the quality of tetrahedral elements Default value: `0' Saved in: `General.OptionsFileName' `Mesh.OptimizeNetgen' Optimize the mesh using Netgen to improve the quality of tetrahedral elements Default value: `0' Saved in: `General.OptionsFileName' `Mesh.Points' Display mesh vertices (nodes)? Default value: `0' Saved in: `General.OptionsFileName' `Mesh.PointNumbers' Display mesh node numbers? Default value: `0' Saved in: `General.OptionsFileName' `Mesh.PointSize' Display size of mesh vertices (in pixels) Default value: `4' Saved in: `General.OptionsFileName' `Mesh.PointType' Display mesh vertices as solid color dots (0) or 3D spheres (1) Default value: `0' Saved in: `General.OptionsFileName' `Mesh.Prisms' Display mesh prisms? Default value: `1' Saved in: `General.OptionsFileName' `Mesh.Pyramids' Display mesh pyramids? Default value: `1' Saved in: `General.OptionsFileName' `Mesh.Quadrangles' Display mesh quadrangles? Default value: `1' Saved in: `General.OptionsFileName' `Mesh.QualityInf' Only display elements whose quality measure is greater than QualityInf Default value: `0' Saved in: `General.OptionsFileName' `Mesh.QualitySup' Only display elements whose quality measure is smaller than QualitySup Default value: `0' Saved in: `General.OptionsFileName' `Mesh.QualityType' Type of quality measure (0=gamma~vol/sum_face/max_edge, 1=eta~vol^(2/3)/sum_edge^2, 2=rho~min_edge/max_edge) Default value: `2' Saved in: `General.OptionsFileName' `Mesh.RadiusInf' Only display elements whose longest edge is greater than RadiusInf Default value: `0' Saved in: `General.OptionsFileName' `Mesh.RadiusSup' Only display elements whose longest edge is smaller than RadiusSup Default value: `0' Saved in: `General.OptionsFileName' `Mesh.RandomFactor' Random factor used in 2D and 3D meshing algorithm (test other values when the algorithm fails) Default value: `1e-09' Saved in: `General.OptionsFileName' `Mesh.RefineSteps' Number of refinement steps in the MeshAdapt-based 2D algorithms Default value: `10' Saved in: `General.OptionsFileName' `Mesh.RecombineAlgo' Recombine algorithm (1=mixed triangles-quadrangles, 2=all quadrangles) Default value: `1' Saved in: `General.OptionsFileName' `Mesh.ReverseAllNormals' Reverse all the mesh normals (for display) Default value: `0' Saved in: `General.OptionsFileName' `Mesh.SaveAll' Ignore Physical definitions and save all elements Default value: `0' Saved in: `-' `Mesh.SaveGroupsOfNodes' Save groups of nodes for each physical line and surface (UNV mesh format only) Default value: `0' Saved in: `-' `Mesh.ScalingFactor' Global scaling factor applied to the saved mesh Default value: `1' Saved in: `General.OptionsFileName' `Mesh.SecondOrderIncomplete' Create incomplete second order elements? (8-node quads, 20-node hexas, etc.) Default value: `1' Saved in: `General.OptionsFileName' `Mesh.SecondOrderLinear' Should second order vertices simply be created by linear interpolation? Default value: `0' Saved in: `General.OptionsFileName' `Mesh.LcIntegrationPrecision' Accuracy of evaluation of the LC field for 1D mesh generation Default value: `1e-09' Saved in: `General.OptionsFileName' `Mesh.Smoothing' Number of smoothing steps applied to the final mesh Default value: `1' Saved in: `General.OptionsFileName' `Mesh.SmoothInternalEdges' Number of smoothing steps of internal edges for high order meshes Default value: `0' Saved in: `General.OptionsFileName' `Mesh.SmoothNormals' Smooth the mesh normals? Default value: `0' Saved in: `General.OptionsFileName' `Mesh.StlBinary' Save STL files in binary format? Default value: `0' Saved in: `General.OptionsFileName' `Mesh.SurfaceEdges' Display edges of surface mesh? Default value: `1' Saved in: `General.OptionsFileName' `Mesh.SurfaceFaces' Display faces of surface mesh? Default value: `0' Saved in: `General.OptionsFileName' `Mesh.SurfaceNumbers' Display surface mesh element numbers? Default value: `0' Saved in: `General.OptionsFileName' `Mesh.Tangents' Display size of tangent vectors (in pixels) Default value: `0' Saved in: `General.OptionsFileName' `Mesh.Tetrahedra' Display mesh tetrahedra? Default value: `1' Saved in: `General.OptionsFileName' `Mesh.Triangles' Display mesh triangles? Default value: `1' Saved in: `General.OptionsFileName' `Mesh.VolumeEdges' Display edges of volume mesh? Default value: `1' Saved in: `General.OptionsFileName' `Mesh.VolumeFaces' Display faces of volume mesh? Default value: `0' Saved in: `General.OptionsFileName' `Mesh.VolumeNumbers' Display volume mesh element numbers? Default value: `0' Saved in: `General.OptionsFileName' `Mesh.Color.Points' Mesh node color Default value: `{0,0,255}' Saved in: `General.OptionsFileName' `Mesh.Color.PointsSup' Second order mesh node color Default value: `{255,0,255}' Saved in: `General.OptionsFileName' `Mesh.Color.Lines' Mesh line color Default value: `{0,0,0}' Saved in: `General.OptionsFileName' `Mesh.Color.Triangles' Mesh triangle color (if Mesh.ColorCarousel=0) Default value: `{160,150,255}' Saved in: `General.OptionsFileName' `Mesh.Color.Quadrangles' Mesh quadrangle color (if Mesh.ColorCarousel=0) Default value: `{130,120,225}' Saved in: `General.OptionsFileName' `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' `Mesh.Color.Normals' Normal mesh vector color Default value: `{255,0,0}' Saved in: `General.OptionsFileName' `Mesh.Color.Zero' Color 0 in color carousel Default value: `{255,120,0}' Saved in: `General.OptionsFileName' `Mesh.Color.One' Color 1 in color carousel Default value: `{255,160,0}' Saved in: `General.OptionsFileName' `Mesh.Color.Two' Color 2 in color carousel Default value: `{255,200,0}' Saved in: `General.OptionsFileName' `Mesh.Color.Three' Color 3 in color carousel Default value: `{255,240,0}' Saved in: `General.OptionsFileName' `Mesh.Color.Four' Color 4 in color carousel Default value: `{228,255,0}' Saved in: `General.OptionsFileName' `Mesh.Color.Five' Color 5 in color carousel Default value: `{188,255,0}' Saved in: `General.OptionsFileName' `Mesh.Color.Six' Color 6 in color carousel Default value: `{148,255,0}' Saved in: `General.OptionsFileName' `Mesh.Color.Seven' Color 7 in color carousel Default value: `{108,255,0}' Saved in: `General.OptionsFileName' `Mesh.Color.Eight' Color 8 in color carousel Default value: `{68,255,0}' Saved in: `General.OptionsFileName' `Mesh.Color.Nine' Color 9 in color carousel Default value: `{0,255,52}' Saved in: `General.OptionsFileName' `Mesh.Color.Ten' Color 10 in color carousel Default value: `{0,255,132}' Saved in: `General.OptionsFileName' `Mesh.Color.Eleven' Color 11 in color carousel Default value: `{0,255,192}' Saved in: `General.OptionsFileName' `Mesh.Color.Twelve' Color 12 in color carousel Default value: `{0,216,255}' Saved in: `General.OptionsFileName' `Mesh.Color.Thirteen' Color 13 in color carousel Default value: `{0,176,255}' Saved in: `General.OptionsFileName' `Mesh.Color.Fourteen' Color 14 in color carousel Default value: `{0,116,255}' Saved in: `General.OptionsFileName' `Mesh.Color.Fifteen' Color 15 in color carousel Default value: `{0,76,255}' Saved in: `General.OptionsFileName' `Mesh.Color.Sixteen' Color 16 in color carousel Default value: `{24,0,255}' Saved in: `General.OptionsFileName' `Mesh.Color.Seventeen' Color 17 in color carousel Default value: `{84,0,255}' Saved in: `General.OptionsFileName' `Mesh.Color.Eighteen' Color 18 in color carousel Default value: `{104,0,255}' Saved in: `General.OptionsFileName' `Mesh.Color.Nineteen' Color 19 in color carousel Default value: `{184,0,255}' Saved in: `General.OptionsFileName' 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 five available solvers (e.g., `Solver.Name0', `Solver.Executable0', ...; see *Note Solver options::), and set the corresponding "client-server" option to zero (e.g., `Solver.ClientServer0 = 0'). This doesn't require any modification to be made to the solver. If you want the solver to interact with Gmsh (for error messages, option definitions, post-processing, etc.), you need to link your solver with the `GmshClient.c' file 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 *Note Solver example::, 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. 5.1 Solver options ================== `Solver.SocketName' Name of socket (TCP/IP if it contains the `:' character, UNIX otherwise) Default value: `".gmshsock"' Saved in: `General.OptionsFileName' `Solver.Name0' Name of solver 0 Default value: `"GetDP"' Saved in: `General.OptionsFileName' `Solver.Help0' Help string for solver 0 Default value: `"A General environment for the treatment of Discrete Problems. Copyright (C) 1997-2008 Patrick Dular and Christophe Geuzaine. Visit http://www.geuz.org/getdp/ for more info"' Saved in: `General.OptionsFileName' `Solver.Executable0' System command to launch solver 0 (should not contain the `&' character) Default value: `"getdp"' Saved in: `General.OptionsFileName' `Solver.Extension0' Default file name extension for solver 0 Default value: `".pro"' Saved in: `General.OptionsFileName' `Solver.MeshName0' Default mesh file name for solver 0 Default value: `""' Saved in: `General.OptionsFileName' `Solver.MeshCommand0' Command used to specify the mesh file 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 first 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 fifth option for solver 0 Default value: `""' Saved in: `General.OptionsFileName' `Solver.FirstButton0' Label of first button for solver 0 Default value: `"Pre"' Saved in: `General.OptionsFileName' `Solver.FirstButtonCommand0' Command associated with the first 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 fifth button for solver 0 Default value: `""' Saved in: `General.OptionsFileName' `Solver.FifthButtonCommand0' Command associated with the fifth button for solver 0 Default value: `""' Saved in: `General.OptionsFileName' `Solver.Name1' Name of solver 1 Default value: `""' Saved in: `General.OptionsFileName' `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 file name extension for solver 1 Default value: `""' Saved in: `General.OptionsFileName' `Solver.MeshName1' Default mesh file name for solver 1 Default value: `""' Saved in: `General.OptionsFileName' `Solver.MeshCommand1' Command used to specify the mesh file 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 first 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' `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 fifth option for solver 1 Default value: `""' Saved in: `General.OptionsFileName' `Solver.FirstButton1' Label of first button for solver 1 Default value: `""' Saved in: `General.OptionsFileName' `Solver.FirstButtonCommand1' Command associated with the first 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' `Solver.FourthButtonCommand1' Command associated with the fourth button for solver 1 Default value: `""' Saved in: `General.OptionsFileName' `Solver.FifthButton1' Label of fifth button for solver 1 Default value: `""' Saved in: `General.OptionsFileName' `Solver.FifthButtonCommand1' Command associated with the fifth 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 file name extension for solver 2 Default value: `""' Saved in: `General.OptionsFileName' `Solver.MeshName2' Default mesh file name for solver 2 Default value: `""' Saved in: `General.OptionsFileName' `Solver.MeshCommand2' Command used to specify the mesh file 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' `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 first option for solver 2 Default value: `""' Saved in: `General.OptionsFileName' `Solver.SecondOption2'