pysdic.Mesh.to_vtk_file#

Mesh.to_vtk_file(file_path, *, make_dirs=False, save_properties=True, binary=False, use_module='meshio')[source]#

Save the mesh to a legacy VTK file (.vtk, only for \(E = 3\)).

The mesh must have an element type and must not be empty.

Warning

Some property shapes may not be supported by the VTK format.

Parameters:
  • file_path (Union[str, os.PathLike]) – The path to the output file, with the extension .vtk.

  • make_dirs (bool, optional (default: False)) – If True, the missing parent directories are created.

  • save_properties (bool, optional (default: True)) – If False, the properties are not saved.

  • binary (bool, optional (default: False)) – If True, the file is written in binary format.

  • use_module (str, optional (default: "meshio")) – The package used to write the file: "meshio", "pyvista" or "vtk" (see to_meshio(), to_pyvista() and to_vtk()).

Raises:

ValueError – If \(E \neq 3\), or if the mesh cannot be converted (see to_meshio(), to_pyvista() or to_vtk()).

Return type:

None