<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=ISO-8859-1">
<META content="MSHTML 6.00.6000.17092" name=GENERATOR></HEAD>
<BODY>
<DIV><SPAN class=203071617-16062011><FONT face=Arial color=#0000ff
size=2>Another option is to write a programmable filter that will take the input
(from the integrate variables) and write it out using standard python
commands. You can then reference this in your script.</FONT></SPAN></DIV>
<DIV><SPAN class=203071617-16062011><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=203071617-16062011><FONT face=Arial color=#0000ff size=2>iv =
IntegrateVariables(Input=blah)</FONT></SPAN></DIV>
<DIV><SPAN class=203071617-16062011><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=203071617-16062011><FONT face=Arial color=#0000ff size=2>pf =
ProgrammableFilter(Input=pf)</FONT></SPAN></DIV>
<DIV><SPAN class=203071617-16062011><FONT face=Arial color=#0000ff
size=2>pf.Script = """</FONT></SPAN></DIV>
<DIV><SPAN class=203071617-16062011><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=203071617-16062011><FONT face=Arial color=#0000ff size=2>pdi =
self.GetInputDataObject(0,0)</FONT></SPAN></DIV>
<DIV><SPAN class=203071617-16062011><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=203071617-16062011><FONT face=Arial color=#0000ff
size=2>your_var = pdi.GetPointData().GetArray("your_var")</FONT></SPAN></DIV>
<DIV><SPAN class=203071617-16062011><FONT face=Arial color=#0000ff size=2>fout =
open("results.txt",'a')</FONT></SPAN></DIV>
<DIV><SPAN class=203071617-16062011><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=203071617-16062011><FONT face=Arial color=#0000ff size=2>for i
in xrange(len(your_var)):</FONT></SPAN></DIV>
<DIV><SPAN class=203071617-16062011><FONT face=Arial color=#0000ff
size=2> fout.write( "%s %s %s" % (your_var.GetTuple3(i)[0],
your_var.GetTuple3(i)[1], your_var.GetTuple3(i)[2]) )</FONT></SPAN></DIV>
<DIV><SPAN class=203071617-16062011><FONT face=Arial color=#0000ff
size=2>fout.close()</FONT></SPAN></DIV>
<DIV><SPAN class=203071617-16062011><FONT face=Arial color=#0000ff
size=2>"""</FONT></SPAN></DIV>
<DIV><FONT face=Arial color=#0000ff size=2></FONT> </DIV>
<DIV><SPAN class=203071617-16062011><FONT face=Arial color=#0000ff size=2>If you
have a number of slices stored in a vtkMultiBlockDataSet then you'll have to
iterate over each of them first.</FONT></SPAN></DIV>
<DIV><SPAN class=203071617-16062011><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=203071617-16062011><FONT face=Arial color=#0000ff
size=2>Ad</FONT></SPAN></DIV><!-- Converted from text/plain format -->
<P><FONT size=2>===================================<BR><BR>Adriano Gagliardi
MEng PhD<BR>Business Sector Leader<BR>Computational Aerodynamics<BR>Aircraft
Research Association Ltd.<BR>Manton Lane<BR>Bedford<BR><BR>Tel: 01234 32
4644<BR>E-mail: agagliardi@ara.co.uk<BR>Url: www.ara.co.uk </FONT></P>
<DIV> </DIV><BR>
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B> paraview-bounces@paraview.org
[mailto:paraview-bounces@paraview.org] <B>On Behalf Of </B>Andy
Bauer<BR><B>Sent:</B> 16 June 2011 18:10<BR><B>To:</B> Stephen
Wornom<BR><B>Cc:</B> paraview@paraview.org<BR><B>Subject:</B> Re: [Paraview] PV
3.10.1 using python to slice and integratevariable<BR></FONT><BR></DIV>
<DIV></DIV>You could interactively run through the scripts with pvpython and
then use dir() and help() to figure out how to write out the information
properly. You'll probably need to do something
like:<BR>SetActiveSource(<the filter that connects to your
writer>)<BR>writer = XMLPolyDataWriter() # most writers take off the vtk
part<BR>writer.FileName= "file.vtp"<BR>writer.UpdatePipeline()<BR><BR>Hope this
helps,<BR>Andy<BR><BR>
<DIV class=gmail_quote>On Thu, Jun 16, 2011 at 8:57 AM, Stephen Wornom <SPAN
dir=ltr><<A
href="mailto:stephen.wornom@inria.fr">stephen.wornom@inria.fr</A>></SPAN>
wrote:<BR>
<BLOCKQUOTE class=gmail_quote
style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">pat
marion wrote:<BR>
<BLOCKQUOTE class=gmail_quote
style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">Did
you try python trace? Tools menu --> Start Trace. Then load
your data and carry out steps 1, 2, and 3. Tools menu --> Stop
Trace.<BR><BR></BLOCKQUOTE><BR>Thanks Pat,<BR>Worked correctly (We saved the
.py script for reference)<BR>with the following exception.<BR>The integrate
variables opens a spread sheet with the different values.<BR>We then do save
data to save the spreadsheet.<BR>Stop trace<BR>*But* the trace does not
contain the save spread sheet commands. Therefore we do not see how to
generalize the trace.py (add a loop over theta 0 - 180).<BR>Almost there, what
do you suggest?<BR>Many thanks for your help.<BR>Stephen<BR>
<BLOCKQUOTE class=gmail_quote
style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">Pat<BR><BR>On
Wed, Jun 15, 2011 at 4:39 PM, Stephen Wornom <<A
href="mailto:stephen.wornom@inria.fr"
target=_blank>stephen.wornom@inria.fr</A> <mailto:<A
href="mailto:stephen.wornom@inria.fr"
target=_blank>stephen.wornom@inria.fr</A>>> wrote:<BR><BR>
We are using PV to analyze flow around a sphere.<BR><BR>
1- We extract the surface of the sphere from the mean flow
solution.<BR> 2- We make a slice in x (say at the center
x=0)<BR> 3- Then click integrate variables. Result: We get the
integrated<BR> values for the circle at x=0.<BR> 4-
We would like to create a python script do automate this for<BR>
say 60 slices.<BR><BR> Would someone share a python script
that we could adapt to do<BR> this? (We have zero experience
with python).<BR> We would be greatly appreciative!<BR>
Stephen<BR><BR> -- <A
href="mailto:stephen.wornom@inria.fr"
target=_blank>stephen.wornom@inria.fr</A> <mailto:<A
href="mailto:stephen.wornom@inria.fr"
target=_blank>stephen.wornom@inria.fr</A>><BR> 2004 route des
lucioles - BP93<BR> Sophia Antipolis<BR> 06902
CEDEX<BR>
Tel: 04 92 38 50 54<BR> Fax: 04 97 15 53
51<BR><BR><BR>
_______________________________________________<BR>
Powered by <A href="http://www.kitware.com"
target=_blank>www.kitware.com</A> <<A href="http://www.kitware.com"
target=_blank>http://www.kitware.com</A>><BR><BR> Visit other
Kitware open-source projects at<BR> <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:<BR> <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><BR><BR></BLOCKQUOTE><BR><BR>--
<BR><A href="mailto:stephen.wornom@inria.fr"
target=_blank>stephen.wornom@inria.fr</A><BR>2004 route des lucioles -
BP93<BR>Sophia Antipolis<BR>06902 CEDEX<BR>
<BR>Tel: 04 92 38 50 54<BR>Fax: 04 97 15 53
51<BR><BR><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><BR></BLOCKQUOTE></DIV><BR><p>**********************************************************************<br />This email contains information that is private and confidential and is intended only for the addressee.<br />If you are not the intended recipient please delete it and notify us immediately by e-mailing the sender.<br />Note: All email sent to or from this address may be accessed by someone other than the recipient, for<br />system management and security reasons.<br />Aircraft Research Association Ltd. Registered in England, Registration No 503668 Registered Office:<br />Manton Lane, Bedford MK41 7PF England VAT No GB 196351245</p><p>**********************************************************************</p>
</BODY></HTML>