xugrid.Ugrid2d.compute_barycentric_weights#

Ugrid2d.compute_barycentric_weights(points: ndarray) Tuple[ndarray, ndarray][source]#

Find in which face the points are located, and compute the barycentric weight for every vertex of the face.

Parameters:

points (ndarray of floats with shape (n_point, 2)) –

Returns:

  • face_index (ndarray of integers with shape (n_points,))

  • weights (ndarray of floats with shape `(n_points, n_max_node))