xugrid.Ugrid1d.topology_subset#
- Ugrid1d.topology_subset(edge_index: ndarray, return_index: bool = False)[source]#
Create a new UGRID1D topology for a subset of this topology.
- Parameters:
edge_index (1d array of integers or bool) – Edges of the subset.
return_index (bool, optional) – Whether to return node_index, edge_index.
- Returns:
subset (Ugrid1d)
indexes (dict) – Dictionary with keys node dimension and edge dimension and values their respective index. Only returned if return_index is True.