Expand description
Low-level bindings to the Gmsh SDK.
Gmsh C API bindings (v4.4.1)
Gmsh is copyright (C) 1997-2019 by C. Geuzaine and J.-F. Remacle
By design, the Gmsh C API is purely functional, and only uses elementary types.
!
Structs§
Constants§
Functions§
- gmsh
Clear ⚠ - Clear all loaded models and post-processing data, and add a new empty model.
- gmsh
Finalize ⚠ - Finalize Gmsh. This must be called when you are done using the Gmsh API.
- gmsh
Fltk ⚠Awake - Awake the main user interface thread and process pending events, and
optionally perform an action (currently the only
actionallowed is “update”). - gmsh
Fltk ⚠Initialize - Create the FLTK graphical user interface. Can only be called in the main thread.
- gmsh
Fltk ⚠Lock - Block the current thread until it can safely modify the user interface.
- gmsh
Fltk ⚠Run - Run the event loop of the graphical user interface, i.e. repeatedly call
wait(). First automatically create the user interface if it has not yet been initialized. Can only be called in the main thread. - gmsh
Fltk ⚠Select Elements - Select elements in the user interface.
- gmsh
Fltk ⚠Select Entities - Select entities in the user interface. If
dimis >= 0, return only the entities of the specified dimension (e.g. points ifdim== 0). - gmsh
Fltk ⚠Select Views - Select views in the user interface.
- gmsh
Fltk ⚠Unlock - Release the lock that was set using lock.
- gmsh
Fltk ⚠Update - Update the user interface (potentially creating new widgets and windows).
First automatically create the user interface if it has not yet been
initialized. Can only be called in the main thread: use
awake("update")to trigger an update of the user interface from another thread. - gmsh
Fltk ⚠Wait - Wait at most
timeseconds for user interface events and return. Iftime< 0, wait indefinitely. First automatically create the user interface if it has not yet been initialized. Can only be called in the main thread. - gmsh
Free ⚠ - gmsh
Graphics ⚠Draw - Draw all the OpenGL scenes.
- gmsh
Initialize ⚠ - Initialize Gmsh. This must be called before any call to the other functions
in the API. If
argcandargv(or justargvin Python or Julia) are provided, they will be handled in the same way as the command line arguments in the Gmsh app. IfreadConfigFilesis set, read system Gmsh configuration files (gmshrc and gmsh-options). - gmsh
Logger ⚠Cputime - Return CPU time.
- gmsh
Logger ⚠Get - Get logged messages.
- gmsh
Logger ⚠Start - Start logging messages.
- gmsh
Logger ⚠Stop - Stop logging messages.
- gmsh
Logger ⚠Time - Return wall clock time.
- gmsh
Logger ⚠Write - Write a
message.levelcan be “info”, “warning” or “error”. - gmsh
Malloc ⚠ - gmsh
Merge ⚠ - Merge a file. Equivalent to the
File->Mergemenu in the Gmsh app. Handling of the file depends on its extension and/or its contents. Merging a file with model data will add the data to the current model. - gmsh
Model ⚠Add - Add a new model, with name
name, and set it as the current model. - gmsh
Model ⚠AddDiscrete Entity - Add a discrete model entity (defined by a mesh) of dimension
dimin the current model. Return the tag of the new discrete entity, equal totagiftagis positive, or a new tag iftag< 0.boundaryspecifies the tags of the entities on the boundary of the discrete entity, if any. Specifyingboundaryallows Gmsh to construct the topology of the overall model. - gmsh
Model ⚠AddPhysical Group - Add a physical group of dimension
dim, grouping the model entities with tagstags. Return the tag of the physical group, equal totagiftagis positive, or a new tag iftag< 0. - gmsh
Model ⚠GeoAddB Spline - Add a cubic b-spline curve with
pointTagscontrol points. Iftagis positive, set the tag explicitly; otherwise a new tag is selected automatically. Creates a periodic curve if the first and last points are the same. Return the tag of the b-spline curve. - gmsh
Model ⚠GeoAdd Bezier - Add a Bezier curve with
pointTagscontrol points. Iftagis positive, set the tag explicitly; otherwise a new tag is selected automatically. Return the tag of the Bezier curve. - gmsh
Model ⚠GeoAdd Circle Arc - Add a circle arc (strictly smaller than Pi) between the two points with
tags
startTagandendTag, with centercentertag. Iftagis positive, set the tag explicitly; otherwise a new tag is selected automatically. If (nx,ny,nz) != (0,0,0), explicitly set the plane of the circle arc. Return the tag of the circle arc. - gmsh
Model ⚠GeoAdd Curve Loop - Add a curve loop (a closed wire) formed by the curves
curveTags.curveTagsshould contain (signed) tags of model enties of dimension 1 forming a closed loop: a negative tag signifies that the underlying curve is considered with reversed orientation. Iftagis positive, set the tag explicitly; otherwise a new tag is selected automatically. Return the tag of the curve loop. - gmsh
Model ⚠GeoAdd Ellipse Arc - Add an ellipse arc (strictly smaller than Pi) between the two points
startTagandendTag, with centercenterTagand major axis pointmajorTag. Iftagis positive, set the tag explicitly; otherwise a new tag is selected automatically. If (nx,ny,nz) != (0,0,0), explicitly set the plane of the circle arc. Return the tag of the ellipse arc. - gmsh
Model ⚠GeoAdd Line - Add a straight line segment between the two points with tags
startTagandendTag. Iftagis positive, set the tag explicitly; otherwise a new tag is selected automatically. Return the tag of the line. - gmsh
Model ⚠GeoAdd Plane Surface - Add a plane surface defined by one or more curve loops
wireTags. The first curve loop defines the exterior contour; additional curve loop define holes. Iftagis positive, set the tag explicitly; otherwise a new tag is selected automatically. Return the tag of the surface. - gmsh
Model ⚠GeoAdd Point - Add a geometrical point in the built-in CAD representation, at coordinates
(
x,y,z). IfmeshSizeis > 0, add a meshing constraint at that point. Iftagis positive, set the tag explicitly; otherwise a new tag is selected automatically. Return the tag of the point. (Note that the point will be added in the current model only aftersynchronizeis called. This behavior holds for all the entities added in the geo module.) - gmsh
Model ⚠GeoAdd Spline - Add a spline (Catmull-Rom) curve going through the points
pointTags. Iftagis positive, set the tag explicitly; otherwise a new tag is selected automatically. Create a periodic curve if the first and last points are the same. Return the tag of the spline curve. - gmsh
Model ⚠GeoAdd Surface Filling - Add a surface filling the curve loops in
wireTags. Currently only a single curve loop is supported; this curve loop should be composed by 3 or 4 curves only. Iftagis positive, set the tag explicitly; otherwise a new tag is selected automatically. Return the tag of the surface. - gmsh
Model ⚠GeoAdd Surface Loop - Add a surface loop (a closed shell) formed by
surfaceTags. Iftagis positive, set the tag explicitly; otherwise a new tag is selected automatically. Return the tag of the shell. - gmsh
Model ⚠GeoAdd Volume - Add a volume (a region) defined by one or more shells
shellTags. The first surface loop defines the exterior boundary; additional surface loop define holes. Iftagis positive, set the tag explicitly; otherwise a new tag is selected automatically. Return the tag of the volume. - gmsh
Model ⚠GeoCopy - Copy the entities
dimTags; the new entities are returned inoutDimTags. - gmsh
Model ⚠GeoDilate - Scale the model entities
dimTagby factorsa,bandcalong the three coordinate axes; use (x,y,z) as the center of the homothetic transformation. - gmsh
Model ⚠GeoExtrude - Extrude the model entities
dimTagsby translation along (dx,dy,dz). Return extruded entities inoutDimTags. IfnumElementsis not empty, also extrude the mesh: the entries innumElementsgive the number of elements in each layer. Ifheightis not empty, it provides the (cumulative) height of the different layers, normalized to 1. Ifdx==dy==dz== 0, the entities are extruded along their normal. - gmsh
Model ⚠GeoMesh SetRecombine - Set a recombination meshing constraint on the model entity of dimension
dimand tagtag. Currently only entities of dimension 2 (to recombine triangles into quadrangles) are supported. - gmsh
Model ⚠GeoMesh SetReverse - Set a reverse meshing constraint on the model entity of dimension
dimand tagtag. Ifvalis true, the mesh orientation will be reversed with respect to the natural mesh orientation (i.e. the orientation consistent with the orientation of the geometry). Ifvalis false, the mesh is left as-is. - gmsh
Model ⚠GeoMesh SetSize - Set a mesh size constraint on the model entities
dimTags. Currently only entities of dimension 0 (points) are handled. - gmsh
Model ⚠GeoMesh SetSmoothing - Set a smoothing meshing constraint on the model entity of dimension
dimand tagtag.valiterations of a Laplace smoother are applied. - gmsh
Model ⚠GeoMesh SetTransfinite Curve - Set a transfinite meshing constraint on the curve
tag, withnumNodesnodes distributed according tomeshTypeandcoef. Currently supported types are “Progression” (geometrical progression with powercoef) and “Bump” (refinement toward both extremities of the curve). - gmsh
Model ⚠GeoMesh SetTransfinite Surface - Set a transfinite meshing constraint on the surface
tag.arrangementdescribes the arrangement of the triangles when the surface is not flagged as recombined: currently supported values are “Left”, “Right”, “AlternateLeft” and “AlternateRight”.cornerTagscan be used to specify the (3 or 4) corners of the transfinite interpolation explicitly; specifying the corners explicitly is mandatory if the surface has more that 3 or 4 points on its boundary. - gmsh
Model ⚠GeoMesh SetTransfinite Volume - Set a transfinite meshing constraint on the surface
tag.cornerTagscan be used to specify the (6 or 8) corners of the transfinite interpolation explicitly. - gmsh
Model ⚠GeoRemove - Remove the entities
dimTags. Ifrecursiveis true, remove all the entities on their boundaries, down to dimension 0. - gmsh
Model ⚠GeoRemove AllDuplicates - Remove all duplicate entities (different entities at the same geometrical location).
- gmsh
Model ⚠GeoRevolve - Extrude the model entities
dimTagsby rotation ofangleradians around the axis of revolution defined by the point (x,y,z) and the direction (ax,ay,az). The angle should be strictly smaller than Pi. Return extruded entities inoutDimTags. IfnumElementsis not empty, also extrude the mesh: the entries innumElementsgive the number of elements in each layer. Ifheightis not empty, it provides the (cumulative) height of the different layers, normalized to 1. - gmsh
Model ⚠GeoRotate - Rotate the model entities
dimTagsofangleradians around the axis of revolution defined by the point (x,y,z) and the direction (ax,ay,az). - gmsh
Model ⚠GeoSymmetrize - Apply a symmetry transformation to the model entities
dimTag, with respect to the plane of equationa* x +b* y +c* z +d= 0. - gmsh
Model ⚠GeoSynchronize - Synchronize the built-in CAD representation with the current Gmsh model. This can be called at any time, but since it involves a non trivial amount of processing, the number of synchronization points should normally be minimized.
- gmsh
Model ⚠GeoTranslate - Translate the model entities
dimTagsalong (dx,dy,dz). - gmsh
Model ⚠GeoTwist - Extrude the model entities
dimTagsby a combined translation and rotation ofangleradians, along (dx,dy,dz) and around the axis of revolution defined by the point (x,y,z) and the direction (ax,ay,az). The angle should be strictly smaller than Pi. Return extruded entities inoutDimTags. IfnumElementsis not empty, also extrude the mesh: the entries innumElementsgive the number of elements in each layer. Ifheightis not empty, it provides the (cumulative) height of the different layers, normalized to 1. - gmsh
Model ⚠GetBoundary - Get the boundary of the model entities
dimTags. Return inoutDimTagsthe boundary of the individual entities (ifcombinedis false) or the boundary of the combined geometrical shape formed by all input entities (ifcombinedis true). Return tags multiplied by the sign of the boundary entity iforientedis true. Apply the boundary operator recursively down to dimension 0 (i.e. to points) ifrecursiveis true. - gmsh
Model ⚠GetBounding Box - Get the bounding box (
xmin,ymin,zmin), (xmax,ymax,zmax) of the model entity of dimensiondimand tagtag. Ifdimandtagare negative, get the bounding box of the whole model. - gmsh
Model ⚠GetColor - Get the color of the model entity of dimension
dimand tagtag. - gmsh
Model ⚠GetCurvature - Evaluate the (maximum) curvature of the entity of dimension
dimand tagtagat the parametric coordinatesparametricCoord. Only valid fordimequal to 1 (withparametricCoordcontaining parametric coordinates on the curve) or 2 (withparametricCoordcontaining pairs of u, v parametric coordinates on the surface, concatenated: [p1u, p1v, p2u, …]). - gmsh
Model ⚠GetDerivative - Evaluate the derivative of the parametrization of the entity of dimension
dimand tagtagat the parametric coordinatesparametricCoord. Only valid fordimequal to 1 (withparametricCoordcontaining parametric coordinates on the curve) or 2 (withparametricCoordcontaining pairs of u, v parametric coordinates on the surface, concatenated: [p1u, p1v, p2u, …]). Fordimequal to 1 return the x, y, z components of the derivative with respect to u [d1ux, d1uy, d1uz, d2ux, …]; fordimequal to 2 return the x, y, z components of the derivate with respect to u and v: [d1ux, d1uy, d1uz, d1vx, d1vy, d1vz, d2ux, …]. - gmsh
Model ⚠GetDimension - Get the geometrical dimension of the current model.
- gmsh
Model ⚠GetEntities - Get all the entities in the current model. If
dimis >= 0, return only the entities of the specified dimension (e.g. points ifdim== 0). The entities are returned as a vector of (dim, tag) integer pairs. - gmsh
Model ⚠GetEntities ForPhysical Group - Get the tags of the model entities making up the physical group of
dimension
dimand tagtag. - gmsh
Model ⚠GetEntities InBounding Box - Get the model entities in the bounding box defined by the two points
(
xmin,ymin,zmin) and (xmax,ymax,zmax). Ifdimis >= 0, return only the entities of the specified dimension (e.g. points ifdim== 0). - gmsh
Model ⚠GetEntity Name - Get the name of the entity of dimension
dimand tagtag. - gmsh
Model ⚠GetNormal - Get the normal to the surface with tag
tagat the parametric coordinatesparametricCoord.parametricCoordare given by pairs of u and v coordinates, concatenated: [p1u, p1v, p2u, …].normalsare returned as triplets of x, y, z components, concatenated: [n1x, n1y, n1z, n2x, …]. - gmsh
Model ⚠GetParent - In a partitioned model, get the parent of the entity of dimension
dimand tagtag, i.e. from which the entity is a part of, if any.parentDimandparentTagare set to -1 if the entity has no parent. - gmsh
Model ⚠GetPartitions - In a partitioned model, return the tags of the partition(s) to which the entity belongs.
- gmsh
Model ⚠GetPhysical Groups - Get all the physical groups in the current model. If
dimis >= 0, return only the entities of the specified dimension (e.g. physical points ifdim== 0). The entities are returned as a vector of (dim, tag) integer pairs. - gmsh
Model ⚠GetPhysical Groups ForEntity - Get the tags of the physical groups (if any) to which the model entity of
dimension
dimand tagtagbelongs. - gmsh
Model ⚠GetPhysical Name - Get the name of the physical group of dimension
dimand tagtag. - gmsh
Model ⚠GetPrincipal Curvatures - Evaluate the principal curvatures of the surface with tag
tagat the parametric coordinatesparametricCoord, as well as their respective directions.parametricCoordare given by pair of u and v coordinates, concatenated: [p1u, p1v, p2u, …]. - gmsh
Model ⚠GetType - Get the type of the entity of dimension
dimand tagtag. - gmsh
Model ⚠GetValue - Evaluate the parametrization of the entity of dimension
dimand tagtagat the parametric coordinatesparametricCoord. Only valid fordimequal to 0 (with emptyparametricCoord), 1 (withparametricCoordcontaining parametric coordinates on the curve) or 2 (withparametricCoordcontaining pairs of u, v parametric coordinates on the surface, concatenated: [p1u, p1v, p2u, …]). Return triplets of x, y, z coordinates inpoints, concatenated: [p1x, p1y, p1z, p2x, …]. - gmsh
Model ⚠GetVisibility - Get the visibility of the model entity of dimension
dimand tagtag. - gmsh
Model ⚠List - List the names of all models.
- gmsh
Model ⚠Mesh AddElements - Add elements classified on the entity of dimension
dimand tagtag.typescontains the MSH types of the elements (e.g.2for 3-node triangles: see the Gmsh reference manual).elementTagsis a vector of the same length astypes; each entry is a vector containing the tags (unique, strictly positive identifiers) of the elements of the corresponding type.nodeTagsis also a vector of the same length astypes; each entry is a vector of length equal to the number of elements of the given type times the number N of nodes per element, that contains the node tags of all the elements of the given type, concatenated: [e1n1, e1n2, …, e1nN, e2n1, …]. - gmsh
Model ⚠Mesh AddElements ByType - Add elements of type
elementTypeclassified on the entity of tagtag.elementTagscontains the tags (unique, strictly positive identifiers) of the elements of the corresponding type.nodeTagsis a vector of length equal to the number of elements times the number N of nodes per element, that contains the node tags of all the elements, concatenated: [e1n1, e1n2, …, e1nN, e2n1, …]. If theelementTagvector is empty, new tags are automatically assigned to the elements. - gmsh
Model ⚠Mesh AddNodes - Add nodes classified on the model entity of dimension
dimand tagtag.nodeTagscontains the node tags (their unique, strictly positive identification numbers).coordis a vector of length 3 times the length ofnodeTagsthat contains the x, y, z coordinates of the nodes, concatenated: [n1x, n1y, n1z, n2x, …]. The optionalparametricCoordvector contains the parametric coordinates of the nodes, if any. The length ofparametricCoordcan be 0 ordimtimes the length ofnodeTags. If thenodeTagsvector is empty, new tags are automatically assigned to the nodes. - gmsh
Model ⚠Mesh Classify Surfaces - Classify (“color”) the surface mesh based on the angle threshold
angle(in radians), and create new discrete surfaces, curves and points accordingly. Ifboundaryis set, also create discrete curves on the boundary if the surface is open. IfforReparametrizationis set, create edges and surfaces that can be reparametrized using a single map. - gmsh
Model ⚠Mesh Clear - Clear the mesh, i.e. delete all the nodes and elements.
- gmsh
Model ⚠Mesh Compute Cohomology - Compute a basis representation for cohomology spaces after a mesh has been
generated. The computation domain is given in a list of physical group tags
domainTags; if empty, the whole mesh is the domain. The computation subdomain for relative cohomology computation is given in a list of physical group tagssubdomainTags; if empty, absolute cohomology is computed. The dimensions homology bases to be computed are given in the listdim; if empty, all bases are computed. Resulting basis representation cochains are stored as physical groups in the mesh. - gmsh
Model ⚠Mesh Compute Homology - Compute a basis representation for homology spaces after a mesh has been
generated. The computation domain is given in a list of physical group tags
domainTags; if empty, the whole mesh is the domain. The computation subdomain for relative homology computation is given in a list of physical group tagssubdomainTags; if empty, absolute homology is computed. The dimensions homology bases to be computed are given in the listdim; if empty, all bases are computed. Resulting basis representation chains are stored as physical groups in the mesh. - gmsh
Model ⚠Mesh Create Geometry - Create a parametrization for discrete curves and surfaces (i.e. curves and surfaces represented solely by a mesh, without an underlying CAD description), assuming that each can be parametrized with a single map.
- gmsh
Model ⚠Mesh Create Topology - Create a boundary representation from the mesh if the model does not have one (e.g. when imported from mesh file formats with no BRep representation of the underlying model).
- gmsh
Model ⚠Mesh Embed - Embed the model entities of dimension
dimand tagstagsin the (inDim,inTag) model entity. The dimensiondimcan 0, 1 or 2 and must be strictly smaller thaninDim, which must be either 2 or 3. The embedded entities should not be part of the boundary of the entityinTag, whose mesh will conform to the mesh of the embedded entities. - gmsh
Model ⚠Mesh Field Add - Add a new mesh size field of type
fieldType. Iftagis positive, assign the tag explicitly; otherwise a new tag is assigned automatically. Return the field tag. - gmsh
Model ⚠Mesh Field Remove - Remove the field with tag
tag. - gmsh
Model ⚠Mesh Field SetAs Background Mesh - Set the field
tagas the background mesh size field. - gmsh
Model ⚠Mesh Field SetAs Boundary Layer - Set the field
tagas a boundary layer size field. - gmsh
Model ⚠Mesh Field SetNumber - Set the numerical option
optionto valuevaluefor fieldtag. - gmsh
Model ⚠Mesh Field SetNumbers - Set the numerical list option
optionto valuevaluefor fieldtag. - gmsh
Model ⚠Mesh Field SetString - Set the string option
optionto valuevaluefor fieldtag. - gmsh
Model ⚠Mesh Generate - Generate a mesh of the current model, up to dimension
dim(0, 1, 2 or 3). - gmsh
Model ⚠Mesh GetBarycenters - Get the barycenters of all elements of type
elementTypeclassified on the entity of tagtag. Ifprimaryis set, only the primary nodes of the elements are taken into account for the barycenter calculation. Iffastis set, the function returns the sum of the primary node coordinates (without normalizing by the number of nodes). Iftag< 0, get the barycenters for all entities. IfnumTasks> 1, only compute and return the part of the data indexed bytask. - gmsh
Model ⚠Mesh GetBasis Functions - Get the basis functions of the element of type
elementTypeat the integration pointsintegrationPoints(given as concatenated triplets of coordinates in the reference element [g1u, g1v, g1w, …, gGu, gGv, gGw]), for the function spacefunctionSpaceType(e.g. “Lagrange” or “GradLagrange” for Lagrange basis functions or their gradient, in the u, v, w coordinates of the reference element).numComponentsreturns the number C of components of a basis function.basisFunctionsreturns the value of the N basis functions at the integration points, i.e. [g1f1, g1f2, …, g1fN, g2f1, …] when C == 1 or [g1f1u, g1f1v, g1f1w, g1f2u, …, g1fNw, g2f1u, …] when C == 3. - gmsh
Model ⚠Mesh GetBasis Functions ForElements - Get the element-dependent basis functions of the elements of type
elementTypein the entity of tagtagat the integration pointsintegrationPoints(given as concatenated triplets of coordinates in the reference element [g1u, g1v, g1w, …, gGu, gGv, gGw]), for the function spacefunctionSpaceType(e.g. “H1Legendre3” or “GradH1Legendre3” for 3rd order hierarchical H1 Legendre functions or their gradient, in the u, v, w coordinates of the reference elements).numComponentsreturns the number C of components of a basis function.numBasisFunctionsreturns the number N of basis functions per element.basisFunctionsreturns the value of the basis functions at the integration points for each element: [e1g1f1,…, e1g1fN, e1g2f1,…, e2g1f1, …] when C == 1 or [e1g1f1u, e1g1f1v,…, e1g1fNw, e1g2f1u,…, e2g1f1u, …]. Warning: this is an experimental feature and will probably change in a future release. - gmsh
Model ⚠Mesh GetElement - Get the type and node tags of the element with tag
tag. This is a sometimes useful but inefficient way of accessing elements, as it relies on a cache stored in the model. For large meshes all the elements in the model should be numbered in a continuous sequence of tags from 1 to N to maintain reasonable performance (in this case the internal cache is based on a vector; otherwise it uses a map). - gmsh
Model ⚠Mesh GetElement ByCoordinates - Search the mesh for an element located at coordinates (
x,y,z). This is a sometimes useful but inefficient way of accessing elements, as it relies on a search in a spatial octree. If an element is found, return its tag, type and node tags, as well as the local coordinates (u,v,w) within the element corresponding to search location. Ifdimis >= 0, only search for elements of the given dimension. Ifstrictis not set, use a tolerance to find elements near the search location. - gmsh
Model ⚠Mesh GetElement Edge Nodes - Get the nodes on the edges of all elements of type
elementTypeclassified on the entity of tagtag.nodeTagscontains the node tags of the edges for all the elements: [e1a1n1, e1a1n2, e1a2n1, …]. Data is returned by element, with elements in the same order as ingetElementsandgetElementsByType. Ifprimaryis set, only the primary (begin/end) nodes of the edges are returned. Iftag< 0, get the edge nodes for all entities. IfnumTasks> 1, only compute and return the part of the data indexed bytask. - gmsh
Model ⚠Mesh GetElement Face Nodes - Get the nodes on the faces of type
faceType(3 for triangular faces, 4 for quadrangular faces) of all elements of typeelementTypeclassified on the entity of tagtag.nodeTagscontains the node tags of the faces for all elements: [e1f1n1, …, e1f1nFaceType, e1f2n1, …]. Data is returned by element, with elements in the same order as ingetElementsandgetElementsByType. Ifprimaryis set, only the primary (corner) nodes of the faces are returned. Iftag< 0, get the face nodes for all entities. IfnumTasks> 1, only compute and return the part of the data indexed bytask. - gmsh
Model ⚠Mesh GetElement Properties - Get the properties of an element of type
elementType: its name (elementName), dimension (dim), order (order), number of nodes (numNodes) and coordinates of the nodes in the reference element (nodeCoordvector, of lengthdimtimesnumNodes). - gmsh
Model ⚠Mesh GetElement Type - Return an element type given its family name
familyName(“point”, “line”, “triangle”, “quadrangle”, “tetrahedron”, “pyramid”, “prism”, “hexahedron”) and polynomial orderorder. Ifserendipis true, return the corresponding serendip element type (element without interior nodes). - gmsh
Model ⚠Mesh GetElement Types - Get the types of elements in the entity of dimension
dimand tagtag. Iftag< 0, get the types for all entities of dimensiondim. Ifdimandtagare negative, get all the types in the mesh. - gmsh
Model ⚠Mesh GetElements - Get the elements classified on the entity of dimension
dimand tagtag. Iftag< 0, get the elements for all entities of dimensiondim. Ifdimandtagare negative, get all the elements in the mesh.elementTypescontains the MSH types of the elements (e.g.2for 3-node triangles: seegetElementPropertiesto obtain the properties for a given element type).elementTagsis a vector of the same length aselementTypes; each entry is a vector containing the tags (unique, strictly positive identifiers) of the elements of the corresponding type.nodeTagsis also a vector of the same length aselementTypes; each entry is a vector of length equal to the number of elements of the given type times the number N of nodes for this type of element, that contains the node tags of all the elements of the given type, concatenated: [e1n1, e1n2, …, e1nN, e2n1, …]. - gmsh
Model ⚠Mesh GetElements ByType - Get the elements of type
elementTypeclassified on the entity of tagtag. Iftag< 0, get the elements for all entities.elementTagsis a vector containing the tags (unique, strictly positive identifiers) of the elements of the corresponding type.nodeTagsis a vector of length equal to the number of elements of the given type times the number N of nodes for this type of element, that contains the node tags of all the elements of the given type, concatenated: [e1n1, e1n2, …, e1nN, e2n1, …]. IfnumTasks> 1, only compute and return the part of the data indexed bytask. - gmsh
Model ⚠Mesh GetGhost Elements - Get the ghost elements
elementTagsand their associatedpartitionsstored in the ghost entity of dimensiondimand tagtag. - gmsh
Model ⚠Mesh GetInformation ForElements - Get information about the
keys.infoKeysreturns information about the functions associated with thekeys.infoKeys[0].firstdescribes the type of function (0 for vertex function, 1 for edge function, 2 for face function and 3 for bubble function).infoKeys[0].secondgives the order of the function associated with the key. Warning: this is an experimental feature and will probably change in a future release. - gmsh
Model ⚠Mesh GetIntegration Points - Get the numerical quadrature information for the given element type
elementTypeand integration ruleintegrationType(e.g. “Gauss4” for a Gauss quadrature suited for integrating 4th order polynomials).integrationPointscontains the u, v, w coordinates of the G integration points in the reference element: [g1u, g1v, g1w, …, gGu, gGv, gGw].integrationWeigthscontains the associated weights: [g1q, …, gGq]. - gmsh
Model ⚠Mesh GetJacobians - Get the Jacobians of all the elements of type
elementTypeclassified on the entity of tagtag, at the G integration pointsintegrationPointsgiven as concatenated triplets of coordinates in the reference element [g1u, g1v, g1w, …, gGu, gGv, gGw]. Data is returned by element, with elements in the same order as ingetElementsandgetElementsByType.jacobianscontains for each element the 9 entries of the 3x3 Jacobian matrix at each integration point. The matrix is returned by column: [e1g1Jxu, e1g1Jyu, e1g1Jzu, e1g1Jxv, …, e1g1Jzw, e1g2Jxu, …, e1gGJzw, e2g1Jxu, …], with Jxu=dx/du, Jyu=dy/du, etc.determinantscontains for each element the determinant of the Jacobian matrix at each integration point: [e1g1, e1g2, … e1gG, e2g1, …].pointscontains for each element the x, y, z coordinates of the integration points. Iftag< 0, get the Jacobian data for all entities. IfnumTasks> 1, only compute and return the part of the data indexed bytask. - gmsh
Model ⚠Mesh GetKeys ForElements - Generate the
keysfor the elements of typeelementTypein the entity of tagtag, for thefunctionSpaceTypefunction space. Each key uniquely identifies a basis function in the function space. IfreturnCoordis set, thecoordvector contains the x, y, z coordinates locating basis functions for sorting purposes. Warning: this is an experimental feature and will probably change in a future release. - gmsh
Model ⚠Mesh GetLast Entity Error - Get the last entities (if any) where a meshing error occurred. Currently only populated by the new 3D meshing algorithms.
- gmsh
Model ⚠Mesh GetLast Node Error - Get the last nodes (if any) where a meshing error occurred. Currently only populated by the new 3D meshing algorithms.
- gmsh
Model ⚠Mesh GetNode - Get the coordinates and the parametric coordinates (if any) of the node
with tag
tag. This is a sometimes useful but inefficient way of accessing nodes, as it relies on a cache stored in the model. For large meshes all the nodes in the model should be numbered in a continuous sequence of tags from 1 to N to maintain reasonable performance (in this case the internal cache is based on a vector; otherwise it uses a map). - gmsh
Model ⚠Mesh GetNodes - Get the nodes classified on the entity of dimension
dimand tagtag. Iftag< 0, get the nodes for all entities of dimensiondim. Ifdimandtagare negative, get all the nodes in the mesh.nodeTagscontains the node tags (their unique, strictly positive identification numbers).coordis a vector of length 3 times the length ofnodeTagsthat contains the x, y, z coordinates of the nodes, concatenated: [n1x, n1y, n1z, n2x, …]. Ifdim>= 0 andreturnParamtricCoordis set,parametricCoordcontains the parametric coordinates ([u1, u2, …] or [u1, v1, u2, …]) of the nodes, if available. The length ofparametricCoordcan be 0 ordimtimes the length ofnodeTags. IfincludeBoundaryis set, also return the nodes classified on the boundary of the entity (which will be reparametrized on the entity ifdim>= 0 in order to compute their parametric coordinates). - gmsh
Model ⚠Mesh GetNodes ByElement Type - Get the nodes classified on the entity of tag
tag, for all the elements of typeelementType. The other arguments are treated as ingetNodes. - gmsh
Model ⚠Mesh GetNodes ForPhysical Group - Get the nodes from all the elements belonging to the physical group of
dimension
dimand tagtag.nodeTagscontains the node tags;coordis a vector of length 3 times the length ofnodeTagsthat contains the x, y, z coordinates of the nodes, concatenated: [n1x, n1y, n1z, n2x, …]. - gmsh
Model ⚠Mesh GetPeriodic Nodes - Get the master entity
tagMaster, the node tagsnodeTagsand their corresponding master node tagsnodeTagsMaster, and the affine transformaffineTransformfor the entity of dimensiondimand tagtag. - gmsh
Model ⚠Mesh Optimize - Optimize the mesh of the current model using
method(empty for default tetrahedral mesh optimizer, “Netgen” for Netgen optimizer, “HighOrder” for direct high-order mesh optimizer, “HighOrderElastic” for high-order elastic smoother). Ifforceis set apply the optimization also to discrete entities. - gmsh
Model ⚠Mesh Partition - Partition the mesh of the current model into
numPartpartitions. - gmsh
Model ⚠Mesh Preallocate Barycenters - Preallocate data before calling
getBarycenterswithnumTasks> 1. For C and C++ only. - gmsh
Model ⚠Mesh Preallocate Elements ByType - Preallocate data before calling
getElementsByTypewithnumTasks> 1. For C and C++ only. - gmsh
Model ⚠Mesh Preallocate Jacobians - Preallocate data before calling
getJacobianswithnumTasks> 1. For C and C++ only. - gmsh
Model ⚠Mesh Precompute Basis Functions - Precomputes the basis functions corresponding to
elementType. - gmsh
Model ⚠Mesh Rebuild Node Cache - Rebuild the node cache.
- gmsh
Model ⚠Mesh Reclassify Nodes - Reclassify all nodes on their associated model entity, based on the elements. Can be used when importing nodes in bulk (e.g. by associating them all to a single volume), to reclassify them correctly on model surfaces, curves, etc. after the elements have been set.
- gmsh
Model ⚠Mesh Recombine - Recombine the mesh of the current model.
- gmsh
Model ⚠Mesh Refine - Refine the mesh of the current model by uniformly splitting the elements.
- gmsh
Model ⚠Mesh Relocate Nodes - Relocate the nodes classified on the entity of dimension
dimand tagtagusing their parametric coordinates. Iftag< 0, relocate the nodes for all entities of dimensiondim. Ifdimandtagare negative, relocate all the nodes in the mesh. - gmsh
Model ⚠Mesh Remove Duplicate Nodes - Remove duplicate nodes in the mesh of the current model.
- gmsh
Model ⚠Mesh Remove Embedded - Remove embedded entities from the model entities
dimTags. ifdimis >= 0, only remove embedded entities of the given dimension (e.g. embedded points ifdim== 0). - gmsh
Model ⚠Mesh Renumber Elements - Renumber the element tags in a continuous sequence.
- gmsh
Model ⚠Mesh Renumber Nodes - Renumber the node tags in a continuous sequence.
- gmsh
Model ⚠Mesh Reorder Elements - Reorder the elements of type
elementTypeclassified on the entity of tagtagaccording toordering. - gmsh
Model ⚠Mesh SetOrder - Set the order of the elements in the mesh of the current model to
order. - gmsh
Model ⚠Mesh SetOutward Orientation - Set meshing constraints on the bounding surfaces of the volume of tag
tagso that all surfaces are oriented with outward pointing normals. Currently only available with the OpenCASCADE kernel, as it relies on the STL triangulation. - gmsh
Model ⚠Mesh SetPeriodic - Set the meshes of the entities of dimension
dimand tagtagsas periodic copies of the meshes of entitiestagsMaster, using the affine transformation specified inaffineTransformation(16 entries of a 4x4 matrix, by row). Currently only available fordim== 1 anddim== 2. - gmsh
Model ⚠Mesh SetRecombine - Set a recombination meshing constraint on the model entity of dimension
dimand tagtag. Currently only entities of dimension 2 (to recombine triangles into quadrangles) are supported. - gmsh
Model ⚠Mesh SetReverse - Set a reverse meshing constraint on the model entity of dimension
dimand tagtag. Ifvalis true, the mesh orientation will be reversed with respect to the natural mesh orientation (i.e. the orientation consistent with the orientation of the geometry). Ifvalis false, the mesh is left as-is. - gmsh
Model ⚠Mesh SetSize - Set a mesh size constraint on the model entities
dimTags. Currently only entities of dimension 0 (points) are handled. - gmsh
Model ⚠Mesh SetSmoothing - Set a smoothing meshing constraint on the model entity of dimension
dimand tagtag.valiterations of a Laplace smoother are applied. - gmsh
Model ⚠Mesh SetTransfinite Curve - Set a transfinite meshing constraint on the curve
tag, withnumNodesnodes distributed according tomeshTypeandcoef. Currently supported types are “Progression” (geometrical progression with powercoef) and “Bump” (refinement toward both extremities of the curve). - gmsh
Model ⚠Mesh SetTransfinite Surface - Set a transfinite meshing constraint on the surface
tag.arrangementdescribes the arrangement of the triangles when the surface is not flagged as recombined: currently supported values are “Left”, “Right”, “AlternateLeft” and “AlternateRight”.cornerTagscan be used to specify the (3 or 4) corners of the transfinite interpolation explicitly; specifying the corners explicitly is mandatory if the surface has more that 3 or 4 points on its boundary. - gmsh
Model ⚠Mesh SetTransfinite Volume - Set a transfinite meshing constraint on the surface
tag.cornerTagscan be used to specify the (6 or 8) corners of the transfinite interpolation explicitly. - gmsh
Model ⚠Mesh Smooth - Smooth the mesh of the current model.
- gmsh
Model ⚠Mesh Split Quadrangles - Split (into two triangles) all quadrangles in surface
tagwhose quality is lower thanquality. Iftag< 0, split quadrangles in all surfaces. - gmsh
Model ⚠Mesh Unpartition - Unpartition the mesh of the current model.
- gmsh
Model ⚠OccAddB Spline - Add a b-spline curve of degree
degreewithpointTagscontrol points. Ifweights,knotsormultiplicitiesare not provided, default parameters are computed automatically. Iftagis positive, set the tag explicitly; otherwise a new tag is selected automatically. Create a periodic curve if the first and last points are the same. Return the tag of the b-spline curve. - gmsh
Model ⚠OccAdd Bezier - Add a Bezier curve with
pointTagscontrol points. Iftagis positive, set the tag explicitly; otherwise a new tag is selected automatically. Return the tag of the Bezier curve. - gmsh
Model ⚠OccAdd Box - Add a parallelepipedic box defined by a point (
x,y,z) and the extents along the x-, y- and z-axes. Iftagis positive, set the tag explicitly; otherwise a new tag is selected automatically. Return the tag of the box. - gmsh
Model ⚠OccAdd Circle - Add a circle of center (
x,y,z) and radiusr. Iftagis positive, set the tag explicitly; otherwise a new tag is selected automatically. Ifangle1andangle2are specified, create a circle arc between the two angles. Return the tag of the circle. - gmsh
Model ⚠OccAdd Circle Arc - Add a circle arc between the two points with tags
startTagandendTag, with centercenterTag. Iftagis positive, set the tag explicitly; otherwise a new tag is selected automatically. Return the tag of the circle arc. - gmsh
Model ⚠OccAdd Cone - Add a cone, defined by the center (
x,y,z) of its first circular face, the 3 components of the vector (dx,dy,dz) defining its axis and the two radiir1andr2of the faces (these radii can be zero). Iftagis positive, set the tag explicitly; otherwise a new tag is selected automatically.angledefines the optional angular opening (from 0 to 2*Pi). Return the tag of the cone. - gmsh
Model ⚠OccAdd Curve Loop - Add a curve loop (a closed wire) formed by the curves
curveTags.curveTagsshould contain tags of curves forming a closed loop. Note that an OpenCASCADE curve loop can be made of curves that share geometrically identical (but topologically different) points. Iftagis positive, set the tag explicitly; otherwise a new tag is selected automatically. Return the tag of the curve loop. - gmsh
Model ⚠OccAdd Cylinder - Add a cylinder, defined by the center (
x,y,z) of its first circular face, the 3 components (dx,dy,dz) of the vector defining its axis and its radiusr. The optionalangleargument defines the angular opening (from 0 to 2*Pi). Iftagis positive, set the tag explicitly; otherwise a new tag is selected automatically. Return the tag of the cylinder. - gmsh
Model ⚠OccAdd Disk - Add a disk with center (
xc,yc,zc) and radiusrxalong the x-axis andryalong the y-axis. Iftagis positive, set the tag explicitly; otherwise a new tag is selected automatically. Return the tag of the disk. - gmsh
Model ⚠OccAdd Ellipse - Add an ellipse of center (
x,y,z) and radiir1andr2along the x- and y-axes respectively. Iftagis positive, set the tag explicitly; otherwise a new tag is selected automatically. Ifangle1andangle2are specified, create an ellipse arc between the two angles. Return the tag of the ellipse. Note that OpenCASCADE does not allow creating ellipses with the major radius (along the x-axis) smaller than or equal to the minor radius (along the y-axis): rotate the shape or useaddCirclein such cases. - gmsh
Model ⚠OccAdd Ellipse Arc - Add an ellipse arc between the two points
startTagandendTag, with centercenterTagand major axis pointmajorTag. Iftagis positive, set the tag explicitly; otherwise a new tag is selected automatically. Return the tag of the ellipse arc. Note that OpenCASCADE does not allow creating ellipse arcs with the major radius smaller than the minor radius. - gmsh
Model ⚠OccAdd Line - Add a straight line segment between the two points with tags
startTagandendTag. Iftagis positive, set the tag explicitly; otherwise a new tag is selected automatically. Return the tag of the line. - gmsh
Model ⚠OccAdd Pipe - Add a pipe by extruding the entities
dimTagsalong the wirewireTag. Return the pipe inoutDimTags. - gmsh
Model ⚠OccAdd Plane Surface - Add a plane surface defined by one or more curve loops (or closed wires)
wireTags. The first curve loop defines the exterior contour; additional curve loop define holes. Iftagis positive, set the tag explicitly; otherwise a new tag is selected automatically. Return the tag of the surface. - gmsh
Model ⚠OccAdd Point - Add a geometrical point in the OpenCASCADE CAD representation, at
coordinates (
x,y,z). IfmeshSizeis > 0, add a meshing constraint at that point. Iftagis positive, set the tag explicitly; otherwise a new tag is selected automatically. Return the tag of the point. (Note that the point will be added in the current model only aftersynchronizeis called. This behavior holds for all the entities added in the occ module.) - gmsh
Model ⚠OccAdd Rectangle - Add a rectangle with lower left corner at (
x,y,z) and upper right corner at (x+dx,y+dy,z). Iftagis positive, set the tag explicitly; otherwise a new tag is selected automatically. Round the corners ifroundedRadiusis nonzero. Return the tag of the rectangle. - gmsh
Model ⚠OccAdd Sphere - Add a sphere of center (
xc,yc,zc) and radiusr. The optionalangle1andangle2arguments define the polar angle opening (from -Pi/2 to Pi/2). The optionalangle3argument defines the azimuthal opening (from 0 to 2*Pi). Iftagis positive, set the tag explicitly; otherwise a new tag is selected automatically. Return the tag of the sphere. - gmsh
Model ⚠OccAdd Spline - Add a spline (C2 b-spline) curve going through the points
pointTags. Iftagis positive, set the tag explicitly; otherwise a new tag is selected automatically. Create a periodic curve if the first and last points are the same. Return the tag of the spline curve. - gmsh
Model ⚠OccAdd Surface Filling - Add a surface filling the curve loops in
wireTags. Iftagis positive, set the tag explicitly; otherwise a new tag is selected automatically. Return the tag of the surface. IfpointTagsare provided, force the surface to pass through the given points. - gmsh
Model ⚠OccAdd Surface Loop - Add a surface loop (a closed shell) formed by
surfaceTags. Iftagis positive, set the tag explicitly; otherwise a new tag is selected automatically. Return the tag of the surface loop. Settingsewingallows to build a shell made of surfaces that share geometrically identical (but topologically different) curves. - gmsh
Model ⚠OccAdd Thick Solid - Add a hollowed volume built from an initial volume
volumeTagand a set of faces from this volumeexcludeSurfaceTags, which are to be removed. The remaining faces of the volume become the walls of the hollowed solid, with thicknessoffset. Iftagis positive, set the tag explicitly; otherwise a new tag is selected automatically. - gmsh
Model ⚠OccAdd Thru Sections - Add a volume (if the optional argument
makeSolidis set) or surfaces defined through the open or closed wireswireTags. Iftagis positive, set the tag explicitly; otherwise a new tag is selected automatically. The new entities are returned inoutDimTags. If the optional argumentmakeRuledis set, the surfaces created on the boundary are forced to be ruled surfaces. - gmsh
Model ⚠OccAdd Torus - Add a torus, defined by its center (
x,y,z) and its 2 radiirandr2. Iftagis positive, set the tag explicitly; otherwise a new tag is selected automatically. The optional argumentangledefines the angular opening (from 0 to 2*Pi). Return the tag of the wedge. - gmsh
Model ⚠OccAdd Volume - Add a volume (a region) defined by one or more surface loops
shellTags. The first surface loop defines the exterior boundary; additional surface loop define holes. Iftagis positive, set the tag explicitly; otherwise a new tag is selected automatically. Return the tag of the volume. - gmsh
Model ⚠OccAdd Wedge - Add a right angular wedge, defined by the right-angle point (
x,y,z) and the 3 extends along the x-, y- and z-axes (dx,dy,dz). Iftagis positive, set the tag explicitly; otherwise a new tag is selected automatically. The optional argumentltxdefines the top extent along the x-axis. Return the tag of the wedge. - gmsh
Model ⚠OccAdd Wire - Add a wire (open or closed) formed by the curves
curveTags. Note that an OpenCASCADE wire can be made of curves that share geometrically identical (but topologically different) points. Iftagis positive, set the tag explicitly; otherwise a new tag is selected automatically. Return the tag of the wire. - gmsh
Model ⚠OccAffine Transform - Apply a general affine transformation matrix
a(16 entries of a 4x4 matrix, by row; only the 12 first can be provided for convenience) to the model entitiesdimTag. - gmsh
Model ⚠OccChamfer - Chamfer the volumes
volumeTagson the curvescurveTagswith distancesdistancesmeasured on surfacessurfaceTags. Thedistancesvector can either contain a single distance, as many distances ascurveTagsandsurfaceTags, or twice as many ascurveTagsandsurfaceTags(in which case the first in each pair is measured on the corresponding surface insurfaceTags, the other on the other adjacent surface). Return the chamfered entities inoutDimTags. Remove the original volume ifremoveVolumeis set. - gmsh
Model ⚠OccCopy - Copy the entities
dimTags; the new entities are returned inoutDimTags. - gmsh
Model ⚠OccCut - Compute the boolean difference between the entities
objectDimTagsandtoolDimTags. Return the resulting entities inoutDimTags. Iftagis positive, try to set the tag explicitly (only valid if the boolean operation results in a single entity). Remove the object ifremoveObjectis set. Remove the tool ifremoveToolis set. - gmsh
Model ⚠OccDilate - Scale the model entities
dimTagby factorsa,bandcalong the three coordinate axes; use (x,y,z) as the center of the homothetic transformation. - gmsh
Model ⚠OccExtrude - Extrude the model entities
dimTagsby translation along (dx,dy,dz). Return extruded entities inoutDimTags. IfnumElementsis not empty, also extrude the mesh: the entries innumElementsgive the number of elements in each layer. Ifheightis not empty, it provides the (cumulative) height of the different layers, normalized to 1. - gmsh
Model ⚠OccFillet - Fillet the volumes
volumeTagson the curvescurveTagswith radiiradii. Theradiivector can either contain a single radius, as many radii ascurveTags, or twice as many ascurveTags(in which case different radii are provided for the begin and end points of the curves). Return the filleted entities inoutDimTags. Remove the original volume ifremoveVolumeis set. - gmsh
Model ⚠OccFragment - Compute the boolean fragments (general fuse) of the entities
objectDimTagsandtoolDimTags. Return the resulting entities inoutDimTags. Iftagis positive, try to set the tag explicitly (only valid if the boolean operation results in a single entity). Remove the object ifremoveObjectis set. Remove the tool ifremoveToolis set. - gmsh
Model ⚠OccFuse - Compute the boolean union (the fusion) of the entities
objectDimTagsandtoolDimTags. Return the resulting entities inoutDimTags. Iftagis positive, try to set the tag explicitly (only valid if the boolean operation results in a single entity). Remove the object ifremoveObjectis set. Remove the tool ifremoveToolis set. - gmsh
Model ⚠OccGet Center OfMass - Get the center of mass of the model entity of dimension
dimand tagtag. - gmsh
Model ⚠OccGet Mass - Get the mass of the model entity of dimension
dimand tagtag. - gmsh
Model ⚠OccGet Matrix OfInertia - Get the matrix of inertia (by row) of the model entity of dimension
dimand tagtag. - gmsh
Model ⚠OccHeal Shapes - Apply various healing procedures to the entities
dimTags(or to all the entities in the model ifdimTagsis empty). Return the healed entities inoutDimTags. Available healing options are listed in the Gmsh reference manual. - gmsh
Model ⚠OccImport Shapes - Import BREP, STEP or IGES shapes from the file
fileName. The imported entities are returned inoutDimTags. If the optional argumenthighestDimOnlyis set, only import the highest dimensional entities in the file. The optional argumentformatcan be used to force the format of the file (currently “brep”, “step” or “iges”). - gmsh
Model ⚠OccImport Shapes Native Pointer - Imports an OpenCASCADE
shapeby providing a pointer to a native OpenCASCADETopoDS_Shapeobject (passed as a pointer to void). The imported entities are returned inoutDimTags. If the optional argumenthighestDimOnlyis set, only import the highest dimensional entities inshape. For C and C++ only. Warning: this function is unsafe, as providing an invalid pointer will lead to undefined behavior. - gmsh
Model ⚠OccIntersect - Compute the boolean intersection (the common parts) of the entities
objectDimTagsandtoolDimTags. Return the resulting entities inoutDimTags. Iftagis positive, try to set the tag explicitly (only valid if the boolean operation results in a single entity). Remove the object ifremoveObjectis set. Remove the tool ifremoveToolis set. - gmsh
Model ⚠OccRemove - Remove the entities
dimTags. Ifrecursiveis true, remove all the entities on their boundaries, down to dimension 0. - gmsh
Model ⚠OccRemove AllDuplicates - Remove all duplicate entities (different entities at the same geometrical location) after intersecting (using boolean fragments) all highest dimensional entities.
- gmsh
Model ⚠OccRevolve - Extrude the model entities
dimTagsby rotation ofangleradians around the axis of revolution defined by the point (x,y,z) and the direction (ax,ay,az). Return extruded entities inoutDimTags. IfnumElementsis not empty, also extrude the mesh: the entries innumElementsgive the number of elements in each layer. Ifheightis not empty, it provides the (cumulative) height of the different layers, normalized to 1. When the mesh is extruded the angle should be strictly smaller than 2*Pi. - gmsh
Model ⚠OccRotate - Rotate the model entities
dimTagsofangleradians around the axis of revolution defined by the point (x,y,z) and the direction (ax,ay,az). - gmsh
Model ⚠OccSet Mesh Size - Set a mesh size constraint on the model entities
dimTags. Currently only entities of dimension 0 (points) are handled. - gmsh
Model ⚠OccSymmetrize - Apply a symmetry transformation to the model entities
dimTag, with respect to the plane of equationa* x +b* y +c* z +d= 0. - gmsh
Model ⚠OccSynchronize - Synchronize the OpenCASCADE CAD representation with the current Gmsh model. This can be called at any time, but since it involves a non trivial amount of processing, the number of synchronization points should normally be minimized.
- gmsh
Model ⚠OccTranslate - Translate the model entities
dimTagsalong (dx,dy,dz). - gmsh
Model ⚠Remove - Remove the current model.
- gmsh
Model ⚠Remove Entities - Remove the entities
dimTagsof the current model. Ifrecursiveis true, remove all the entities on their boundaries, down to dimension 0. - gmsh
Model ⚠Remove Entity Name - Remove the entity name
namefrom the current model. - gmsh
Model ⚠Remove Physical Groups - Remove the physical groups
dimTagsof the current model. IfdimTagsis empty, remove all groups. - gmsh
Model ⚠Remove Physical Name - Remove the physical name
namefrom the current model. - gmsh
Model ⚠SetColor - Set the color of the model entities
dimTagsto the RGBA value (r,g,b,a), wherer,g,bandashould be integers between 0 and 255. Apply the color setting recursively ifrecursiveis true. - gmsh
Model ⚠SetCoordinates - Set the
x,y,zcoordinates of a geometrical point. - gmsh
Model ⚠SetCurrent - Set the current model to the model with name
name. If several models have the same name, select the one that was added first. - gmsh
Model ⚠SetEntity Name - Set the name of the entity of dimension
dimand tagtag. - gmsh
Model ⚠SetPhysical Name - Set the name of the physical group of dimension
dimand tagtag. - gmsh
Model ⚠SetVisibility - Set the visibility of the model entities
dimTagstovalue. Apply the visibility setting recursively ifrecursiveis true. - gmsh
Onelab ⚠Clear - Clear the ONELAB database, or remove a single parameter if
nameis given. - gmsh
Onelab ⚠Get - Get all the parameters (or a single one if
nameis specified) from the ONELAB database, encoded informat. - gmsh
Onelab ⚠GetNumber - Get the value of the number parameter
namefrom the ONELAB database. Return an empty vector if the parameter does not exist. - gmsh
Onelab ⚠GetString - Get the value of the string parameter
namefrom the ONELAB database. Return an empty vector if the parameter does not exist. - gmsh
Onelab ⚠Run - Run a ONELAB client. If
nameis provided, create a new ONELAB client with namenameand executescommand. If not, try to run a client that might be linked to the processed input files. - gmsh
Onelab ⚠Set - Set one or more parameters in the ONELAB database, encoded in
format. - gmsh
Onelab ⚠SetNumber - Set the value of the number parameter
namein the ONELAB database. Create the parameter if it does not exist; update the value if the parameter exists. - gmsh
Onelab ⚠SetString - Set the value of the string parameter
namein the ONELAB database. Create the parameter if it does not exist; update the value if the parameter exists. - gmsh
Open ⚠ - Open a file. Equivalent to the
File->Openmenu in the Gmsh app. Handling of the file depends on its extension and/or its contents: opening a file with model data will create a new model. - gmsh
Option ⚠GetColor - Get the
r,g,b,avalue of a color option.nameis of the form “category.option” or “category[num].option”. Available categories and options are listed in the Gmsh reference manual, with the “Color.” middle string removed. - gmsh
Option ⚠GetNumber - Get the
valueof a numerical option.nameis of the form “category.option” or “category[num].option”. Available categories and options are listed in the Gmsh reference manual. - gmsh
Option ⚠GetString - Get the
valueof a string option.nameis of the form “category.option” or “category[num].option”. Available categories and options are listed in the Gmsh reference manual. - gmsh
Option ⚠SetColor - Set a color option to the RGBA value (
r,g,b,a), where wherer,g,bandashould be integers between 0 and 255.nameis of the form “category.option” or “category[num].option”. Available categories and options are listed in the Gmsh reference manual, with the “Color.” middle string removed. - gmsh
Option ⚠SetNumber - Set a numerical option to
value.nameis of the form “category.option” or “category[num].option”. Available categories and options are listed in the Gmsh reference manual. - gmsh
Option ⚠SetString - Set a string option to
value.nameis of the form “category.option” or “category[num].option”. Available categories and options are listed in the Gmsh reference manual. - gmsh
Plugin ⚠Run - Run the plugin
name. - gmsh
Plugin ⚠SetNumber - Set the numerical option
optionto the valuevaluefor pluginname. - gmsh
Plugin ⚠SetString - Set the string option
optionto the valuevaluefor pluginname. - gmsh
View ⚠Add - Add a new post-processing view, with name
name. Iftagis positive use it (and remove the view with that tag if it already exists), otherwise associate a new tag. Return the view tag. - gmsh
View ⚠AddAlias - Add a post-processing view as an
aliasof the reference view with tagrefTag. IfcopyOptionsis set, copy the options of the reference view. Iftagis positive use it (and remove the view with that tag if it already exists), otherwise associate a new tag. Return the view tag. - gmsh
View ⚠AddList Data - Add list-based post-processing data to the view with tag
tag.dataTypeidentifies the data: “SP” for scalar points, “VP”, for vector points, etc.numElegives the number of elements in the data.datacontains the data for thenumEleelements. - gmsh
View ⚠AddModel Data - Add model-based post-processing data to the view with tag
tag.modelNameidentifies the model the data is attached to.dataTypespecifies the type of data, currently either “NodeData”, “ElementData” or “ElementNodeData”.stepspecifies the identifier (>= 0) of the data in a sequence.tagsgives the tags of the nodes or elements in the mesh to which the data is associated.datais a vector of the same length astags: each entry is the vector of double precision numbers representing the data associated with the corresponding tag. The optionaltimeargument associate a time value with the data.numComponentsgives the number of data components (1 for scalar data, 3 for vector data, etc.) per entity; if negative, it is automatically inferred (when possible) from the input data.partitionallows to specify data in several sub-sets. - gmsh
View ⚠Combine - Combine elements (if
what== “elements”) or steps (ifwhat== “steps”) of all views (how== “all”), all visible views (how== “visible”) or all views having the same name (how== “name”). Remove original views ifremoveis set. - gmsh
View ⚠Copy Options - Copy the options from the view with tag
refTagto the view with tagtag. - gmsh
View ⚠GetIndex - Get the index of the view with tag
tagin the list of currently loaded views. This dynamic index (it can change when views are removed) is used to access view options. - gmsh
View ⚠GetList Data - Get list-based post-processing data from the view with tag
tag. Return the typesdataTypes, the number of elementsnumElementsfor each data type and thedatafor each data type. - gmsh
View ⚠GetModel Data - Get model-based post-processing data from the view with tag
tagat stepstep. Return thedataassociated to the nodes or the elements with tagstags, as well as thedataTypeand the number of componentsnumComponents. - gmsh
View ⚠GetTags - Get the tags of all views.
- gmsh
View ⚠Probe - Probe the view
tagfor itsvalueat point (x,y,z). Return only the value at stepstepisstepis positive. Return only values withnumCompifnumCompis positive. Return the gradient of thevalueifgradientis set. Probes with a geometrical tolerance (in the reference unit cube) oftoleranceiftoleranceis not zero. Return the result from the element described by its coordinates ifxElementCoord,yElementCoordandzElementCoordare provided. - gmsh
View ⚠Remove - Remove the view with tag
tag. - gmsh
View ⚠Write - Write the view to a file
fileName. The export format is determined by the file extension. Append to the file ifappendis set. - gmsh
Write ⚠ - Write a file. The export format is determined by the file extension.