discretize.TensorMesh.vtk_to_tensor_mesh#

classmethod TensorMesh.vtk_to_tensor_mesh(vtrGrid)[source]#

Convert vtk object to a TensorMesh.

Convert vtkRectilinearGrid or RectilinearGrid object to a TensorMesh object.

Parameters:
vtuGridvtkRectilinearGrid or RectilinearGrid

A VTK or PyVista rectilinear grid object

Returns:
discretize.TensorMesh

A discretize tensor mesh