Transcription of Gmsh
1 GmshGmsh Reference ManualThe documentation for Gmsh finite element mesh generator with built-in pre- and post-processing facilities1 July 2022 Christophe GeuzaineJean-Fran cois RemacleCopyrightc 1997-2022 Christophe Geuzaine, Jean-Fran cois RemaclePermission is granted to make and distribute verbatim copies of this manual provided the copy-right notice and this permission notice are preserved on all ContentsObtaining How to read this reference manual?..93 Running Gmsh on your General Geometry Mesh Solver Post-processing File Compiling the source Gmsh Information for Frequently asked Version Copyright and of ContentsObtaining Geometry: model entity Mesh: finite element mesh Solver: external solver Post-processing: scalar, vector and tensor field What Gmsh is pretty good at.
2 And what Gmsh is not so good Bug How to read this reference manual?.. Syntactic rules used in the Running Gmsh on your Interactive Non-interactive Command-line Mouse Keyboard General Floating point Character Color Built-in User-defined Loops and General General Geometry Geometry Boolean Geometry Mesh Choosing the right unstructured Elementary entities vs. physical Mesh Specifying mesh element Structured Mesh Solver Post-processing Post-processing Post-processing Post-processing File MSH file Node Low order High-order Legacy MSH file format version 2 (Legacy).
3 MSH file format version 1 (Legacy).. POS ASCII file format (Legacy).. POS binary file format (Legacy)..124 Appendix : Geometry basics, elementary entities, physical : Transformations, extruded geometries, : Extruded meshes, ONELAB parameters, : Built-in functions, holes in surfaces, annotations, entity : Mesh sizes, macros, loops, holes in : Transfinite : Background : Post-processing and : : Mesh size : Unstructured quadrangular : Cross-patch meshing with : Remeshing an STL file without an underlying CAD : Homology and cohomology : Embedded points, lines and : Constructive Solid Geometry, OpenCASCADE geometry : Anisotropic background : Periodic : Thrusections, fillets, pipes, mesh size from : STEP import and manipulation, geometry : Mesh : Geometry and mesh : Mesh import, discrete entities, hybrid models, terrain : Post-processing data import.
4 Post-processing data import: : Additional geometrical data : parametrizations, normals, : Additional mesh data : integration points, Jacobians and basis : Additional mesh data : internal edges and General options Geometry options Mesh options Solver options Post-processing options CCompiling the source DGmsh Namespacegmsh: top-level Namespacegmsh/option: option handling Namespacegmsh/model: model Namespacegmsh/model/mesh: mesh Namespacegmsh/model/mesh/field: mesh size field Namespacegmsh/model/geo: built-in CAD kernel Namespacegmsh/model/geo/mesh: built-in CAD kernel meshing Namespacegmsh/model/occ: OpenCASCADE CAD kernel Namespacegmsh/model/occ/mesh: OpenCASCADE CAD kernel meshing Namespacegmsh/view: post-processing view Namespacegmsh/view/option: view option handling Namespacegmsh/plugin: plugin Namespacegmsh/graphics: graphics Namespacegmsh/fltk: FLTK graphical user interface Namespacegmsh/parser: parser Namespacegmsh/onelab: ONELAB server Namespacegmsh/logger: information logging EInformation for Source code Coding Adding a new FFrequently asked The Installation General Geometry Mesh Solver Post-processing GVersion HCopyright and Gmsh1 Obtaining GmshThe source code and various pre-compiled versions of Gmsh (for Windows, Mac and Unix) canbe downloaded Gmsh is also directly available in pre-packaged formin various Linux and BSD distributions (Debian, Ubuntu, FreeBSD.)
5 If you use Gmsh, we would appreciate that you mention it in your work by citing the follow-ing paper: C. Geuzaine and Remacle,Gmsh: a three-dimensional finite element meshgenerator with built-in pre- and post-processing facilities. International Journal for NumericalMethods in Engineering, Volume 79, Issue 11, pages 1309-1331, 2009 . A preprint of that pa-per as well as other references and the latest news about Gmsh development are available conditions3 Copying conditionsGmsh is free software ; this means that everyone is free to use it and to redistribute it on afree basis. Gmsh is not in the public domain; it is copyrighted and there are restrictions on itsdistribution, but these restrictions are designed to permit everything that a good cooperatingcitizen would want to do. What is not allowed is to try to prevent others from further sharingany version of Gmsh that they might get from , we want to make sure that you have the right to give away copies of Gmsh, thatyou receive source code or else can get it if you want it, that you can change Gmsh or use piecesof Gmsh in new free programs, and that you know you can do these make sure that everyone has such rights, we have to forbid you to deprive anyone else ofthese rights.
6 For example, if you distribute copies of Gmsh, you must give the recipients all therights that you have. You must make sure that they, too, receive or can get the source you must tell them their , for our own protection, we must make certain that everyone finds out that there is nowarranty for Gmsh. If Gmsh is modified by someone else and passed on, we want their recipientsto know that what they have is not what we distributed, so that any problems introduced byothers will not reflect on our precise conditions of the license for Gmsh are found in the General PublicLicense that accompanies the source code (seeAppendix I [License], page 379).Further information about this license is available from the GNU Project Detailed copyright information can be foundinAppendix H [Copyright and credits], page you want to integrate parts of Gmsh into a closed-source software, or want to sell a modifiedclosed-source version of Gmsh, you will need to obtain a different license.
7 Pleasecontact usdirectlyfor more 1: Overview51 OverviewGmsh is a three-dimensional finite element mesh generator with a build-in CAD engine andpost-processor. Its design goal is to provide a fast, light and user-friendly meshing tool withparametric input and advanced visualization is built around four modules: geometry, mesh, solver and post-processing. All geometri-cal, mesh, solver and post-processing instructions are prescribed either interactively using thegraphical user interface (GUI) or in text files using Gmsh s own scripting language. Interactiveactions generate language bits in the input files, and vice versa. A programming API is alsoavailable, for integrating Gmsh in your own C++, C, Python or Julia code: seeAppendix D[Gmsh API], page 255. A brief description of the four modules is given Geometry: model entity creationA model in Gmsh is defined using its Boundary Representation (BRep): a volume is boundedby a set of surfaces, a surface is bounded by a series of curves, and a curve is bounded by twoend points.
8 Model entities are topological entities, , they only deal with adjacencies in themodel, and are implemented as a set of abstract topological classes. This BRep is extended bythe definition of embedded, or internal, model entities: internal points, edges and surfaces canbe embedded in volumes; and internal points and curves can be embedded in geometry of model entities can be provided by different CAD kernels. The two defaultkernels interfaced by Gmsh are the Built-in kernel and the OpenCASCADE kernel. Gmshdoes not translate the geometrical representation from one kernel to another, or from thesekernels to some neutral representation. Instead, Gmsh directly queries the native data foreach CAD kernel, which avoids data loss and is crucial for complex models where translationsinvariably introduce issues linked to slightly different s scripting language and the Gmsh API allow to parametrize all model entities.
9 Theentities can either be built in a bottom-up manner (first points, then curves, surfaces andvolumes) or in a Constructive Solid Geometry fashion (solids on which boolean operations areperformed). Both methodologies can also be combined. Finally, groups of model entities (called physical groups ) can be defined, based on the elementary geometric Mesh: finite element mesh generationA finite element mesh of a model is a tessellation of its geometry by simple geometrical elementsof various shapes (in Gmsh: lines, triangles, quadrangles, tetrahedra, prisms, hexahedra andpyramids), arranged in such a way that if two of them intersect, they do so along a face, an edgeor a node, and never otherwise. This defines a so-called conformal mesh. Gmsh implementsseveral algorithms to generate such meshes automatically.
10 All the meshes produced by Gmshare considered as unstructured , even if they were generated in a structured way ( , byextrusion). This implies that the mesh elements are completely defined simply by an ordered listof their nodes, and that no predefined ordering relation is assumed between any two order to guarantee the conformity of the mesh, mesh generation is performed in a bottom-upflow: curves are discretized first; the mesh of the curves 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 anentity is only constrained by the mesh of its boundary, unless entities of lower dimensions areexplicitly embedded in entities of higher dimension. For example, in three dimensions, thetriangles discretizing a surface will be forced to be faces of tetrahedra in the final 3D mesh onlyif the surface is part of the boundary of a volume, or if that surface has been explicitly embeddedin the volume.