<div dir="ltr"><div><div><div>Hey Ken, <br><br></div>I am sorry that I am asking you a lot of stupid questions. But I am stuck here. I followed what you said, But I don't see the piece number getting updated. And also when would that stop being updated...etc. Here is my code <br><br><span style="color:rgb(0,0,255)">int pvESSI::RequestInformation( vtkInformation *request, vtkInformationVector **vtkNotUsed(inVec), vtkInformationVector* outVec){<br><br>    this->Initialize();<br><br>    vtkInformation* Node_Mesh = outVec->GetInformationObject(0);<br><br>    double Time_range[2]={Time[0],Time[Number_Of_Time_Steps-1]};<br><br>    Node_Mesh->Set(vtkStreamingDemandDrivenPipeline::TIME_STEPS(),Time, this->Number_Of_Time_Steps);<br>    Node_Mesh->Set(vtkStreamingDemandDrivenPipeline::TIME_RANGE(),Time_range,2);<br><br>    Node_Mesh->Set(vtkStreamingDemandDrivenPipeline::WHOLE_EXTENT(),EXTENT,6);<br><br>    int num_of_piec = 10;<br>    Node_Mesh->Set(CAN_HANDLE_PIECE_REQUEST(), 1);<br><br>    return 1;<br>}</span><br><br><span style="color:rgb(0,0,255)">int pvESSI::RequestData(vtkInformation *vtkNotUsed(request),vtkInformationVector **vtkNotUsed(inputVector),    vtkInformationVector *outputVector){<br><br>     vtkInformation *Node_Mesh = outputVector->GetInformationObject(0);<br>    // outInfo->Print(std::cout);<br><br>    piece_no = Node_Mesh->Get(vtkStreamingDemandDrivenPipeline::UPDATE_PIECE_NUMBER());<br>    num_of_pieces = Node_Mesh->Get(vtkStreamingDemandDrivenPipeline::UPDATE_NUMBER_OF_PIECES());<br>    cout << "Piece_No " << piece_no << endl;<br>    cout << "Number_of_Pieces " << piece_no << endl;<br><br>     Step_Initializer(</span><span style="color:rgb(0,0,255)"><span style="color:rgb(0,0,255)">Piece_No</span>);     // makes the file and variables ready for that piece<br><br>      this->Node_Mesh_Current_Time = Time_Map.find( Node_Mesh->Get(vtkStreamingDemandDrivenPipeline::UPDATE_TIME_STEP()))->second;<br><br>    if (!Whether_Node_Mesh_Build){<br>        this->Get_Node_Mesh(UGrid_Node_Mesh);<br>        UGrid_Current_Node_Mesh->ShallowCopy(UGrid_Node_Mesh);<br>    } <br><br>    Build_Node_Attributes(UGrid_Current_Node_Mesh, this->Node_Mesh_Current_Time );<br>    Build_Stress_Field_At_Nodes(UGrid_Current_Node_Mesh, this->Node_Mesh_Current_Time);<br>    <br>    // get the ouptut pointer to paraview <br>    vtkUnstructuredGrid *Output_Node_Mesh = vtkUnstructuredGrid::SafeDownCast(Node_Mesh->Get(vtkDataObject::DATA_OBJECT()));<br><br>    Output_Node_Mesh->ShallowCopy(UGrid_Current_Node_Mesh);<br>    return 1;<br>}<br><br></span></div><span style="color:rgb(0,0,255)"><font color="#000000">When I run this code, The <i><b>Piece_no</b></i> and <b><i>Number_of_Pieces</i></b> both remain 0.<br><br><br></font></span></div><span style="color:rgb(0,0,255)"><font color="#000000">Sumeet<br></font></span></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Aug 15, 2016 at 3:58 PM, Moreland, Kenneth <span dir="ltr"><<a href="mailto:kmorel@sandia.gov" target="_blank">kmorel@sandia.gov</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">





<div link="blue" vlink="purple" lang="EN-US">
<div>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">During the RequestData pass of the pipeline, you should be able to get the keys vtkStreamingDemandDrivenPipeli<wbr>ne::UPDATE_PIECE_NUMBER() and vtkStreamingDemandDrivenPipeli<wbr>ne::UPDATE_NUMBER_OF_PIECES()
 from the output information object that comes from downstream. This will tell you how many pieces the pipeline expects and which piece is expected to be read.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">Generally the number of pieces requested will not match exactly the number of files that you have. This means you will have to adjust by either reading more than
 1 file at a time or sometimes reading nothing and returning an empty object.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">-Ken<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">From:</span></b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif"> sumeet kumar [mailto:<a href="mailto:sumeet.kumar507@gmail.com" target="_blank">sumeet.kumar507@gmail.<wbr>com</a>]
