Dear VTK experts,
Is it possible to visualize scalar attributes on the faces of a vtkUnstructuredGrid, which also contains scalar attributes at each cell? Currently, I am outputting two separate files for storing the unstructured grid (.vtu file) and the corresponding surface data (.vtp file).
This method is not ideal because the points information is identical for both the .vtu and .vtp files, and only needs to be outputted once. Additionally, when visualizing in paraview, the .vtp file must be read into the pipeline after the .vtu file in order for the surface data to be properly displayed.
Given that the 2D face cells reference the same 3D points as the unstructured grid cells, could both sets of data be combined into a single file?
I have attached the python script used to generate the .vtu and .vtp files described above. In this case, I generate a hexahedron with a single scalar value in the .vtu file (attached). I also generate two faces that lie on the hexahedron, each with a different scalar value in the .vtp file (attached).
write_vtk_polyhedron.py (6.0 KB) volume.vtu (1.7 KB) surface.vtp (2.1 KB)