mesh.Mesh.remove_duplicate#

Mesh.remove_duplicate(permutations='all')#

Remove the duplicate elements from a Mesh.

Duplicate elements are defined as elements composed of the same set of nodes.

Parameters#

permutations: str

Defines which permutations of the nodes are allowed while still considering the elements duplicates. Possible values are:

  • ‘none’: no permutations are allowed: the node list of the elements must have the same value at every position in order to be considered duplicates;

  • ‘roll’: rolling is allowed. Node lists that can be transformed into each other by rolling are considered equal;

  • ‘all’: any permutation of the same set of nodes will be considered a duplicate element. This is the default.

Returns#

Mesh

A Mesh with all duplicate elements removed.

Examples#

>>> M = Mesh(np.zeros((4,3)),
...     [[0,1,2,3],
...      [2,2,3,3],
...      [3,2,1,0],
...     ],eltype='quad4')
>>> print(M.remove_duplicate().elems)
[[0 1 2 3]
 [2 2 3 3]]