[vtkusers] Choosing time for vtkOpenFOAMReader
timofey.mukha at it.uu.se
Thu Nov 3 07:21:56 EDT 2016
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.
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?
On 2016-11-02 18:40, David E DeMarle wrote:
> In vtk 6.3 it was:
> Try that.
> In vtk 7.1 it is:
> Since Berk cleaned up the parts of the pipeline that caused issues
> like you are seeing.
> David E DeMarle
> Kitware, Inc.
> R&D Engineer
> 21 Corporate Drive
> Clifton Park, NY 12065-8662
> Phone: 518-881-4909
> On Wed, Nov 2, 2016 at 12:43 PM, Timofey Mukha <timofey.mukha at it.uu.se
> <mailto:timofey.mukha at it.uu.se>> wrote:
> 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.
> 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:
> reader = vtk.vtkOpenFOAMReader()
> print(vtk_to_numpy(reader.GetTimeValues())) # Grab the available
> reader.SetTimeValue(vtk_to_numpy(reader.GetTimeValues())[-1]) #
> Try to load the latest time
> I use the version provided by the Anaconda python disstro, 6.3.0 I
> Thanks in advance,
> Powered by www.kitware.com <http://www.kitware.com>
> Visit other Kitware open-source projects at
> Please keep messages on-topic and check the VTK FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ <http://www.vtk.org/Wiki/VTK_FAQ>
> Search the list archives at:
> Follow this link to subscribe/unsubscribe:
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the vtkusers