assemble_incidence_matrix#
- iskra.topology.assemble_incidence_matrix(n_faces: int, n_subfaces: int, face_to_subface: Tensor, subface_sign: Tensor, signed: bool = False) SparseTensor[SOURCE]#
Assembles face-subface relationships into a matrix.
Returns a sparse [F, S] matrix where a non-zero entry at \((i, j)\) indicates that face \(i\) contains subface \(j\). The entry is \(1\) if
signed=Falseand is equal to the orientation of the subface \(j\) as seen from face \(i\) (seeget_faces()) ifsigned=True. The inputs needed for this function usually come fromget_subfaces(), or you can use the high-level wrapperincidence_matrix().- Parameters:
- Returns:
(
SparseTensor[Float, [F, S]]) – Incidence matrix.