- openpnm.topotools.site_percolation(ij, occupied_sites)¶
Calculates the site and bond occupancy status for a site percolation process given a list of occupied sites.
ij (array_like) – An N x 2 array of [site_A, site_B] connections. If two connected sites are both occupied they are part of the same cluster, as it the bond connecting them.
occupied_sites (bool) – A list indicating whether sites are occupied or not
A tuple containing a list of site and bond labels, indicating which
cluster each belongs to. A value of -1 indicates unoccupied.
connected_componentsfunction of scipy.sparse.csgraph will give ALL sites a cluster number whether they are occupied or not, so this function essentially adjusts the cluster numbers to represent a percolation process.