vtu files not behaving as expected


I’m writing particle data to a .vtu file. I’m not using cell data, and set all of solution directly in point data.
I can load these files in Paraview, but can only render the data as Point Gaussian (not ideal for large data sets) and most important, filters applied to this data come out empty, with not output.

Any idea why that might be and what I would need to do in order to solve this? Any help would be most welcome.

I’m attaching two files, one written in ascii and one in raw, they both should have the same data.

Best regards,

ascii_IBI_00002.vtu (4.9 KB)
raw_IBI_00002.vtu (3.7 KB)

There is no cells associated to your points.
Please add a programmable filter with the following script to correct this.

pdi = self.GetInput()
pdo = self.GetOutput()
numPts = pdi.GetNumberOfPoints()
ids = vtk.vtkIdList()
for i in range(0, numPts):
    ids.SetId(0, i)
    pdo.InsertNextCell(vtk.VTK_VERTEX, ids)

Thank you for the speedy reply!

would there be any way to make this at file level? I’m looking at multiple files, with 10^6+ points each. Using the programmable filter might be a bit nose heavy at some point.


Well, you can of course write the vertex cells when you are generating your .vtu files.