[vtkusers] .vtu file format

Scott A. Klasky sklasky at pppl.gov
Wed Feb 19 13:38:18 EST 2003


Hi,
I am attempting to write out a .vtu file, and I can't seem to get ParaView
to read in the file. I'm assuming I'm doing something wrong, so please tell
me where the problem is.
 
The vtk file (which works) and the .vtu file (in ascii- which doesn't work)
are given below.  Please tell me where the mistake is.
 
I want to eventually write binary .pvtu files, but hopefully this will be
easy to write assuming I can write an ascii .vtu file first.
 
 
Regards,
 
 
Scott
 
 
 
# vtk DataFile Version 2.0
 
ASCII
DATASET UNSTRUCTURED_GRID
 
POINTS 6 float
0.000   2.000   0.000
1.000   2.000   2.000
2.000   2.000   0.000
0.000   0.000   0.000
1.000   0.000   2.000
2.000   0.000   0.000
 
CELLS 1 7
6 0 1 2 3 4 5 
 
CELL_TYPES 1 
13
 
POINT_DATA 6
 
FIELD FieldData 1
 
stress 1 6 float
4999.9999 
18749.9999 
37500.0000 
56250.0000 
74999.9999 
93750.0001 

The .vtu file looks like
 
<VTKFile type="UnstructuredGrid" version="0.1" byte_order="LittleEndian">
  <UnstructuredGrid>
    <Piece NumberOfPoints="6" NumberOfCells="1">
      <Points>
        <DataArray type = "float" NumberOfComponents="3" format="ascii">
          0.000000 2.000000 0.000000 1.000000 2.000000 2.000000 2.000000
2.000000 0.000000 0.000000 0.000000 0.000000 1.000000 0.000000 2.000000
2.000000 0.000000 0.000000 
        </DataArray>
      </Points>
      <Cells>
        <DataArray type="Int32" Name="connectivity" format="ascii">
          0 1 2 3 4 5 
        </DataArray>
        <DataArray type="Int32" Name="offsets" format="ascii">
          6 
        </DataArray>
        <DataArray type="UInt8" Name="types" format="ascii">
          13 
        </DataArray>
      </Cells>
      <PointData>
        <DataArray type="float" Name="stress" format="ascii">
          5000.000000 18750.000000 37500.000000 56250.000000 75000.000000
93750.000000 
        </DataArray>
      </PointData>
    </Piece>
  </UnstructuredGrid>
</VTKFile>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20030219/d4483382/attachment.htm>


More information about the vtkusers mailing list