<br>
<b>Sent:</b> Monday, August 15, 2016 3:52 PM<br>
<b>To:</b> Moreland, Kenneth <<a href="mailto:kmorel@sandia.gov" target="_blank">kmorel@sandia.gov</a>><br>
<b>Cc:</b> ParaView Developers <<a href="mailto:paraview-developers@paraview.org" target="_blank">paraview-developers@paraview.<wbr>org</a>><br>
<b>Subject:</b> [EXTERNAL] Re: [Paraview-developers] Reading multiple files in parallel<u></u><u></u></span></p><div><div class="h5">
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<div>
<div>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt">Thanks Kenneth, for you help.<u></u><u></u></p>
</div>
<p class="MsoNormal" style="margin-bottom:12.0pt">I get the <span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">
vtkAlgorithm::CAN_HANDLE_<wbr>PIECE_REQUEST(), set 1 part. </span><u></u><u></u></p>
</div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">But, what to do next.
</span><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"><br>
<br>
How can i get the piece no, so that i can update the data for it.<br>
</span><br>
<span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">vtkmXMLPUnstructuredGridDataRe<wbr>ader is not doing me a great help.<br>
<br>
</span><u></u><u></u></p>
</div>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">Sumeet</span><u></u><u></u></p>
</div>
</div></div><div>
<p class="MsoNormal"><u></u> <u></u></p>
<div><div><div class="h5">
<p class="MsoNormal">On Mon, Aug 15, 2016 at 12:57 PM, Moreland, Kenneth <<a href="mailto:kmorel@sandia.gov" target="_blank">kmorel@sandia.gov</a>> wrote:<u></u><u></u></p>
</div></div><blockquote style="border:none;border-left:solid #cccccc 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-right:0in">
<div>
<div><div><div class="h5">
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">I think the key you are looking for is vtkAlgorithm::CAN_HANDLE_<wbr>PIECE_REQUEST(), which you want to
 set to 1 to signify that you can provide multiple pieces. You might want to look at vtkmXMLPUnstructuredGridDataRe<wbr>ader for an example.</span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"> </span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">If I remember correctly, this has recently been changed in VTK. It used to be that you would give the
 number of pieces you supported, but that functionality was not useful in practice and consequently readers reported that they could produce any number of pieces in order to be useful. Thus, the behavior was change to allow readers simply to report whether
 or not they support multiple pieces. Berk can probably provide more information.</span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"> </span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">-Ken</span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"> </span><u></u><u></u></p>
<p class="MsoNormal"><b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">From:</span></b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif"> Paraview-developers [mailto:<a href="mailto:paraview-developers-bounces@paraview.org" target="_blank">paraview-developers-<wbr>bounces@paraview.org</a>]
<b>On Behalf Of </b>sumeet kumar<br>
<b>Sent:</b> Monday, August 15, 2016 12:58 PM<br>
<b>To:</b> ParaView Developers <<a href="mailto:paraview-developers@paraview.org" target="_blank">paraview-developers@paraview.<wbr>org</a>><br>
<b>Subject:</b> [EXTERNAL] [Paraview-developers] Reading multiple files in parallel</span><u></u><u></u></p>
<p class="MsoNormal"> <u></u><u></u></p>
</div></div><div><div><div class="h5">
<div>
<div>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt">Hello all,
<u></u><u></u></p>
</div>
<p class="MsoNormal" style="margin-bottom:12.0pt">I have a number of files which contains information about pieces of unstructured mesh. For example :-<br>
<br>
t_2.h5.01.feioutput<br>
t_2.h5.03.feioutput<br>
t_2.h5.04.feioutput<br>
t_2.h5.05.feioutput<br>
t_2.h5.06.feioutput<br>
t_2.h5.07.feioutput<br>
t_2.h5.08.feioutput<br>
t_2.h5.09.feioutput<br>
t_2.h5.feioutput<u></u><u></u></p>
</div>
<p class="MsoNormal" style="margin-bottom:12.0pt">My reader can read each file individually but I want to read them all in parallel so that I can visualize the whole model. I looked at the
<a href="http://www.paraview.org/Wiki/Writing_ParaView_Readers" target="_blank">http://www.paraview.org/Wiki/<wbr>Writing_ParaView_Readers</a> and followed the steps for unstructured mesh.<u></u><u></u></p>
</div>
<p class="MsoNormal">When I try to set the number of pieces in Request Information function as this<br>
<br>
<span style="color:blue">vtkInformation* Node_Mesh = outVec->GetInformationObject(<wbr>0);<br>
Node_Mesh->Set(<wbr>vtkStreamingDemandDrivenPipeli<wbr>ne::MAXIMUM_NUMBER_OF_PIECES()<wbr>, 10);<br clear="all">
</span><u></u><u></u></p>
<div>
<p class="MsoNormal"> <u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">I get the following error
<br>
<br>
<span style="color:red">error: ‘MAXIMUM_NUMBER_OF_PIECES’ is not a member of ‘<wbr>vtkStreamingDemandDrivenPipeli<wbr>ne’<br>
  Node_Mesh->Set(<wbr>vtkStreamingDemandDrivenPipeli<wbr>ne::MAXIMUM_NUMBER_OF_PIECES()<wbr>, 10);</span><u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> <u></u><u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt">Also, it would be highly appreciated if anyone could show/(send me link) me to a sample example.<u></u><u></u></p>
