compute_connections

ExplicitStructuredGrid.compute_connections(inplace=True)

Compute an array with the number of connected cell faces.

This method calculates the number of topological cell neighbors connected by faces. The results are stored in the 'number_of_connections' cell array.

Parameters
inplacebool, optional

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

Returns
ExplicitStructuredGrid or None

A deep copy of this grid if inplace=False or None otherwise.

See also

ExplicitStructuredGrid.compute_connectivity

Compute the faces connectivity flags array.

Examples

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