CellNetwork.add_cell
- CellNetwork.add_cell(faces, ckey=None, attr_dict=None, **kwattr)[source]
Add a cell to the cell network object.
In order to add a valid cell to the network, the faces must form a closed mesh. If the faces do not form a closed mesh, the cell is not added to the network.
- Parameters:
- faceslist[int]
The face keys of the cell.
- ckeyint, optional
The cell identifier.
- attr_dictdict[str, Any], optional
A dictionary of cell attributes.
- **kwattrdict[str, Any], optional
A dictionary of additional attributes compiled of remaining named arguments.
- Returns:
- int
The key of the cell.
- Raises:
- ValueError
If something is wrong with the passed faces.
- TypeError
If the provided cell key is not an integer.
Notes
If no key is provided for the cell, one is generated automatically. An automatically generated key is an integer that increments the highest integer value of any key used so far by 1.
If a key with an integer value is provided that is higher than the current highest integer key value, then the highest integer value is updated accordingly.