[Paraview] unstructured grid, programmable filters: extract, process array data

Andy Bauer andy.bauer at kitware.com
Tue Feb 15 12:56:51 EST 2011


This sounds like a job for the calculator filter.  "coordsX^2+coordsY^2" for
your first example (or "psi__X^2+psi__Y^2" for the psi variables) and
"atan(coordsX/coordsY)" for the second example.

It can operate on point or cell data (set in the Attribute Model drop-down
menu), replace invalid numbers with a specified value, and you can name the
resulting array as well.

Andy

2011/2/15 Nico Schlömer <nico.schloemer at gmail.com>

> Hi all,
>
> I've been looking at
> <http://www.paraview.org/Wiki/Python_Programmable_Filter> to create a
> programmable filter, but I'm a bit lost as to whether or not I need
> GetPolyData, CopyAttributes,...
>
> Essentially, I have an unstructured grid in an ExodusII file (like the
> attached file actually) with point data "psi" in it that has two
> components (X,Y). I can plot psi:X, psi:Y, and psi:magnitude alright
> with the default GUI options, but what I would really like to have
> plotted is X^2+Y^2 (no sqrt()) and something along the lines of
> arctan(Y/X).
>
> Is there simple code somewhere some that takes array data off of an
> unstructured grid, does something with it and returns the extra array
> from the filter?
>
> Cheers,
> Nico
>
> _______________________________________________
> 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/20110215/3d5a4373/attachment.htm>


More information about the ParaView mailing list