cf.CellConnectivity.del_connectivity

CellConnectivity.del_connectivity(default=ValueError())[source]

Remove the connectivity.

{The connectivity type describes a characteristic of inter-cell connectivity defined by the domain topology construct. It may take any value, but the following values are standardised:

  • 'node': Edge or face cells connected by one or more

    shared nodes.

  • 'edge': Face cells connected by one or more shared

    edges.

Added in version (cfdm): 1.11.0.0

Parameters:
default: optional

Return the value of the default parameter if the connectivity has not been set.

If set to an Exception instance then it will be raised instead.

Returns:

The removed connectivity.

Examples

>>> d = cf.CellConnectivity()
>>> d.has_connectivity()
False
>>> d.set_connectivity('face')
>>> d.has_connectivity()
True
>>> d.get_connectivity()
'face'
>>> d.del_connectivity()
'face'
>>> d.get_connectivity()
Traceback (most recent call last):
    ...
ValueError: CellConnectivity has no 'connectivity' component
>>> print(d.get_connectivity(None))
None