Is vtkUnstructuredGrid part of vtkDataSet

I have a clipped data set called vtk_data. It is a vtkUnstructuredGrid type

print(vtk_data.GetDataInformation(0).GetDataClassName())
>> vtkUnstructuredGrid

When I check if it is ‘vtkDataSet’ it returns 0

vtk_data.GetDataInformation(0).IsA("vtkDataSet")
>> 0

This is because you’re not working directly with the dataset but the client’s representation of the dataset. I’d bet that if you do vtk_data.GetDataInformation(0).IsA("vtkUnstructuredGrid") that you’d get the same result since the class that you’re working on isn’t actually the dataset itself but the client’s representation of what is on the server.

You are right. vtk_data.GetDataInformation(0).IsA("vtkUnstructuredGrid") does produce 0 as well. The reason why I asked was because I have the following script:

print(‘vtk_data’)
print(vtk_data.GetDataInformation().GetNumberOfPoints())

d3Filter = D3(Input=vtk_data)
d3Filter .UpdatePipeline()
print(‘d3Filter.GetDataInformation().GetNumberOfPoints()’)
print(d3Filter.GetDad3FiltertaInformation().GetNumberOfPoints()

fetch = servermanager.Fetch( d3Filter )
print('fetch.GetNumberOfPoints()

Output:

vtk_data
1203402
d3Filter.GetDataInformation().GetNumberOfPoints()
1305894
fetch.GetNumberOfPoints()
166927

It looks like the fetch function only fetch data from one rank. By looking at the fetch function source code here https://kitware.github.io/paraview-docs/latest/python/_modules/paraview/servermanager.html. I suspected the object I passed failed all the follow if statement check, and haven’t had a reduce operation.

    if cdinfo.GetDataIsComposite():
       paraview.print_debug_info("use composite data append")
       reducer.PostGatherHelperName = "vtkMultiBlockDataGroupFilter"

    elif input.GetDataInformation(idx).GetDataClassName() == "vtkPolyData":
       paraview.print_debug_info("use append poly data filter")
       reducer.PostGatherHelperName = "vtkAppendPolyData"

   elif input.GetDataInformation(idx).GetDataClassName() == "vtkRectilinearGrid":
     paraview.print_debug_info("use append rectilinear grid filter")
     reducer.PostGatherHelperName = "vtkAppendRectilinearGrid"

   elif input.GetDataInformation(idx).IsA("vtkDataSet"):
       paraview.print_debug_info("use unstructured append filter")
       reducer.PostGatherHelperName = "vtkAppendFilter"

Would that be because I am not passing the actual data?