connect_pores#

connect_pores(network, pores1, pores2, labels=['new_conns'])[source]#

Returns the possible connections between two groups of pores

Parameters:
  • network (Network) – The network to which the pores should be added

  • pores1 (array_like) – The first group of pores on the network

  • pores2 (array_like) – The second group of pores on the network

  • labels (list of strings) – The labels to apply to the new throats. The default is 'new_conns'.

Notes

The method also works if pores1 and pores2 are list of lists, in which case it consecutively connects corresponding members of the two lists in a 1-to-1 fashion. Example: pores1 = [[0, 1], [2, 3]] and pores2 = [[5], [7, 9]] leads to creation of the following connections:

0 --> 5     2 --> 7     3 --> 7
1 --> 5     2 --> 9     3 --> 9

If you want to use the batch functionality, make sure that each element within pores1 and pores2 are of type list or ndarray.