[Paraview] XML UnstructuredGrid With Multiple Parts

RAVINDRANATH LANKA rlanka at hotmail.com
Tue Nov 9 11:53:41 EST 2004


The sample *.pvd file that I created looks like this.

-----------
<?xml version="1.0"?>
<VTKFile type="Collection" version="0.1" byte_order="LittleEndian" 
compressor="vtkZLibDataCompressor">
  <Collection>
    <DataSet part="0" file="channel/channel_0.vtu"/>
    <DataSet part="1" file="channel/channel_1.vtu"/>
    <DataSet part="2" file="channel/channel_2.vtu"/>
    <DataSet part="3" file="channel/channel_3.vtu"/>
    <DataSet part="4" file="channel/channel_4.vtu"/>
    <DataSet part="5" file="channel/channel_5.vtu"/>
    <DataSet part="6" file="channel/channel_6.vtu"/>
  </Collection>
</VTKFile>
-----------
Each of the vtu files is a subset of a large mesh (say about 5 million 
nodes/points).  Ideally, I would like each of the parts to refer to the same 
"Points" set.  That way, I don't have to do any localized inversed mapping 
for the connectivity information.
The part name I was referring to is the part names list that come out in 
paraview when you do "extract parts" (vtkEnsightReader does this 
programatically, i think). I would rather have something like,
   <DataSet part="0" Name ="part0" file = "channel/channel_0.vtu"/>

Ravi



&gt;From: Brad King &lt;brad.king at kitware.com&gt;
&gt;To: RAVINDRANATH LANKA &lt;rlanka at hotmail.com&gt;
&gt;CC: paraview at paraview.org
&gt;Subject: Re: [Paraview] XML UnstructuredGrid With Multiple Parts
&gt;Date: Tue, 09 Nov 2004 07:10:43 -0500
&gt;
&gt;RAVINDRANATH LANKA wrote:
&gt;&gt;I want to write Unstructured Grid/Field data in XML format with
&gt;&gt;multiple parts.
&gt;
&gt;Use vtkXMLPUnstructuredGridWriter (note the &quot;P&quot; stands for
&gt;partitioned) to create a sample file.  It can be used to refer to
&gt;the other parts. The restriction is that all parts have to have the
&gt;same arrays because the format is meant for multiple piece
&gt;processing of the same data set.
&gt;
&gt;Alternatively save a data set from ParaView using the &quot;pvd&quot; 
format.
&gt;This format is a collection that can be used to reference arbitrary
&gt;other files, but it cannot store any of its own data in the file.
&gt;
&gt;&gt;I would also like to use the base64 encoding with the Appended
&gt;&gt;element tag containing all the data. I have a few questions with
&gt;&gt;regards to this.
&gt;&gt;
&gt;&gt;i. Does paraview read the part names from the part tags.
&gt;
&gt;To what &quot;Part&quot; tag do you refer?  I'm not aware of any 
ParaView or
&gt;VTK format that uses &quot;Part&quot; as an element name.
&gt;
&gt;&gt;ii. Is there any XML schema that I can refer to understand the
&gt;&gt;usage of appended data section. (file_format.pdf doesn't explain it
&gt;&gt;all)
&gt;
&gt;Unfortunately not.  The layout of the section is implemented in
&gt;ParaView/VTK/IO/vtkXMLWriter.cxx and the corresponding subclasses.
&gt;It is somewhat complicated to allow random access despite base64
&gt;encoding and optional compression with zlib.
&gt;
&gt;&gt;iii. Further, Can we have an appended section that is a child of
&gt;&gt;collection object that each of the parts could refer to.
&gt;
&gt;No.  That is why it is called the &quot;Appended&quot; data section.  
Its
&gt;whole purpose is to be at the end so that the file can be read by
&gt;parsing the XML in the beginning and then using random access seeks
&gt;to get to the data.  You can however use the inline binary mode
&gt;which requires base64 encoding.  In this mode the data for each
&gt;&lt;DataArray&gt; element are inline inside the element.
&gt;
&gt;-Brad
<html><DIV></DIV>
<P>&nbsp;</P>
<P>&nbsp;</P></html>

_________________________________________________________________
Screensavers unlimited! Funny, serious, religious. 
http://www.msn.co.in/Cinema/screensaver/ Take your pick!



More information about the ParaView mailing list