mesh.Mesh.generate_quad_mesh#

Mesh.generate_quad_mesh(holes=None)#

Generate a quad surface mesh inside a closed line2 mesh.

The current mesh must be a closed, unbranched line2 loop. Optional holes can be provided as closed line2 meshes.

Important

An additional node is inserted at the midpoint of every boundary element. Consequently, the boundary of the resulting quad mesh will contain twice as many edges as the input line2 mesh.

For curved boundaries, inserting midpoint nodes on boundary elements may lead to a geometric approximation error.

Parameters#

holeslist of Mesh, optional

List of closed line2 meshes representing holes.

Returns#

Mesh

Quad surface mesh (quad4) filling the area inside this mesh.

Examples#

Midpoint insertion on boundary edges:

>>> cir = shapes.circle(div=8) # 8 elements
>>> quad = cir.generate_quad_mesh()
>>> print(quad.border_mesh().n_elems())
16