grad_edges#
- iskra.fem.grad_edges(vertices: Tensor, edges: Tensor) Tensor[SOURCE]#
Finite element gradient matrix for edges.
Given a polyline, computes the finite element gradient matrix assuming piecewise linear hat function basis.
Args: vertices (torch.Tensor): (n,d) tensor vertex list of a polyline where edges (torch.Tensor): tensor of ints of shape (m, 2) interpreted as edge index list of a polyline
Returns: torch.Tensor: (m, n) sparse coo tensor of the finite element gradient matrix