pyFM.mesh.geometry.get_orientation_op¶
- pyFM.mesh.geometry.get_orientation_op(grad_field, vertices, faces, normals, per_vert_area, rotated=False)¶
Compute the linear orientation operator associated to a gradient field grad(f).
This operator computes g -> < grad(f) x grad(g), n> (given at each vertex) for any function g. In practice, we compute < n x grad(f), grad(g) > for simpler computation.
- Parameters:
grad_field ((n_f, 3) np.ndarray) – Gradient field on the mesh.
vertices ((n_v, 3) np.ndarray) – Coordinates of the vertices.
faces ((n_f, 3) np.ndarray) – Vertex indices for each face.
normals ((n_f, 3) np.ndarray) – Normal coordinates for each face.
per_vert_area ((n_v,) np.ndarray) – Voronoi area for each vertex.
rotated (bool, optional) – Whether the gradient field is already rotated by n x grad(f).
- Returns:
operator – Orientation operator.
- Return type:
(n_v, n_v) scipy.sparse.csc_matrix