pysdic.Mesh.element_type#

property Mesh.element_type: str | None#

[Get or Set] The element type of the mesh - alias for self.connectivity.element_type property.

Returns:

The element type of the mesh, or None if not specified.

Return type:

str or None

Examples

Create a simple Mesh instance with a specified element type.

1import numpy as np
2from pysdic import Mesh, PointCloud
3
4points = np.array([[0, 0, 0], [1, 0, 0], [0, 1, 0], [0, 0, 1]])
5connectivity = np.array([[0, 1, 2], [0, 1, 3], [0, 2, 3], [1, 2, 3]])
6mesh3d = Mesh(PointCloud.from_array(points), connectivity, element_type="triangle_3")

Get the element type of the mesh.

1print(mesh3d.element_type)
2# Output: triangle_3