uxarray.grid.connectivity._build_node_faces_connectivity#

uxarray.grid.connectivity._build_node_faces_connectivity(grid)#

Builds the Grid.Mesh2_node_faces: integer DataArray of size (nMesh2_node, nMaxNumFacesPerNode) (optional) A DataArray of indices indicating faces that are neighboring each node.

This function converts the face-node connectivity data into a sparse matrix, and then constructs the node-face connectivity by iterating over each node in the mesh and retrieving the set of neighboring faces.

Raises:

RuntimeError – If the Mesh object does not contain a ‘Mesh2_face_nodes’ variable.