On 11/23/24 20:35, 王艺康 wrote:
I am using gridin, read vtk file, in read_vtk to verify the line 1.2.3.4 in
the vtk file, the first line must be # vtk DataFile Version 3.0, because of
the update of the vtk version, I am now using the new version 5.1 to read and
write, I can only write the old version # vtk DataFile Version 4.2, 4.2 and
3.0 are in the same format, when I manually change 4.2 to 3.0, dealii still
reports an error, # vtk DataFile Version 3.0 is not recognized.
I am not entirely sure I understand what you are saying. Are you saying that
if you change the header to say version 3.0, deal.II still complains that only
version 3.0 is recognized? That seems unlikely.
Or are you saying that if you change the header to say that you are using
version 3.0, but the body of the file is actually following version 4.2, then
deal.II complains? That seems more likely. What you are finding is that the
file formats 3.0 and 4.2 really *are* different, and that only changing the
number at the top does not actually fix the issue that deal.II can only read
version 3.0.
You have two solutions:
(i) You find a way to convert the file into 3.0 format.
(ii) You extend the reader in GridIn::read_vtk() to also read newer VTK file
formats. Presumably, this should not be terribly difficult as long as you can
find a description of how the file format versions differ somewhere. We would
of course be happy to assist.
Best
WB
--
The deal.II project is located at http://www.dealii.org/
For mailing list/forum options, see
https://groups.google.com/d/forum/dealii?hl=en
---
You received this message because you are subscribed to the Google Groups "deal.II User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to dealii+unsubscr...@googlegroups.com.
To view this discussion visit
https://groups.google.com/d/msgid/dealii/e48f2300-20e2-4e57-85ea-369c5f1af8ad%40colostate.edu.