- SalineWater.labels(pores=, throats=, element=None, mode='union')¶
Returns a list of labels present on the object
Additionally, this function can return labels applied to a specified set of pores or throats
element (str) – Controls whether pore or throat labels are returned. If empty then both are returned (default).
throats) (pores (or) – The pores (or throats) whose labels are sought. If left empty a list containing all pore and throat labels is returned.
mode (str, optional) –
Controls how the query should be performed. Only applicable when
’or’, ‘union’, ‘any’: (default) Returns the labels that are assigned to any of the given locations.
’and’, ‘intersection’, ‘all’: Labels that are present on all the given locations.
’xor’, ‘exclusive_or’ : Labels that are present on only one of the given locations.
’nor’, ‘none’, ‘not’: Labels that are not present on any of the given locations.
’nand’: Labels that are present on all but one of the given locations
’xnor’: Labels that are present on more than one of the given locations. ‘nxor’ is also accepted.
A list containing the labels on the object. If
throatsare given, the results are filtered according to the
Technically, ‘nand’ and ‘xnor’ should also return pores with none of the labels but these are not included. This makes the returned list more useful.
>>> import openpnm as op >>> pn = op.network.Cubic(shape=[5, 5, 5]) >>> pn.labels(pores=[11, 12]) ['pore.all', 'pore.internal', 'pore.left', 'pore.surface']