<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none"><!--P{margin-top:0;margin-bottom:0;} p
{margin-top:0;
margin-bottom:0}
@font-face
{font-family:"Cambria Math"}
@font-face
{font-family:Calibri}
@font-face
{font-family:Tahoma}
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri","sans-serif"}
a:link, span.MsoHyperlink
{color:blue;
text-decoration:underline}
a:visited, span.MsoHyperlinkFollowed
{color:purple;
text-decoration:underline}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
{margin:0cm;
margin-bottom:.0001pt;
font-size:8.0pt;
font-family:"Tahoma","sans-serif"}
span.E-postmall17
{font-family:"Calibri","sans-serif";
color:windowtext}
span.BallongtextChar
{font-family:"Tahoma","sans-serif"}
.MsoChpDefault
{font-family:"Calibri","sans-serif"}
@page WordSection1
{margin:72.0pt 72.0pt 72.0pt 72.0pt}--></style>
</head>
<body dir="ltr" style="font-size:12pt;color:#000000;background-color:#FFFFFF;font-family:Calibri,Arial,Helvetica,sans-serif;">
<p><font size="2">Hi again Jean, </font></p>
<p><br>
<font size="2"></font></p>
<p><font size="2">sorry for the spamming. Just an additional question to what we discussed below:</font></p>
<p><br>
<font size="2"></font></p>
<p><font size="2">Working a bit with what you gave me have led to some more problems/questions:</font></p>
<p><br>
<font size="2"></font></p>
<p><font size="2">If I try to adapt your script (simply changing to a Slice or Threshold I use, and setting [\'PRES\'] to, in my case, Velocity, I end up in a endless loop where the program gets stuck in the first time step. However, I can't seem to understand
why that is. I can see that data is loaded correctly into a vtkArray (if I simply run print(data)) but anyhow doesn't continue beyond the first loop.
</font></p>
<p><br>
<font size="2"></font></p>
<p><font size="2">Also, I would like to visualize the resulting average value on the same geometry that I loaded. Exiting from the python shell I can't though find my output values. Does anyone know how to give back calculated values to your model such that
you can visualize it further in paraview? </font></p>
<p><br>
<font size="2"></font></p>
<p><font size="2">FYI a few time steps of my model can be downloaded from here </font>
</p>
<p><font size="2"><a href="https://app.box.com/s/u33085me6hh5tuzzb0kbjbpp9i8u9kdx">https://app.box.com/s/u33085me6hh5tuzzb0kbjbpp9i8u9kdx</a> in case anyone is interested.
<br>
</font></p>
<p><br>
<font size="2"></font></p>
<p><font size="2">Again thanks for all the help,</font></p>
<p><br>
<font size="2"></font></p>
<p><font size="2">/David<br>
</font></p>
<p><font size="2"><br>
</font></p>
<div id="Signature">
<div style="font-family:Tahoma; font-size:13px"><span lang="sv"></span></div>
</div>
<div style="font-size:12pt; color:#000000; background-color:#FFFFFF; font-family:Calibri,Arial,Helvetica,sans-serif" dir="ltr">
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="divRplyFwdMsg" dir="ltr"><font style="font-size:11pt" color="#000000" face="Calibri, sans-serif"><b>Från:</b> ParaView <paraview-bounces@paraview.org> för David Larsson <david.larsson@sth.kth.se><br>
<b>Skickat:</b> den 19 februari 2016 17:25<br>
<b>Till:</b> Favre Jean; paraview@paraview.org<br>
<b>Ämne:</b> Re: [Paraview] Cut plane average velocity over time</font>
<div> </div>
</div>
<div>
<p><font size="2">Dear Jean, </font></p>
<p><br>
<font size="2"></font></p>
<p><font size="2">thanks for the helpful advice! </font></p>
<p><br>
<font size="2"></font></p>
<p><font size="2">However one question: aren't you right now creating a time average in for each point on a plane (or given input source)? What I was looking for was finding out the average value over a plane, and seeing how this changes over time. Can this
be done in a similar fashion? Being new to paraview/python I'm though not really sure how...
</font></p>
<p><br>
<font size="2"></font></p>
<p><font size="2">Another question is regarding the output: How can I access the annoted outvalue (assigned in<font size="2"> 'output.PointData.append(self.temp_data/self.tlen,'myOutputValueName')</font>. Again, now it is in point data, but assuming I can get
a single scalar value of the average value over a plane, how could I save this (for each time step) such that I can plot or evaluate it later on?
</font></p>
<p><br>
<font size="2"></font></p>
<p><font size="2">Again, thanks for your time and help.</font></p>
<p><br>
<font size="2"></font></p>
<p><font size="2">/David <br>
</font></p>
<p><br>
</p>
<div id="Signature">
<div style="font-family:Tahoma; font-size:13px"><span lang="sv"></span></div>
</div>
<div style="color:rgb(33,33,33)">
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="divRplyFwdMsg" dir="ltr"><font style="font-size:11pt" color="#000000" face="Calibri, sans-serif"><b>Från:</b> Favre Jean <jfavre@cscs.ch><br>
<b>Skickat:</b> den 16 februari 2016 11:11<br>
<b>Till:</b> David Larsson; paraview@paraview.org<br>
<b>Ämne:</b> RE: Cut plane average velocity over time</font>
<div> </div>
</div>
<div>
<div style="direction:ltr; font-family:Tahoma; color:#000000; font-size:10pt">>> <span lang="EN-US">
I would like to get an average over an entire cut plane (over time). </span>
<div style="font-family:Times New Roman; color:#000000; font-size:16px">
<div>
<div class="WordSection1">
<p class="MsoNormal"><span lang="EN-US"> </span></p>
<span style="font-size:10.0pt; font-family:"Tahoma","sans-serif"; color:black" lang="EN-US">David</span>
<p class="MsoNormal"><br>
<span lang="EN-US"></span></p>
<p class="MsoNormal"><span lang="EN-US">This sounds like a perfect case for a Python Programmable Filter, looping over timesteps, accumulating data, doing the average, and setting it as a new field. Here is a script I have tested on a single block of data with
multiple timesteps.</span></p>
<p class="MsoNormal"><br>
<span lang="EN-US"></span></p>
<p class="MsoNormal"><span lang="EN-US">There is an init phase, to get the number of timesteps, their values (from upstream), and the first dataset at the 0-th timestep.</span></p>
<p class="MsoNormal"><span lang="EN-US">There is an accumulate phase, where the filter pulls all timesteps, adding to the already existing numpy array.</span></p>
<p class="MsoNormal"><span lang="EN-US">There is a finish phase, where we do the average and assign it to a new field.</span></p>
<p class="MsoNormal"><br>
<span lang="EN-US"></span></p>
<p class="MsoNormal"><span lang="EN-US">I am doing it for Pressure, you'll have to adapt it to your fieldnames and block structures.</span><br>
</p>
<div><br>
<div class="BodyFragment"><font size="2"><span style="font-size:10pt">
<div class="PlainText">-----------------<br>
Jean M. Favre<br>
Swiss National Supercomputing Center<br>
CH-6900 Lugano<br>
Switzerland</div>
</span></font></div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>