[Paraview] Field variable interpolation on different meshes

Andy Bauer andy.bauer at kitware.com
Tue Apr 21 12:50:51 EDT 2009


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.

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.

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.

On Tue, Apr 21, 2009 at 5:06 AM, Hugo Gagnon <hugo.gagnon2 at mail.mcgill.ca>wrote:

> Hi,
>
> In the spirit of estimating the error of a numerical scheme (using
> Richardson's extrapolation), I computed a cell-centered solution on two
> different 2D meshes of size h1 and h2, where h2 > 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)?
>
> Thanks!
>
> Hugo.
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the ParaView Wiki at:
> http://paraview.org/Wiki/ParaView
>
> Follow this link to subscribe/unsubscribe:
> http://www.paraview.org/mailman/listinfo/paraview
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.paraview.org/pipermail/paraview/attachments/20090421/b7bf7fbc/attachment.htm>


More information about the ParaView mailing list