[vtkusers] serial to parallel XML vktUnstructuredGrid converter via filenames?

Berk Geveci berk.geveci at gmail.com
Mon Jul 11 11:21:53 EDT 2005


> I agree.  However, I sometimes get frustrated wtih VTK's XML support.
> It almost seems like they added the xml support as an afterthought and
> rushed to get it done.

We actually spent a lot of time designing the XML file format.
However, it had a lot of requirements and not all of them were met to
everyone's satisfaction. Furthermore, the readers and the format are
still evolving (which makes me glad we chose XML as the base, it is
easier to extend without breaking compatability). Keep in mind that it
has a lot of new features not present in the previous file formats
(support for distributed data being the most important) and it is not
always easy to get things perfect the first time.

> anyway, here's my current workaround:
> 1.  load a piece of data into memory
> 2.  use vtkXMLPUnstructuredGridWriter.  This saves the "pvtu" file and
> the first vtu file in a series (for some reason the first vtu file has
> a truncated filename... can't figure out how to control that)
> 3.  Delete & allocate new vtk objects
> 4.  Step through and load every other piece of data, saving each one
> with vtkXMLUnstructuredGridWriter as a vtu file with the appropriate
> filename

The pvtu format was not designed to handle streaming (which is
essentially what you are doing) but rather to write data in parallel.
This is why the writer does not support this. However,
1. It is not hard to extend the writer to do this (actually, it is
quite easy). If you put a feature request and assign it to me, maybe I
can get to it in the future (not near)
2. The pvtu format does not contain data and is simple xml. Therefore,
it is very very easy to write with a small program or script.
3. We actually have a writer that does this in ParaView. We use it to
write animations and time dependent data. It has not been moved to VTK
yet.

-Berk



More information about the vtkusers mailing list