<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
</head>
<body dir="ltr">
<div id="divtagdefaultwrapper" style="font-size: 12pt; color: rgb(0, 0, 0); font-family: Calibri,Helvetica,sans-serif,"EmojiFont","Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols;" dir="ltr">
<p style="margin-top:0;margin-bottom:0">Hi everyone.</p>
<p style="margin-top:0;margin-bottom:0"><br>
</p>
<p style="margin-top:0;margin-bottom:0">My goal is to have a vtm file witch n Blocks, each block containing some DataSet</p>
<p style="margin-top:0;margin-bottom:0"><br>
</p>
<p style="margin-top:0;margin-bottom:0">With this sample of code , running on <b>
MPI with 2 processes,</b></p>
<p style="margin-top:0;margin-bottom:0"><br>
</p>
<p style="margin-top:0;margin-bottom:0">         <span>vtkSmartPointer<vtkXMLPMultiBlockDataWriter> vtm =
<span>vtkXMLPMultiBlockDataWriter</span>::New()</span><br>
</p>
<p style="margin-top:0;margin-bottom:0"></p>
<div>         vtkSmartPointer<vtkMultiBlockDataSet> block= vtkMultiBlockDataSet::New();<br>
         block->SetNumberOfBlocks(4);<br>
         vtkSmartPointer<vtkMultiBlockDataSet> multi_block= vtkMultiBlockDataSet::New();<br>
         multi_block->SetNumberOfBlocks(Communicator::worldSize());<br>
         multi_block->SetBlock(Communicator::worldRank(),block);<br>
         <br>
 <br>
         std::string filename = m_name + ".vtm";<br>
         vtm->SetInputData(multi_block);<br>
         vtm->SetFileName(filename.c_str());<br>
         vtm->Write();<br>
<br>
I have this output<br>
<br>
<div><?xml version="1.0"?><br>
<VTKFile type="vtkMultiBlockDataSet" version="1.0" byte_order="LittleEndian" header_type="UInt32" compressor="vtkZLibDataCompressor"><br>
  <vtkMultiBlockDataSet><br>
    <Block index="0"><br>
      <DataSet index="0"/><br>
      <DataSet index="1"/><br>
      <DataSet index="2"/><br>
      <DataSet index="3"/><br>
    </Block><br>
    <DataSet index="1"/><br>
  </vtkMultiBlockDataSet><br>
</VTKFile></div>
<br>
I don' t understand why I have one Block with 4 DataSets and one DataSet alone.<br>
<br>
The result that I expect is :<br>
<br>
<div><?xml version="1.0"?><br>
<VTKFile type="vtkMultiBlockDataSet" version="1.0" byte_order="LittleEndian" header_type="UInt32" compressor="vtkZLibDataCompressor"><br>
  <vtkMultiBlockDataSet><br>
    <Block index="0"><br>
      <DataSet index="0"/><br>
      <DataSet index="1"/><br>
      <DataSet index="2"/><br>
      <DataSet index="3"/><br>
    </Block><br>
<div>    <Block index="1"><br>
      <DataSet index="0"/><br>
      <DataSet index="1"/><br>
      <DataSet index="2"/><br>
      <DataSet index="3"/><br>
    </Block></div>
  </vtkMultiBlockDataSet><br>
</VTKFile></div>
<br>
What am I doing wrong ? How can I achieve to have two blocks (corresponding of the number of MPI processes), each one containing several DataSets ?<br>
<br>
Thanks in advance,<br>
<br>
Antoine.<br>
</div>
<br>
<p></p>
</div>
</body>
</html>