pysdic.Mesh.get_degenerated_elements_mask#

Mesh.get_degenerated_elements_mask()[source]#

Get the degenerated elements, i.e. the elements using the same vertex at least twice.

Note

Only repeated indices are detected: an element with distinct but aligned (or coincident) vertices is not considered degenerated.

Returns:

A boolean array of shape \((N_e,)\), True for the degenerated elements.

Return type:

numpy.ndarray

Examples

1import numpy
2from pysdic import Mesh
3
4points = numpy.array([[0, 0, 0], [1, 0, 0], [0, 1, 0], [0, 0, 1]])
5elements = numpy.array([[0, 1, 2], [0, 1, 3], [0, 2, 3], [1, 2, 2]])
6mesh = Mesh(points, elements, element_type="triangle_3")
7
8print(mesh.get_degenerated_elements_mask())  # [False False False  True]