Meshing Constraints with the Built-in Kernel

gmsh.model.geo.mesh.setSizeFunction
gmsh.model.geo.mesh.setSize(dimTags, size)

Set a mesh size constraint on the entities dimTags in the built-in CAD kernel representation. Currently only entities of dimension 0 (points) are handled.

source
gmsh.model.geo.mesh.setTransfiniteCurveFunction
gmsh.model.geo.mesh.setTransfiniteCurve(tag, nPoints, meshType = "Progression", coef = 1.)

Set a transfinite meshing constraint on the curve tag in the built-in CAD kernel representation, with numNodes nodes distributed according to meshType and coef. Currently supported types are "Progression" (geometrical progression with power coef) and "Bump" (refinement toward both extremities of the curve).

source
gmsh.model.geo.mesh.setTransfiniteSurfaceFunction
gmsh.model.geo.mesh.setTransfiniteSurface(tag, arrangement = "Left", cornerTags = Cint[])

Set a transfinite meshing constraint on the surface tag in the built-in CAD kernel representation. arrangement describes the arrangement of the triangles when the surface is not flagged as recombined: currently supported values are "Left", "Right", "AlternateLeft" and "AlternateRight". cornerTags can 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.

source
gmsh.model.geo.mesh.setTransfiniteVolumeFunction
gmsh.model.geo.mesh.setTransfiniteVolume(tag, cornerTags = Cint[])

Set a transfinite meshing constraint on the surface tag in the built-in CAD kernel representation. cornerTags can be used to specify the (6 or 8) corners of the transfinite interpolation explicitly.

source
gmsh.model.geo.mesh.setRecombineFunction
gmsh.model.geo.mesh.setRecombine(dim, tag, angle = 45.)

Set a recombination meshing constraint on the entity of dimension dim and tag tag in the built-in CAD kernel representation. Currently only entities of dimension 2 (to recombine triangles into quadrangles) are supported.

source
gmsh.model.geo.mesh.setSmoothingFunction
gmsh.model.geo.mesh.setSmoothing(dim, tag, val)

Set a smoothing meshing constraint on the entity of dimension dim and tag tag in the built-in CAD kernel representation. val iterations of a Laplace smoother are applied.

source
gmsh.model.geo.mesh.setReverseFunction
gmsh.model.geo.mesh.setReverse(dim, tag, val = true)

Set a reverse meshing constraint on the entity of dimension dim and tag tag in the built-in CAD kernel representation. If val is 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). If val is false, the mesh is left as-is.

source
gmsh.model.geo.mesh.setAlgorithmFunction
gmsh.model.geo.mesh.setAlgorithm(dim, tag, val)

Set the meshing algorithm on the entity of dimension dim and tag tag in the built-in CAD kernel representation. Currently only supported for dim == 2.

source
gmsh.model.geo.mesh.setSizeFromBoundaryFunction
gmsh.model.geo.mesh.setSizeFromBoundary(dim, tag, val)

Force the mesh size to be extended from the boundary, or not, for the entity of dimension dim and tag tag in the built-in CAD kernel representation. Currently only supported for dim == 2.

source