</div>
<p class="MsoNormal">Regards<br clear="all">
<br>
-- <u></u><u></u></p>
</div></div><div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<p class="MsoNormal"><span style="border:solid windowtext 1.0pt;padding:0in"><b>Error! Filename not specified.</b></span><span style="font-size:9.5pt">         </span><u></u><u></u></p><span class="">
<div>
<p class="MsoNormal"><span style="font-size:9.5pt;font-family:"Trebuchet MS",sans-serif;color:#333333">Sumeet Kumar Sinha</span><u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:"Trebuchet MS",sans-serif;color:#333333">Graduate Student</span><u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:9.5pt;font-family:"Trebuchet MS",sans-serif;color:#333333">Phone: (+1)</span><a href="tel:%28%2B91%29%209910516219" target="_blank"><span style="font-size:9.5pt;font-family:"Trebuchet MS",sans-serif;color:#1155cc"> </span></a><span style="font-size:9.5pt;font-family:"Trebuchet MS",sans-serif;color:#333333"><a href="tel:5306018271" target="_blank">5306018271</a></span><u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:9.5pt;font-family:"Trebuchet MS",sans-serif;color:#333333">Website : </span><a href="http://www.sumeetksinha.com/" target="_blank"><span style="font-size:9.5pt;font-family:"Trebuchet MS",sans-serif;color:#1155cc">http://www.sumeetksinha.com/</span></a><u></u><u></u></p>
</div>
</span></div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</blockquote>
</div><span class="">
<p class="MsoNormal"><br>
<br clear="all">
<br>
-- <u></u><u></u></p>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<p class="MsoNormal"><span style="border:solid windowtext 1.0pt;padding:0in"><img src="cid:image001.jpg@01D1F716.30ACD7B0" alt="Image removed by sender." border="0" height="31" width="200"></span><span style="font-size:9.5pt">         </span><u></u><u></u></p>
<div>
<p class="MsoNormal"><span style="font-size:9.5pt;font-family:"Trebuchet MS",sans-serif;color:#333333">Sumeet Kumar Sinha</span><u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:"Trebuchet MS",sans-serif;color:#333333">Graduate Student</span><u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:9.5pt;font-family:"Trebuchet MS",sans-serif;color:#333333">Phone: (+1)</span><a href="tel:%28%2B91%29%209910516219" target="_blank"><span style="font-size:9.5pt;font-family:"Trebuchet MS",sans-serif;color:#1155cc"> </span></a><span style="font-size:9.5pt;font-family:"Trebuchet MS",sans-serif;color:#333333"><a href="tel:5306018271" value="+15306018271" target="_blank">5306018271</a></span><u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:9.5pt;font-family:"Trebuchet MS",sans-serif;color:#333333">Website : </span><a href="http://www.sumeetksinha.com/" target="_blank"><span style="font-size:9.5pt;font-family:"Trebuchet MS",sans-serif;color:#1155cc">http://www.sumeetksinha.com/</span></a><u></u><u></u></p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</span></div>
</div>
</div>

</blockquote></div><br><br clear="all"><br>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div><span><img src="http://faculty.engineering.ucdavis.edu/ceetemplate/wp-content/uploads/2013/06/CEE75percent500w.jpg" style="font-size:12.8000001907349px" height="31" width="200"><span style="font-size:12.8000001907349px">         </span><br><div><font style="font-family:'trebuchet ms',sans-serif;font-size:12.8000001907349px;color:rgb(51,51,51)">Sumeet Kumar Sinha</font></div><div><span style="color:rgb(51,51,51);font-family:'trebuchet ms',sans-serif;font-size:small">Graduate Student</span></div><div><span style="font-size:12.8000001907349px;font-family:'trebuchet ms',sans-serif;color:rgb(51,51,51)">Phone: (+1)</span><a href="tel:%28%2B91%29%209910516219" value="+919910516219" style="font-size:12.8000001907349px;font-family:'trebuchet ms',sans-serif;color:rgb(17,85,204)" target="_blank"> </a><span style="font-size:12.8000001907349px;font-family:'trebuchet ms',sans-serif;color:rgb(51,51,51)">5306018271</span></div><div><span style="color:rgb(51,51,51);font-family:'trebuchet ms',sans-serif;font-size:12.8000001907349px">Website : </span><a href="http://www.sumeetksinha.com/" style="font-family:'trebuchet ms',sans-serif;font-size:12.8000001907349px;color:rgb(17,85,204)" target="_blank">http://www.sumeetksinha.com/</a></div></span></div></div></div></div></div></div></div></div>
</div>