pandamesh.MeshAlgorithm#

class pandamesh.MeshAlgorithm(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)[source]#

Gmsh meshing algorithm. Each algorithm has its own advantages and disadvantages.

For all 2D unstructured algorithms a Delaunay mesh that contains all the points of the 1D mesh is initially constructed using a divide-and-conquer algorithm. Missing edges are recovered using edge swaps. After this initial step several algorithms can be applied to generate the final mesh:

  • The MeshAdapt algorithm is based on local mesh modifications. This technique makes use of edge swaps, splits, and collapses: long edges are split, short edges are collapsed, and edges are swapped if a better geometrical configuration is obtained.

  • The Delaunay algorithm is inspired by the work of the GAMMA team at INRIA. New points are inserted sequentially at the circumcenter of the element that has the largest adimensional circumradius. The mesh is then reconnected using an anisotropic Delaunay criterion.

  • The Frontal-Delaunay algorithm is inspired by the work of S. Rebay.

  • Other experimental algorithms with specific features are also available. In particular, Frontal-Delaunay for Quads is a variant of the Frontal-Delaunay algorithm aiming at generating right-angle triangles suitable for recombination; and BAMG allows to generate anisotropic triangulations.

For very complex curved surfaces the MeshAdapt algorithm is the most robust. When high element quality is important, the Frontal-Delaunay algorithm should be tried. For very large meshes of plane surfaces the Delaunay algorithm is the fastest; it usually also handles complex mesh size fields better than the Frontal-Delaunay. When the Delaunay or Frontal-Delaunay algorithms fail, MeshAdapt is automatically triggered. The Automatic algorithm uses Delaunay for plane surfaces and MeshAdapt for all other surfaces.

MESH_ADAPT = 1#

Local mesh modifications using edge swaps, splits, and collapses. Robust for complex curved surfaces.

AUTOMATIC = 2#

Uses Delaunay for plane surfaces and MeshAdapt for all other surfaces.

INITIAL_MESH_ONLY = 3#

Generates only the initial Delaunay triangulation.

FRONTAL_DELAUNAY = 5#

Good for high element quality.

BAMG = 7#

Experimental algorithm for generating anisotropic triangulations.

FRONTAL_DELAUNAY_FOR_QUADS = 8#

Variant of Frontal-Delaunay aiming to generate right-angle triangles suitable for recombination.

PACKING_OF_PARALLELLOGRAMS = 9#

Experimental algorithm for parallelogram-based mesh generation.

QUASI_STRUCTURED_QUAD = 11#

Combines an initial unstructured quad mesh with topological improvements guided by cross fields to produce quasi-structured meshes with few irregular vertices.