xugrid.Ugrid2d.tesselate_centroidal_voronoi#

Ugrid2d.tesselate_centroidal_voronoi(add_exterior=True, add_vertices=True, skip_concave=False)[source]#

Create a centroidal Voronoi tesselation of this UGRID2D topology.

Such a tesselation is not guaranteed to produce convex cells. To ensure convexity, set add_vertices=False – this will result in a different exterior, however.

Parameters:
  • add_exterior (bool, default: True)

  • add_vertices (bool, default: True)

  • skip_concave (bool, default: False)

Returns:

tesselation

Return type:

Ugrid2d