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

Tibi Chelcea tchelcea at transim.com
Wed Sep 7 09:57:15 EDT 2011


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

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.paraview.org/pipermail/paraview/attachments/20110907/cca98ebd/attachment.htm>


More information about the ParaView mailing list