volume_face_normals#

iskra.geometry.normals.volume_face_normals(simplices: Tensor) Tensor[SOURCE]#

Computes face normals weighted by the hypervolume of the element.

Thin wrapper dispatching to either iskra.edge_length_normals() or iskra.triangle_area_normals(). Works on triangle meshes in 3D and polylines in 2D.

Parameters:

simplices (Tensor[Float, [Bs, S, Dim]]) – Simplices tensor s.t. second to last dimension represent corners, last represents coordinates.

Raises:

NotImplementedError – Simplices must have either 2 or 3 corners.

Returns:

(Tensor[Float, [Bs, S, Dim]]) – Volume weighted face normals.