For details and the vtu file I used (it's just the first file of vaclogo test), see the bug report in meshio repo: nschloe/meshio#1135
There are two issues. The first one is the spaces in the "offset" attributes, which causes problems for parsing with python's xml parser.
The second issue has not been figured out. I don't know where the bug is, meshio or amrvac.
As posted in the issue above, There are some DataArray
in Points
Tags that gives a list of data but could not be reshaped into (-1, NumberOfComponents)
, i.e. the length of data is not an integer multiple of NumberOfComponents
. I tried to print the data at offset 427932 parsed by meshio (where meshio throws an error, see the other issue), there are 100 integers, but the NumberOfComponents
is 3:
[0.5 0.5 0.5 2. 2. 2. 2. 2. 2. 2. 0.5 0.5 0.5 2. 2. 2. 2. 2.
2. 2. 0.5 0.5 2. 2. 2. 2. 2. 2. 2. 2. 0.5 0.5 2. 2. 2. 2.
2. 2. 2. 2. 0.5 0.5 2. 2. 2. 2. 2. 2. 2. 2. 0.5 0.5 2. 2.
2. 2. 2. 2. 2. 2. 0.5 2. 2. 2. 2. 2. 2. 2. 2. 2. 0.5 2.
2. 2. 2. 2. 2. 2. 2. 2. 0.5 2. 2. 2. 2. 2. 2. 2. 2. 2.
2. 2. 2. 2. 2. 2. 2. 2. 2. 2. ] (100,) {'type': 'Float32', 'NumberOfComponents': '3', 'format': 'appended', 'offset': '427932'}
Most of the data is parsed without any errors. The other Points
tags contain exactly 363 data points, which is 3 times the NumberOfPoints
in this vtu file, e.g.:
[0.15 0.65 0. 0.155 0.65 0. 0.16 0.65 0. 0.165 0.65 0.
0.17 0.65 0. 0.175 0.65 0. 0.18 0.65 0. 0.185 0.65 0.
0.19 0.65 0. 0.195 0.65 0. 0.2 0.65 0. 0.15 0.655 0.
0.155 0.655 0. 0.16 0.655 0. 0.165 0.655 0. 0.17 0.655 0.
0.175 0.655 0. 0.18 0.655 0. 0.185 0.655 0. 0.19 0.655 0.
0.195 0.655 0. 0.2 0.655 0. 0.15 0.66 0. 0.155 0.66 0.
0.16 0.66 0. 0.165 0.66 0. 0.17 0.66 0. 0.175 0.66 0.
0.18 0.66 0. 0.185 0.66 0. 0.19 0.66 0. 0.195 0.66 0.
0.2 0.66 0. 0.15 0.665 0. 0.155 0.665 0. 0.16 0.665 0.
0.165 0.665 0. 0.17 0.665 0. 0.175 0.665 0. 0.18 0.665 0.
0.185 0.665 0. 0.19 0.665 0. 0.195 0.665 0. 0.2 0.665 0.
0.15 0.67 0. 0.155 0.67 0. 0.16 0.67 0. 0.165 0.67 0.
0.17 0.67 0. 0.175 0.67 0. 0.18 0.67 0. 0.185 0.67 0.
0.19 0.67 0. 0.195 0.67 0. 0.2 0.67 0. 0.15 0.675 0.
0.155 0.675 0. 0.16 0.675 0. 0.165 0.675 0. 0.17 0.675 0.
0.175 0.675 0. 0.18 0.675 0. 0.185 0.675 0. 0.19 0.675 0.
0.195 0.675 0. 0.2 0.675 0. 0.15 0.68 0. 0.155 0.68 0.
0.16 0.68 0. 0.165 0.68 0. 0.17 0.68 0. 0.175 0.68 0.
0.18 0.68 0. 0.185 0.68 0. 0.19 0.68 0. 0.195 0.68 0.
0.2 0.68 0. 0.15 0.685 0. 0.155 0.685 0. 0.16 0.685 0.
0.165 0.685 0. 0.17 0.685 0. 0.175 0.685 0. 0.18 0.685 0.
0.185 0.685 0. 0.19 0.685 0. 0.195 0.685 0. 0.2 0.685 0.
0.15 0.69 0. 0.155 0.69 0. 0.16 0.69 0. 0.165 0.69 0.
0.17 0.69 0. 0.175 0.69 0. 0.18 0.69 0. 0.185 0.69 0.
0.19 0.69 0. 0.195 0.69 0. 0.2 0.69 0. 0.15 0.695 0.
0.155 0.695 0. 0.16 0.695 0. 0.165 0.695 0. 0.17 0.695 0.
0.175 0.695 0. 0.18 0.695 0. 0.185 0.695 0. 0.19 0.695 0.
0.195 0.695 0. 0.2 0.695 0. 0.15 0.7 0. 0.155 0.7 0.
0.16 0.7 0. 0.165 0.7 0. 0.17 0.7 0. 0.175 0.7 0.
0.18 0.7 0. 0.185 0.7 0. 0.19 0.7 0. 0.195 0.7 0.
0.2 0.7 0. ] 363 {'type': 'Float32', 'NumberOfComponents': '3', 'format': 'appended', 'offset': '564692'}