bfieldtools.mesh_calculus.gradient¶
-
bfieldtools.mesh_calculus.
gradient
(vals, mesh, rotated=False)¶ Applies mesh (rotated) gradient matrix operator on vector that is defined in the vertex locations of the mesh.
- Parameters
- vals: Nv x 1 array of scalar data to compute the gradient of
- mesh: Trimesh object describing the triangular mesh
- rotated: boolean
If True, rotate gradient 90 degrees clockwise
- Returns
- ndarray (3, Ntris)
surface gradient of vals on each triangle