get_spacing

openpnm.topotools.generators.tools.get_spacing(network)[source]

Determine spacing of a cubic network

Parameters

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

Returns

spacing – An array containing the spacing between vertices in each direction

Return type

ndarray

Notes

This function only works on simple cubic networks with no boundary vertices. If a unique spacing cannot be found in each direction, and/or the edges are not all oriented perpendicularly, exceptions will be raised.