[vtkusers] .vtu file format

Berk Geveci berklist at nycap.rr.com
Wed Feb 19 14:38:32 EST 2003


On Wed, 2003-02-19 at 13:38, Scott A. Klasky wrote:
> 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.

You have to replace every "float" (type attribute of DataArray) with
Float32; see below. You also need a recent (cvs) version of ParaView.
The file format has changed since the last release of ParaView.

-Berk

<VTKFile type="UnstructuredGrid" version="0.1" byte_order="LittleEndian">
  <UnstructuredGrid>
    <Piece NumberOfPoints="6" NumberOfCells="1">
      <Points>
        <DataArray type = "Float32" 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="Float32" Name="stress" format="ascii">
          5000.000000 18750.000000 37500.000000 56250.000000 75000.000000 93750.000000 
        </DataArray>
      </PointData>
    </Piece>
  </UnstructuredGrid>
</VTKFile>




More information about the vtkusers mailing list