compute_connectivity

ExplicitStructuredGrid.compute_connectivity(inplace=True)

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 to 27 (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
inplacebool, optional

This method is applied to this grid if True (default) or to a copy otherwise.

Returns
ExplicitStructuredGrid

A deep copy of this grid if inplace=False.

See also

ExplicitStructuredGrid.compute_connections

Compute an array with the number of connected cell faces.

Examples

>>> from pyvista import examples
>>> 
>>> grid = examples.load_explicit_structured()  
>>> grid.compute_connectivity()  
>>> grid.plot(show_edges=True)