<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<p>Dear David,</p>
<p>Thank you for the fast reply! I am trying to use your tip, but
since I am very new to VTK it is not working out well for me.</p>
<p>Could you elaborate a bit, what would "anAlgorithm" be. A child
to vtkAlgorithm? The thing is none of the objects I create seem to
have the SetUpdateTimeStep() as a member. Browsing doxygen made me
think that it is a member of vtkStreamingDemandDrivenPipeline, is
that something I should have in the script?</p>
<p>Kind regards,</p>
<p>Timofey<br>
</p>
<br>
<div class="moz-cite-prefix">On 2016-11-02 18:40, David E DeMarle
wrote:<br>
</div>
<blockquote
cite="mid:CANjZAi8C5LPMA6o+2CiTXLPuajYgV0vg+jCwge+FxVoLZDom5g@mail.gmail.com"
type="cite">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<div dir="ltr">
<div>In vtk 6.3 it was:<br>
anAlgorithm->UpdateInformation<wbr>();</div>
anAlgorithm-><wbr>SetUpdateTimeStep(0.5);
<div>anAlgorithm->Update();<br>
</div>
<div>Try that.<br>
<br>
</div>
<div>In vtk 7.1 it is:<br>
</div>
<div>anAlgorithm->UpdateTimeSep(0.5);<br>
</div>
<div>Since Berk cleaned up the parts of the pipeline that caused
issues like you are seeing.<br>
<br>
</div>
<div><br>
</div>
</div>
<div class="gmail_extra"><br clear="all">
<div>
<div class="gmail_signature" data-smartmail="gmail_signature">David
E DeMarle<br>
Kitware, Inc.<br>
R&D Engineer<br>
21 Corporate Drive<br>
Clifton Park, NY 12065-8662<br>
Phone: 518-881-4909</div>
</div>
<br>
<div class="gmail_quote">On Wed, Nov 2, 2016 at 12:43 PM,
Timofey Mukha <span dir="ltr"><<a moz-do-not-send="true"
href="mailto:timofey.mukha@it.uu.se" target="_blank">timofey.mukha@it.uu.se</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">Hello!<br>
<br>
I am trying to write a python script for doing some stuff
with an OpenFOAM case. Everything works great, except that I
can't choose the time-value that I want the reader to get
the data for.<br>
<br>
I have found the SetTimeValue() function which is supposed
to do the job I think, but it doesn't -- the first availbale
time-value is always used. Here is how I use the reader:<br>
<br>
reader = vtk.vtkOpenFOAMReader()<br>
reader.SetFileName(path)<br>
reader.CreateCellToPointOff()<br>
reader.DisableAllPointArrays()<br>
reader.Update()<br>
print(vtk_to_numpy(reader.GetT<wbr>imeValues())) # Grab the
available timesteps<br>
reader.SetTimeValue(vtk_to_num<wbr>py(reader.GetTimeValues())[-1]<wbr>)
# Try to load the latest time<br>
reader.Update()<br>
<br>
I use the version provided by the Anaconda python disstro,
6.3.0 I believe.<br>
<br>
Thanks in advance,<br>
<br>
Timofey<br>
<br>
<br>
______________________________<wbr>_________________<br>
Powered by <a moz-do-not-send="true"
href="http://www.kitware.com" rel="noreferrer"
target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a
moz-do-not-send="true"
href="http://www.kitware.com/opensource/opensource.html"
rel="noreferrer" target="_blank">http://www.kitware.com/opensou<wbr>rce/opensource.html</a><br>
<br>
Please keep messages on-topic and check the VTK FAQ at: <a
moz-do-not-send="true"
href="http://www.vtk.org/Wiki/VTK_FAQ" rel="noreferrer"
target="_blank">http://www.vtk.org/Wiki/VTK_FA<wbr>Q</a><br>
<br>
Search the list archives at: <a moz-do-not-send="true"
href="http://markmail.org/search/?q=vtkusers"
rel="noreferrer" target="_blank">http://markmail.org/search/?q=<wbr>vtkusers</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a moz-do-not-send="true"
href="http://public.kitware.com/mailman/listinfo/vtkusers"
rel="noreferrer" target="_blank">http://public.kitware.com/mail<wbr>man/listinfo/vtkusers</a><br>
</blockquote>
</div>
<br>
</div>
</blockquote>
<br>
</body>
</html>