cfdm.CellConnectivity.has_connectivity

CellConnectivity.has_connectivity()[source]

Whether the connectivity type has been set.

{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.

New in version (cfdm): 1.11.0.0

Returns
bool

True if the connectivity has been set, otherwise False.

Examples

>>>
>>> d = cfdm.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