VolMesh.edges_where_predicate

VolMesh.edges_where_predicate(predicate, data=False)[source]

Get edges for which a certain condition or set of conditions is true using a lambda function.

Parameters
  • predicate (callable) – The condition you want to evaluate. The callable takes 2 parameters: the edge identifier and the edge attributes, and should return True or False.

  • data (bool, optional) – If True, yield the edge attributes in addition to the identifiers.

Yields

tuple[int, int] | tuple[tuple[int, int], dict[str, Any]] – If data is False, the next edge as a (u, v) tuple. If data is True, the next edge as a (u, v, data) tuple.