[vtkusers] non ascii pvtu output

Thomas Geenen geenen at gmail.com
Fri Sep 7 06:44:02 EDT 2007


i am trying to write a non ascii vtu file in parallel
i construct a vtkUnstructuredGrid pass it to the vtkXMLPUnstructuredGridWriter
pwriter->SetInput(ug);
pwriter->SetFileName( filename );
  if (*myid == 0)
  {
    pwriter->SetNumberOfPieces(*NumberOfPieces);
    pwriter->Write();
  }
  else
  {
    pwriter->SetNumberOfPieces(1);
    pwriter->SetStartPiece(*myid);
    pwriter->SetEndPiece(*myid);
    pwriter->Write();
  }
in ascii mode this works fine and i get a pvtu file containing
<?xml version="1.0"?>
<VTKFile type="PUnstructuredGrid" version="0.1"
byte_order="LittleEndian" compressor="vtkZLibDataCompressor">
  <PUnstructuredGrid GhostLevel="0">
    <PPointData Scalars="Scalars_">
      <PDataArray type="Float32" Name="Scalars_"/>
    </PPointData>
    <PPoints>
      <PDataArray type="Float32" NumberOfComponents="3"/>
    </PPoints>
    <Piece Source="test_xml_0.vtu"/>
    <Piece Source="test_xml_1.vtu"/>
  </PUnstructuredGrid>
</VTKFile>
and two vtu files.
however when i remove pwriter->SetDataModeToAscii(); i get an error message
vtkOffsetsManagerArray.h:140: OffsetsManagerGroup&
OffsetsManagerArray::GetPiece(unsigned int): Assertion `index <
this->Internals.size()' failed.
forrtl: error (76): IOT trap signal

cheers
Thomas



More information about the vtkusers mailing list