<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 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 href="http://www.kitware.com" rel="noreferrer" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a 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 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 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 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>