discretize.mixins.InterfaceVTK.to_vtk#
- InterfaceVTK.to_vtk(models=None)[source]#
Convert mesh (and models) to corresponding VTK or PyVista data object.
This method converts a
discretize
mesh (and associated models) to its corresponding VTK or PyVista data object.- Parameters:
- models
dict
of
[str
, (n_cells
)numpy.ndarray
],optional
Models are supplied as a dictionary where the keys are the model names. Each model is a 1D
numpy.ndarray
of size (n_cells).
- models
- Returns:
pyvista.UnstructuredGrid
,pyvista.RectilinearGrid
orpyvista.StructuredGrid
The corresponding VTK or PyVista data object for the mesh and its models