pysdic.Mesh.n_dimensions#

property Mesh.n_dimensions: int#

[Get] The embedding dimension \(E\) of the mesh - alias for self.vertices.n_dimensions property.

Returns:

The embedding dimension of the mesh.

Return type:

int

Examples

Create a simple Mesh instance.

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(points, connectivity, element_type="triangle_3")

Get the embedding dimension of the mesh.

1print(mesh3d.n_dimensions)
2# Output: 3