find_connecting_bonds

openpnm.topotools.find_connecting_bonds(sites, am)[source]

Given pairs of sites, finds the bonds which connects each pair.

Parameters
  • sites (array_like) – A 2-column vector containing pairs of site indices on each row.

  • am (scipy.sparse matrix) – The adjacency matrix of the network. Must be symmetrical such that if sites i and j are connected, the matrix contains non-zero values at locations (i, j) and (j, i).

Returns

  • Returns a list the same length as P1 (and P2) with each element

  • containing the throat number that connects the corresponding pores,

  • or None` if pores are not connected.

Notes

The returned list can be converted to an ndarray, which will convert the None values to nan. These can then be found using numpy.isnan.