I am writing on a library that does a lot with unstructured grids/meshes and I want to use ParaView to visualize these meshes for debug purposes. In principle this works fine when I just write any mesh to a .vtu file and open it in ParaView. However, I would like to see the IDs, given by the library code to each vertex, cell and sub-entities of cells (i.e. edges and faces). For vertices and cells I can just save the IDs as cell/point data, use a spreadsheet view and click on a cell/vertex to obtain the id. However this does not work for edges and faces. Even when I store the corresponding lines/quads/triangles/etc. as cells in the .vtu file, ParaView just ignores these. Is there any way to visualize edge/face ID data in ParaView or do I have to look for something else?
There is no concept of edges and faces in VTK/ParaView.
If you want to store edges and faces you need to create dedicated (and duplicated) cells to show and store these data.
I see. I think I basically tried that by just adding edges/faces as additional cells to the vtu file. If this would work I would be fine with it. However, they still didn’t show up in the Spreadsheet view under the CellData attribute. Even more odd: When I only add faces and edges but omit the 3d cells completely, some quads show up, but not all of them.
This is the file where I tried that: mesh.vtu (3.5 KB)
I guess there is something wrong with your file. If you open the spreasheet view and set the “Attribute” to Cell Data you can see the types of the cells. For the above file I see 9 hexahedra, 1 pyramid and 1 tetrahedon.
See bellow a simpler mesh made out of 1 hexahedron, 6 quads, and 12 lines. The same view shows all the different cells which you can highlight and select/ extract.
There was, thanks for pointing that out. I didn’t change the NumberOfCells Attribute for the Piece Node when including edges and faces. Now everything works as expected.