uxarray.grid.connectivity.close_face_nodes#
- uxarray.grid.connectivity.close_face_nodes(face_node_connectivity, n_face, n_max_face_nodes)#
Closes (
face_node_connectivity
) by inserting the first node index after the last non-fill-value node.- Parameters:
face_node_connectivity (np.ndarray) – Connectivity array for constructing a face from its nodes
n_face (constant) – Number of faces
n_max_face_nodes (constant) – Max number of nodes that compose a face
- Returns:
closed – Closed (padded) face_node_connectivity
- Return type:
ndarray
Example
- Given face nodes with shape [2 x 5]
[0, 1, 2, 3, FILL_VALUE] [4, 5, 6, 7, 8]
- Pads them to the following with shape [2 x 6]
[0, 1, 2, 3, 0, FILL_VALUE] [4, 5, 6, 7, 8, 4]