DataSetReader reads data incorrectly from ".vtk" files that were converted from ".vtu" or ".pvtu" to ".vtk" in ParaView
I am attempting to read data saved in a legacy ".vtk" file format, which originated as ".pvtu" and ".vtu" files.
The original simulation data (either ".pvtu" or ".vtu") was loaded into ParaView, and then saved as ".vtk" so that it could be loaded into VTK-m.
When VTK-m loads the data, the result is errorenous. This is displayed both when doing IO, and when loading and then rendering the loaded data. In the ".pvtu" case, some of the data set is missing -- it appears to have missed all the data beloging to one of the processes. In the ".vtu" case, data is not obviously missing, but is still erroneous. It looks as though the grid is incorrect in both cases.
The data set type is an Unstructured Grid. The number of cells and number of points appears to be preserved through the IO (based on the information provided by ParaView), even with the incorrect looking output grid.
I am attaching images of several of these cases:
- "Frank_Sphere_IO.pdf" : comparison of original ".vtk" data and output from vtk-m visualized by ParaView for the ".pvtu" file case
- "Frank_Sphere_single_process_IO.pdf": comparison of original ".vtk" data and output data from vtk-m visualized by ParaView for the ".vtu" file case
- "Frank_sphere_single_process_IO_grid.pdf" : comparison of original ".vtk" grid and output gridfrom vtk-m visualized by ParaView for the ".vtu" file case
- "Frank_sphere_Input_and_Render.pdf": comparison of original ".vtk" data in ParaView and rendering provided by vtk-m after load
I am also attaching the original data set ".vtk" files for which I noticed this issue. The file has the data owned by just one of the simulation processes. frank_sphere_3d_paraview_510_one_process.vtk (The entire data set is too large to upload)
I have tried saving the .pvtu (parallel) and .vtu (from a single process) data to .vtk using ParaView v5.6.0 and v5.10.0, and the same behavior results in both.
Just as a sanity check, I also loaded the tutorial data set "kitchen.vtk" into ParaView and saved this data as a ".vtk" from ParaView, and attempted the same process of IO with VTK-m with the data set that was saved from ParaView. In this case, I don't observe any erroenous behavior.
@ollielo -- I am tagging you here.
Frank_Sphere_IO.pdfFrank_Sphere_single_process_IO.pdfFrank_Sphere_single_process_IO_grid.pdfFrank_Sphere_Input_and_Render.pdf
Some additional insight: We discussed this issue with @kmorel, and he suspects it may be related to the fact that when unstructured, adaptive grids are saved to ".vtk", it sometimes saves the grid elements as hexahedra, and at other times saves them as voxels. In this case, the VTK-m reader can have trouble reading the data depending on what kind of elements the adaptive mesh has been saved with.