vtkRedistributeDataSetFilter on 9.2.0rc2 returns only one partition
vtkRedistributeDataSetFilter
in 9.2.0rc2 with SetPreservePartitionsInOutput(False)
only returns the first partition of the dataset as an UnstructuredGrid
:
>>> import pyvista
>>> import vtk
>>> from pyvista import examples
>>> dataset = examples.load_hexbeam()
>>> dataset
UnstructuredGrid (0x7fb3d3f96560)
N Cells: 40
N Points: 99
X Bounds: 0.000e+00, 1.000e+00
Y Bounds: 0.000e+00, 1.000e+00
Z Bounds: 0.000e+00, 5.000e+00
N Arrays: 3
>>> alg = vtk.vtkRedistributeDataSetFilter()
>>> alg.SetInputData(dataset)
>>> alg.SetNumberOfPartitions(2)
>>> alg.SetPreservePartitionsInOutput(False)
>>> alg.Update()
>>> output = pyvista.wrap(alg.GetOutput())
>>> output
UnstructuredGrid (0x7fb3d3f42260)
N Cells: 20
N Points: 66
X Bounds: 0.000e+00, 5.000e-01
Y Bounds: 0.000e+00, 1.000e+00
Z Bounds: 0.000e+00, 5.000e+00
N Arrays: 5
Whereas vtk==9.1.0
works as expected:
>>> output = pyvista.wrap(alg.GetOutput())
>>> output
UnstructuredGrid (0x7feaf9c8a940)
N Cells: 40
N Points: 132
X Bounds: 0.000e+00, 1.000e+00
Y Bounds: 0.000e+00, 1.000e+00
Z Bounds: 0.000e+00, 5.000e+00
N Arrays: 5