Suppose I have two VTK files, both in structured grid format. The structured grids are the same (they have the same list of points, in the same order), and there is a field, call it "Phi", in each VTK file. I want to create a third VTK file, again with the same structured grid, and plot a field that is the difference between Phi in the first VTK file and Phi in the second VTK file.
I know how to do this manually; I can parse the raw text in the two VTK files, copy the data into arrays, subtract one array from the other, and then dump the data in the right format into a new file. Is there a better way to calculate this difference and export it to VTK? A solution in Python, or in visualization software like VisIt or Paraview would be preferable to using a compiled language like C++.
The purpose of calculating this difference is to compare different numerical methods for calculating the solution of a PDE; since I'm using the same software to generate the solutions, I can guarantee that all data but the field Phi will be the same in each file I generate.