Reading vtk file

I hope this message finds all well.
I am reaching out to ask one issue regarding my vtk output files.
When I plot the files, I get the profiles, however, in the same time I get the error message saying “Cannot read lookup table data!”. There is actually such a line in the vtk files. I have searched to find the possible reason but had no luck.
I’d appreciate if any of you can have any suggestion on this matter.
Please find attached sample file.
Thank you for your time.
VolTs_res_at_loop_1.vtk (1.2 MB)

Looks like your file is slightly malformed and VTK reports it. More investigation would be needed as to what should be fixed in your file.

That being said, ParaView would completely ignore that lookup table information, so it is safe to ignore.

How did you generate that file ?

Hello Mathieu,

Thank you for your prompt reply. I appreciate it!
This is part of the large code.
In one section I saw it says,
filename = m_prefixname + “VolTs_VTK” + m_subdName + “_” + filesuffix + “.vtk”;

“outputfile << “# vtk DataFile Version 2.0” << std::endl;”

Do yo think having updated version would be better? If I don’t understand wrong, I assume vtk is an old format and it has been switched to vtu. Should I do so?

Also, do you think the attached warning can be omitted too? When its ays “Unsupported cell attribute” does it mean that some of my results are not plotted.

Thank you

I dont see this warning, is it from another file ?

It appears that the VolTs_res_at_loop_1.vtk file can be successfully loaded after implementing the following two modifications:

  1. Switch lines 41921 and 41922:
    Please rearrange these lines in the file.
  2. Replace float with double:
    Update any occurrences of the data type “float” to “double.”

For your convenience, I have attached the modified file. (220.5 KB)

Hello Mathieu,

I realized that I did not attach that file. Yes, that warning was from another file which I have attached.
VolTs_res_at_loop_0_363.vtk (1.0 MB)

Hello Kyoshimi,

Thank you for your time and your suggestion. I will try it.