cellcomplex.property_topomesh.topomesh module

This module provide a simple pure python implementation for a topomesh interface

exception cellcomplex.property_topomesh.topomesh.StrInvalidDegree(degree)[source]

Bases: cellcomplex.property_topomesh.interface.topomesh.InvalidDegree

exception raised when a wrong degree is provided

exception cellcomplex.property_topomesh.topomesh.StrInvalidWisp(degree, wid)[source]

Bases: cellcomplex.property_topomesh.interface.topomesh.InvalidWisp

exception raised when a wrong wisp id is provided

class cellcomplex.property_topomesh.topomesh.Topomesh(degree, idgenerator='set')[source]

Bases: cellcomplex.property_topomesh.interface.topomesh.ITopomesh, cellcomplex.property_topomesh.interface.topomesh.IWispListMesh, cellcomplex.property_topomesh.interface.topomesh.INeighborhoodMesh, cellcomplex.property_topomesh.interface.topomesh.IMutableMesh

implementation of a topological mesh

add_wisp(degree, wid=None)[source]

add a new wisp connected to nothing if wid is None, create a free id return used wid

border_neighbors(degree, wid)[source]

iterator on all wisps at the same degree that share a border with this wisp

borders(degree, wid, offset=1)[source]

iterator on all border of this wisp

degree()[source]

maximum degree (or scale) of elements of the mesh

enable_id_reuse(enabled=True)[source]
get_idgenerator_type()[source]
has_wisp(degree, wid)[source]

return true if the wisp specified by its id is in mesh

id_reuse_enabled()[source]
is_valid()[source]

test wether the mesh fulfill all mesh properties

link a wisp of degree degree with id wid with another wisp of degree degree-1 with id border_id

nb_border_neighbors(degree, wid)[source]

number of border_neighbors of this wisp

nb_borders(degree, wid)[source]

number of border of this wisp

nb_region_neighbors(degree, wid)[source]

number of region_neighbors of this wisp

nb_regions(degree, wid)[source]

number of regions this wisp separate

nb_wisps(degree)[source]

number of wisps of the given degree

region_neighbors(degree, wid)[source]

iterator on all wisps at the same degree that share a region with this wisp

regions(degree, wid, offset=1)[source]

iterator on all regions this wisp separate

remove_wisp(degree, wid)[source]

remove wisp from the mesh remove all attached links

remove links between a region and its border

wisps(degree)[source]

iterator on all wisps of a given degree