mesh.Mesh.enclosed_volume#

Mesh.enclosed_volume()#

Return the total enclosed volume of a Mesh.

Returns#

float

For a volumetric Mesh (level=3), the total volume of all elements is returned (see volume()). For a surface Mesh, the enclosed volume is returned if the surface is a closed orientable manifold surface. Returns 0 in all other cases.

See Also#

Examples#

>>> M = Mesh(eltype='hex8').border_mesh()
>>> vol = M.enclosed_volume()
>>> print(np.isclose(vol, 1.0))
True