cubic_template

openpnm.topotools.generators.cubic_template(template, spacing=1)[source]

Generate a simple cubic lattice matching the shape of the provided tempate

Parameters
  • templte (ndarray) – Each True value will be treated as a vertex while all others will be trimmed.

  • spacing (array_like or float) – The size of a unit cell in each direction. If an scalar is given it is applied in all 3 directions.

Returns

network – A dictionary containing ‘vert.coords’ and ‘edge.conns’

Return type

dict