pyvista.ExplicitStructuredGrid.compute_connectivity#
- ExplicitStructuredGrid.compute_connectivity(
- inplace: bool = False,
Compute the faces connectivity flags array.
This method checks the faces connectivity of the cells with their topological neighbors. The result is stored in the array of integers
'ConnectivityFlags'. Each value in this array must be interpreted as a binary number, where the digits shows the faces connectivity of a cell with its topological neighbors -Z, +Z, -Y, +Y, -X and +X respectively. For example, a cell with'ConnectivityFlags'equal to27(011011) indicates that this cell is connected by faces with their neighbors(0, 0, 1),(0, -1, 0),(-1, 0, 0)and(1, 0, 0).- Parameters:
- Returns:
ExplicitStructuredGridA deep copy of this grid if
inplace=False, or this DataSet if otherwise.
See also
ExplicitStructuredGrid.compute_connectionsCompute an array with the number of connected cell faces.
Examples
>>> from pyvista import examples >>> >>> grid = examples.load_explicit_structured() >>> grid = grid.compute_connectivity() >>> grid.plot(show_edges=True)