crop¶
- openpnm.topotools.generators.tools.crop(network, shape, mode='full')[source]¶
Removes vertices that lie outside the specifed shape
- Parameters
network (dict) – Dictionary containing
vert.coords
andedge.conns
arraysshape (array_like) – The [x, y, z] shape of the domain beyond which trimming should be applied
mode (str) –
Controls how vertices to be trimmed is determined. Options are:
- ’full’:
Any vertices lying outside the domain are trimmed
- ’mixed’
Vertices with at least one neighbor lying inside the domain are kept