discretize.mixins.TensorMeshIO.vtk_to_tensor_mesh

classmethod TensorMeshIO.vtk_to_tensor_mesh(vtrGrid)[source]

Convert vtkRectilinearGrid or RectilinearGrid object to a TensorMesh object.

Parameters
vtrGridvtkRectilinearGrid or RectilinearGrid

A VTK or PyVista rectilinear grid object

Returns
discretize.TensorMesh

A discretize tensor mesh