[Paraview] Getting the coordinates of the point with max temperature

David E DeMarle dave.demarle at kitware.com
Wed Sep 7 11:40:51 EDT 2011


The arrays themselves may be extremely large, thus they live on the
server, not the client and you can't get them directly as you are
trying to do.
You can however use servermanager.Fetch to bring them over, but you
should only do so once you have filtered them down in size a bit.
Try using the threshold filter, picking out only those cells/points
near the maximum, then fetching that.

David E DeMarle
Kitware, Inc.
R&D Engineer
21 Corporate Drive
Clifton Park, NY 12065-8662
Phone: 518-881-4909



On Wed, Sep 7, 2011 at 9:57 AM, Tibi Chelcea <tchelcea at transim.com> wrote:
> Hi,
>
>
>
> I’m extremely new to Paraview scripting and Python programming, so the
> question that I’m asking might have a totally obvious answer, but I can’t
> figure it out. I need to write a script to analyze the results of a
> transient analysis simulation. For that, the script needs to read the last
> .vtu file, figure out the coordinates (or index) of the point with the
> largest temperature, and then pick the temperatures at that point from all
> the other simulation steps and then do some computations based on those
> values.
>
>
>
> I got stuck at figuring out the coordinates of the point with the max
> temperature. This is what I got so far:
>
>
>
> reader = sources.XMLUnstructuredGridReader(FileName =
> 'C:\\mypath\\output0020.vtu')
>
> reader.UpdatePipeline()
>
> info_base = reader.GetDataInformation().DataInformation
>
> pointArray = info_base.GetPointArrayInformation()
>
>
>
> I don’t know how to get from pointArray to a list of points (I assume that
> the info in pointArray is the list of coordinates). Then, I can go through
> the temperature array obtained with
> info_base.GetPointDataInformation().GetArrayInformation(..) and get the max
> temperature and match it with the coordinates.  But, I’m lost at this step
> on how to get from the reader to the actual array of coordinates and
> temperature values.
>
>
>
> I’ve seen posts with some calls to GetPoints, but GetPoints is not a member
> of pointArray (or any other of the classes used above, for that matter).
>
>
>
> Thanks,
>
> Tibi
>
>
>
> _______________________________________________
> 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
>
>


More information about the ParaView mailing list