# Merge partitions of vtkPartitionedDataSet?

**URL:** https://discourse.vtk.org/t/merge-partitions-of-vtkpartitioneddataset/12469
**Category:** Support
**Created:** [October 11, 2023, 5:58pm UTC](https://discourse.vtk.org/t/merge-partitions-of-vtkpartitioneddataset/12469 "2023-10-11T17:58:04Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![rexthor](https://discourse.vtk.org/user_avatar/discourse.vtk.org/rexthor/32/6481_2.png) [@rexthor](https://discourse.vtk.org/u/rexthor)
#### Post date: [October 11, 2023, 5:58pm UTC](https://discourse.vtk.org/t/merge-partitions-of-vtkpartitioneddataset/12469/1 "2023-10-11T17:58:04Z")

</div>

I have a dataset that is a vtkPartitionedDataSet composed of vtkStructuredGrid partitions. I can read the file in ParaView, and there is a “Merge Blocks” filter available in the GUI that seems to convert vtkPartitionedDataSet to vtkUnstructuredGrid …

I looked at vtkMultiBlockMergeFilter, but that wasn’t able to operate on vtkPartitionedDataSet … what filter is ParaView using to merge the partitions?

---

<div class="post-metadata">

### Author: ![rexthor](https://discourse.vtk.org/user_avatar/discourse.vtk.org/rexthor/32/6481_2.png) [@rexthor](https://discourse.vtk.org/u/rexthor)
#### Post date: [October 11, 2023, 6:07pm UTC](https://discourse.vtk.org/t/merge-partitions-of-vtkpartitioneddataset/12469/2 "2023-10-11T18:07:54Z")

</div>

Ok - looked at ParaView source. This is how I did it:

```python
af = vtkAppendDataSets()
af.MergePointsOn()
for ind in range(partitioned_data.GetNumberOfPartitions()):
    af.AddInputData(partitioned_data.GetPartition(ind))
af.Update()

ug = af.GetOutputDataObject(0)

```
