optymus.methods.polymesher¶
- optymus.methods.polymesher(domain, n_elements, max_iter, initial_points=None)[source]¶
PolyMesher
Generate a polygon mesh using the polymesher algorithm.
- Parameters:
domain (function) – The domain in which the mesh is generated.
n_elements (int) – The number of elements in the mesh.
max_iter (int) – The maximum number of iterations.
initial_points (numpy.ndarray, optional) – Initial points for the mesh generation.
- Returns:
A dictionary containing the following keys: - “node”: Node coordinates - “element”: Element vertices - “boundary_supp”: Boundary support conditions - “boundary_load”: Boundary load conditions - “initial_points”: Initial points used for mesh generation
- Return type:
dict
Examples
>>> from optymus.benchmark import MbbDomain >>> from optymus.methods.topological import polymesher >>> mesh = polymesher(MbbDomain, n_elements=1000, max_iter=1000)
Notes
The PolyMesher algorithm generates a polygon mesh using a Voronoi diagram.
References
[1] - Talischi, C., Paulino, G. H., Pereira, A., & Menezes, I. F. (2012). “PolyMesher: a general-purpose mesh generator for polygonal elements written in Matlab”. Structural and Multidisciplinary Optimization, 45, 309-328.