Quantcast

writing time-dependent data

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

writing time-dependent data

Bill Greene
I have been trying to write time-dependent data to
an XML file using vtkXMLUnstructuredGridWriter.

I found an example,
http://www.vtk.org/Wiki/VTK/Examples/Cxx/Broken/IO/ExodusIIWriter,
that uses vtkTimeSourceExample to write time-dependent data to
an Exodus II file. Despite the word "Broken" in the URL, this appears
to work correctly. But when I modify it to use
vtkXMLUnstructuredGridWriter instead of vtkExodusIIWriter, only the
model data is written.

Can someone tell me if vtkXMLUnstructuredGridWriter is supposed
to handle time-dependent data, or if not,
how to write an XML file with time-dependent data?

I am using vtk 7.1.0.

Thanks,

Bill Greene
_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ

Search the list archives at: http://markmail.org/search/?q=vtkusers

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/vtkusers
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: writing time-dependent data

Rustem Khabetdinov
Hello,

I know it is late but this might help you. The way I do it using python:

import vtk
data_to_write = vtk.vtkUnstructuredGrid()
writer = vtk.vtkXMLUnstructuredGridWriter()
number_of_steps = 5
writer.SetNumberOfTimeSteps(number_of_steps)  
writer.SetInputData(data_to_write)
writer.SetFileName('path/to/file')
writer.Start()
for i in range(number_of_steps):
  data_to_write.ShallowCopy(some_input_data)
  writer.WriteNextTime(i)
writer.Stop()

Hope this helps anyone


2017-02-17 18:42 GMT+03:00 Bill Greene <[hidden email]>:
I have been trying to write time-dependent data to
an XML file using vtkXMLUnstructuredGridWriter.

I found an example,
http://www.vtk.org/Wiki/VTK/Examples/Cxx/Broken/IO/ExodusIIWriter,
that uses vtkTimeSourceExample to write time-dependent data to
an Exodus II file. Despite the word "Broken" in the URL, this appears
to work correctly. But when I modify it to use
vtkXMLUnstructuredGridWriter instead of vtkExodusIIWriter, only the
model data is written.

Can someone tell me if vtkXMLUnstructuredGridWriter is supposed
to handle time-dependent data, or if not,
how to write an XML file with time-dependent data?

I am using vtk 7.1.0.

Thanks,

Bill Greene
_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ

Search the list archives at: http://markmail.org/search/?q=vtkusers

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/vtkusers


_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ

Search the list archives at: http://markmail.org/search/?q=vtkusers

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/vtkusers
Loading...