Hello,

I am new to Paraview and C++ coming from a mostly mathematics background. I am 
emailing to get resources or help on writing binary XML VTK files from C++.


I have finally succeeded in using the ASCII XML VTK format for a 2D rectilinear 
CFD application. My ".pvtr" file is shown below.


How can I write this file and my other XML VTK files in binary from C++? Do I 
need a special C++ library?


filename: PVTK0000.pvtr


contents:


<?xml version="1.0"?>
<VTKFile type="PRectilinearGrid" version="0.1" byte_order="LittleEndian">
<PRectilinearGrid WholeExtent="1 20 1 20 0 0" GhostLevel="1">
<PPointData Scalars="flow data">
<PDataArray type="Float32" Name="rho" format="ascii"/>
<PDataArray type="Float32" Name="u" format="ascii"/>
<PDataArray type="Float32" Name="v" format="ascii"/>
<PDataArray type="Float32" Name="uxN" format="ascii"/>
<PDataArray type="Float32" Name="vyN" format="ascii"/>
</PPointData>
<PCoordinates>
<PDataArray type="Float32" Name="x" format="ascii"/>
<PDataArray type="Float32" Name="y" format="ascii"/>
<PDataArray type="Float32" Name="z" format="ascii"/>
</PCoordinates>
<Piece Extent="0 21 0 21 0 0" Source="YY0000_0000.vtr"/>
</PRectilinearGrid>
</VTKFile>

Thank you,
Nicholas Stegmeier


_______________________________________________
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 ParaView Wiki at: 
http://paraview.org/Wiki/ParaView

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

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

Reply via email to