classmethod TensorMesh.read_vtk(file_name, directory='')[source]

Read VTK rectilinear file (vtr or xml) and return a discretize tensor mesh (and models)

This method reads a VTK rectilinear file (vtr or xml format) and returns a tuple containing the TensorMesh as well as a dictionary containing any models. The keys in the model dictionary correspond to the file names of the models.


full path to the VTK rectilinear file (vtr or xml) containing the mesh (and models) or just the file name if the directory is specified.

directorystr, optional

directory where the file lives


The tensor mesh object.

model_dictdict of [str, (n_cells) numpy.ndarray]

A dictionary containing the models. The keys correspond to the names of the models.