Closed fab6 closed 1 year ago
ok, I think, I see it now, the dimension is different for writing; vtk_grid needs the point positions x,y,z but the data is the cell centered with a size decreased by one, e.g. something like:
fileName = "vtrtest"
vtk = vtk_grid(fileName, x, y , z)
fieldCellDataValues = rand((xcells[1] - 1) * (ycells[1] - 1)* (zcells[1] - 1))
vtk[string("testdata"), VTKCellData()] = fieldCellDataValues
vtk_save(vtk)
Hi,
at the moment I am writing pointData to a vtr file using something similar like this:
where x, y, z are now the actual poinst. This works fine and the resulting vtr can be openend.
Now, I am directly reading cell data, that means xc, yc, zc are the actual cell centers and I would like to write out the data as cellData. At the moment I am trying:
The file gets written with the corresponding
CellData
item, but I am not able to load the file in paraview or visit. Do you have a hint, what I am doing wrong and how I can correct this? Thank you in advance! Fab