TensorMesh.write_vtk

Hello!

I´m running the first part of the example “3D Inversion of Gravity Anomaly Data”, exactly until the plot of the inversion using a tensor mesh.

I try to create a vtk file, for visualization in Paraview, so I add the following lines:

#------------------------------------------------------------------------------------------

#Assign cell values to activated cells:

final = np.nan * np.ones([len(active_tensor_cells])final[active_tensor_cells]) = recovered_tensor_model

models = {‘inverted’: final}

path = ‘../Inversions/model’

tensor_mesh.write_vtk(path, models)

#------------------------------------------------------------------------------------------

Result is a new file named “model.vtr”, but whe loaded in Paraview this creates the figure of a single hexaedron.

Am I missing something?

Thank you in advance!

Hi Olaf. Thanks for opening this question, and I’m sorry for the delayed reply.

I reproduced your example and was able to lead the VTK file into Paraview. In order to see something other than the outline of the mesh, you need to choose a Surface representation in Paraview. Check this screenshot of the side panel: