cfdm.DomainTopology.set_cell

DomainTopology.set_cell(cell)[source]

Set the cell type.

The cell type indicates the common spatial dimensionality of the cells, one of:

  • 'point': A point is zero-dimensional and has no boundary

    vertices.

  • 'edge': An edge is one-dimensional and corresponds to a

    line connecting two boundary vertices.

  • 'face': A face is two-dimensional and corresponds to a

    surface enclosed by a set of edges.

New in version (cfdm): 1.11.0.0

Parameters
cell: str

The value for the cell type.

Returns

None

Examples

>>>
>>> d = cfdm.DomainTopology()
>>> d.has_cell()
False
>>> d.set_cell('face')
>>> d.has_cell()
True
>>> d.get_cell()
'face'
>>> d.del_cell()
'face'
>>> d.get_cell()
Traceback (most recent call last):
    ...
ValueError: DomainTopology has no 'cell' component
>>> print(d.get_cell(None))
None