# Merge overlapping VTK files from mpirun

**URL:** https://discourse.paraview.org/t/merge-overlapping-vtk-files-from-mpirun/3560
**Category:** ParaView Support
**Tags:** vtk
**Created:** [February 13, 2020, 1:21am UTC](https://discourse.paraview.org/t/merge-overlapping-vtk-files-from-mpirun/3560 "2020-02-13T01:21:25Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![pavaninguva](https://discourse.paraview.org/user_avatar/discourse.paraview.org/pavaninguva/32/5849_2.png) [@pavaninguva](https://discourse.paraview.org/u/pavaninguva)
#### Post date: [February 13, 2020, 1:21am UTC](https://discourse.paraview.org/t/merge-overlapping-vtk-files-from-mpirun/3560/1 "2020-02-13T01:21:25Z")

</div>

Hi! I am running a simulation using Fipy which outputs the solution as .vtk files. When I do a mpirun, the solver splits the domain into subdomains which is then outputted as separate VTK files. I am trying to use Paraview to visualise the results, but I cant seem to overlay / append the results since the subdomains themselves are overlapping.

Attached are the files as a simple case: [0.01\_output.0.vtk](https://discourse.paraview.org/uploads/short-url/a615kjaa8JL66KOQUMPAPsT5GQi.vtk) (80.3 KB) [0.01\_output.1.vtk](https://discourse.paraview.org/uploads/short-url/kCJQraue7s1TPaWnn3DrrSPIx3U.vtk) (81.3 KB)

Thanks for your help!

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [February 13, 2020, 1:50am UTC](https://discourse.paraview.org/t/merge-overlapping-vtk-files-from-mpirun/3560/2 "2020-02-13T01:50:07Z")

</div>

Looks like these are Ghost cells.  
To be honest, it is more a failing of your simulation software, it should output a correct file.

In case, you can can just select the part you want to keep, add a ExtractSelection filter and merge the datasets together using Append filter.

---

<div class="post-metadata">

### Author: ![pavaninguva](https://discourse.paraview.org/user_avatar/discourse.paraview.org/pavaninguva/32/5849_2.png) [@pavaninguva](https://discourse.paraview.org/u/pavaninguva)
#### Post date: [February 13, 2020, 6:48am UTC](https://discourse.paraview.org/t/merge-overlapping-vtk-files-from-mpirun/3560/3 "2020-02-13T06:48:01Z")

</div>

Hi! Thanks for the super quick help. The simulation software is pretty great otherwise, so im just going to have to hack this ☹

So I did a clip of both VTK files and used the AppendDatasets filter to append the datasets which looked fine until I applied the CellDatatoPointData filter. When I did so, the merged line becomes obvious and the filter is not interpolating across the lines it seems:

 ![Mergedvtk](https://discourse.paraview.org/uploads/default/original/2X/3/3fdb602bc09445e9b80155fd6207024e37565acb.png)

Is there another way? I also tried exporting the AppendedDatasets1 as a whole new VTK and retrying the CellDatatoPointData filter and the same issue persisted. This is the merged vtk: [appended0.01.vtk](https://discourse.paraview.org/uploads/short-url/1newa8MmLqZCKMDy4RNP3FDq2C8.vtk) (162.7 KB)

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [February 13, 2020, 7:06am UTC](https://discourse.paraview.org/t/merge-overlapping-vtk-files-from-mpirun/3560/4 "2020-02-13T07:06:29Z")

</div>

Filters -\> CleanToGrid should do the trick.
