pysdic.Mesh.to_pyvista#
- Mesh.to_pyvista(*, save_properties=True)[source]#
Convert the mesh to a
pyvista.UnstructuredGrid(only for \(E = 3\)).The element type must be set and the mesh must not be empty. The vertex properties are saved as point data and the element properties as cell data.
See also
from_pyvista()for the reverse operation.
- Parameters:
save_properties (bool, optional (default:
True)) – If False, the properties are not saved.- Returns:
The PyVista representation of the mesh (with copies of the arrays).
- Return type:
pyvista.UnstructuredGrid- Raises:
ValueError – If \(E \neq 3\), if the mesh is empty or has no element type.