pysdic.Mesh.compute_elements_areas#
- Mesh.compute_elements_areas()[source]#
Compute the area of each element of a surface mesh (\(K = 2\)).
Shortcut for
pysdic.fem.compute_elements_areas()with the coordinates, connectivity and element type of the mesh (see this function for the quadrature).- Returns:
An array of shape \((N_e,)\) with the area of each element.
- Return type:
Examples
1from pysdic import Mesh 2 3mesh = Mesh([[0, 0, 0], [2, 0, 0], [2, 3, 0], [0, 3, 0]], [[0, 1, 2, 3]], element_type="quadrangle_4") 4print(mesh.compute_elements_areas()) # [6.]