Are your grids nested?  By this I mean is there a node in h1 for every node in h2?  That should make things a bit more straightforward.  <br><br>A simple way then, at least for the linear nodal shape functions usually used in ParaView, would be just to use a vtkPointLocator for nodes/points in h1 if the grids are nested or a vtkCellLocator which will give you the cell and the parametric location in the cell in h1.  The points you are looking for are the point locations of the nodes in h2 and the result of the grid search can be used to get the field value according to h1 at that point.  <br>
<br>As for subtracting one field from another it is straightforward once you have both fields defined over the same grid.  You should consider the type of norm to use for the subtraction (e.g. L2 norm seems like a decent choice).  For more accurate results though you may want to actually do the subtraction over the integration points of the cells and this is where nested grids make things much easier.<br>
<br><div class="gmail_quote">On Tue, Apr 21, 2009 at 5:06 AM, Hugo Gagnon <span dir="ltr">&lt;<a href="mailto:hugo.gagnon2@mail.mcgill.ca">hugo.gagnon2@mail.mcgill.ca</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi,<br>
<br>
In the spirit of estimating the error of a numerical scheme (using Richardson&#39;s extrapolation), I computed a cell-centered solution on two different 2D meshes of size h1 and h2, where h2 &gt; h1. Now my question is: how can I interpolate the solution (say density) A1(h1) on the finer mesh h2 so to obtain A1(h2)? Then how would I subtract both fields likewise: A2(h2) - A1(h2)?<br>

<br>
Thanks!<br>
<br>
Hugo.<br>
_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the ParaView Wiki at: <a href="http://paraview.org/Wiki/ParaView" target="_blank">http://paraview.org/Wiki/ParaView</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.paraview.org/mailman/listinfo/paraview" target="_blank">http://www.paraview.org/mailman/listinfo/paraview</a><br>
</blockquote></div><br>