pyFM.mesh.laplacian.dia_area_mat

pyFM.mesh.laplacian.dia_area_mat(vertices, faces, faces_areas=None)

Compute the diagonal matrix of lumped vertex areas for the mesh Laplacian.

Entry i on the diagonal is the area of vertex i, approximated as one third of the sum of the areas of its adjacent triangles.

Parameters:
  • vertices ((n, 3) np.ndarray) – Coordinates of the mesh vertices.

  • faces ((m, 3) np.ndarray) – Vertex indices defining the faces.

  • faces_areas ((m,) np.ndarray, optional) – Per-face areas. Computed from the mesh if not provided.

Returns:

A – Sparse diagonal matrix of vertex areas in dia format.

Return type:

(n, n) scipy.sparse.dia_matrix