xugrid.Ugrid2d.tesselate_centroidal_voronoi#

Ugrid2d.tesselate_centroidal_voronoi(add_exterior=True, add_vertices=True)[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) –

Returns:

tesselation

Return type:

Ugrid2d