<div dir="ltr"><div>If the output of the vtm is what you're looking for you won't be able to do that with the parallel XML structured grid writer because you have a node partition (i.e. nodes are uniquely assigned to a process and in this case no other process has that node). Thus the missing cells at the partition boundary are causing you problems with the pvts reader.<br><br></div><div>With the multiblock data set my suggestion is to make the first block in that be a vtkMultiPieceDataSet and then add each process's structured grid as a piece to that. Then when you load it into ParaView it will behave much more uniformly.<br><br><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Jun 26, 2015 at 9:56 AM,  <span dir="ltr"><<a href="mailto:u.utku.turuncoglu@be.itu.edu.tr" target="_blank">u.utku.turuncoglu@be.itu.edu.tr</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<br>
Thanks for your help. Actually, every processor has its own data and i am<br>
just using the interior regions (so, it does not overlap, no ghost or halo<br>
regions). Anyway, after my initial mail, i changed the SetExtent part of<br>
the code as<br>
<br>
  sg->SetExtent (*nxstart-2, *nxend-2, *nystart-2, *nyend-2, 0, 0);<br>
<br>
because it was starting from 1 in each direction, now it starts from zero.<br>
This modification fixes the mismatch problem in the number of points comes<br>
from Paraview and seen in the C++ code. On the other hand, the Paraview<br>
still complains about the following extents (seems that the inner boundary<br>
of the 2 x 2 decomposition elements, like ghost region).<br>
<br>
    0 140  57 58  0 0<br>
    70 71  0 57  0 0<br>
    70 71  58 114  0 0<br>
<br>
You can find the data in the attached file (data_00.tar.gz).<br>
<br>
Then, i tried to put the individual parts of the structured grid into the<br>
vtkMultiBlockDataSet using following code<br>
<br>
  //<br>
  // Create multi block grid<br>
  //<br>
  vtkMultiBlockDataSet* grid = vtkMultiBlockDataSet::New ();<br>
  grid->SetNumberOfBlocks(*mpiSize);<br>
  grid->SetBlock (*mpiRank, sg.GetPointer());<br>
<br>
and write the grid information to the file (data_01.tar.gz). In this case,<br>
Paraview could open the *.vtm file without any message. So, i could not be<br>
sure about the grid. It seems fine if i look at multi block data file<br>
(vtm) but not in pvts file.<br>
<br>
Regards,<br>
<br>
--ufuk<br>
<div class="HOEnZb"><div class="h5"><br>
<br>
> Do you have a node partitioning of your grid? If you do you really need a<br>
> cell partitioning of the grid which will have multiple points a the<br>
> partition overlap.<br>
><br>
> Can you share your data?<br>
><br>
> On Fri, Jun 26, 2015 at 5:58 AM, <<a href="mailto:u.utku.turuncoglu@be.itu.edu.tr">u.utku.turuncoglu@be.itu.edu.tr</a>> wrote:<br>
><br>
>> Hi,<br>
>><br>
>> I am trying to create structured grid in an MPI application and i am<br>
>> using<br>
>> following C++ code to implement it<br>
>><br>
>> extern "C" void createstgrid_(double* y, double* x,<br>
>>                               int* nxstart, int* nxend, int* nystart,<br>
>> int*<br>
>> nyend,<br>
>>                               int* nx, int* ny, int* nz, int* mpiSize,<br>
>> int* mpiRank) {<br>
>>   //<br>
>>   // Create structured grid<br>
>>   //<br>
>>   vtkSmartPointer<vtkStructuredGrid> sg =<br>
>> vtkSmartPointer<vtkStructuredGrid>::New();<br>
>>   sg->SetExtent (*nxstart-1, *nxend-1, *nystart-1, *nyend-1, 0, 0);<br>
>><br>
>>   //<br>
>>   // Create data structure to store grid coordinates<br>
>>   //<br>
>>   int pnx = ((*nxend)-(*nxstart))+1;<br>
>>   int pny = ((*nyend)-(*nystart))+1;<br>
>>   vtkSmartPointer<vtkPoints> points = vtkSmartPointer<vtkPoints>::New();<br>
>><br>
>>   //<br>
>>   // Insert grid coordinate data as points<br>
>>   //<br>
>>   k = 0;<br>
>>   for (int j = 0; j < pny; j++) {<br>
>>     for (int i = 0; i < pnx; i++) {<br>
>>       points->InsertPoint(k, x[i+j*pnx], y[i+j*pnx], 0);<br>
>>       k = k+1;<br>
>>     }<br>
>>   }<br>
>>   sg->SetPoints(points);<br>
>><br>
>>   //<br>
>>   // Set grid<br>
>>   //<br>
>><br>
>> vtkCPPythonAdaptorAPI::GetCoProcessorData()->GetInputDescriptionByName("input")->SetGrid(sg);<br>
>><br>
>> vtkCPPythonAdaptorAPI::GetCoProcessorData()->GetInputDescriptionByName("input")->SetWholeExtent(0,<br>
>> *nx-1, 0, *ny-1, 0, 0);<br>
>> }<br>
>><br>
>> so, when i run the code with grid writer, it creates the individual file<br>
>> (*.vts) for each processor and one extra for the combination (*.pvts).<br>
>> Anyway, the individual files looks fine in Paraview but if i open the<br>
>> file<br>
>> with pvts extension, i am getting following error,<br>
>><br>
>> ERROR: In<br>
>><br>
>> /Users/turuncu/Qsync/progs/paraview-4.3.1/src/VTK/IO/XML/vtkXMLPStructuredDataReader.cxx,<br>
>> line 461<br>
>> vtkXMLPStructuredGridReader (0x7f961c0910a0): No available piece<br>
>> provides<br>
>> data for the following extents:<br>
>> 0 140  0 1  0 0<br>
>> 0 1  1 58  0 0<br>
>> 0 140  58 59  0 0<br>
>> 0 1  59 114  0 0<br>
>> 71 72  1 58  0 0<br>
>> 71 72  59 114  0 0<br>
>><br>
>> The UpdateExtent cannot be filled.<br>
>><br>
>> What is the meaning of this message? It means that some of the grid data<br>
>> (or points) are not filled by the code. I also check the loop in the C++<br>
>> code and print out the number of points for each processor<br>
>><br>
>> 0 number of points = 4118<br>
>> 1 number of points = 4047<br>
>> 2 number of points = 4060<br>
>> 3 number of points = 3990<br>
>><br>
>> and the total is 16215, which is consistent with the size of the grid<br>
>> but<br>
>> if i check the individual vts files from the Paraview, the files shows<br>
>> different number of points for each file<br>
>><br>
>> 0 number of points = 4118<br>
>> 1 number of points = 3976<br>
>> 2 number of points = 4002<br>
>> 3 number of points = 3864<br>
>><br>
>> So, only first file matchs with the C++ code but others not. I am not<br>
>> sure<br>
>> what is happening in there and if you have any suggestion that will be<br>
>> great.<br>
>><br>
>> Anyway, in this case i did not use vtkMultiBlockDataSet but after having<br>
>> correct representation of the grid, i am planing use SetBlock method of<br>
>> vtkMultiBlockDataSet to assign decomposition elements as individual<br>
>> blocks.<br>
>><br>
>> Regards,<br>
>><br>
>> --ufuk<br>
>><br>
>> _______________________________________________<br>
>> Powered by <a href="http://www.kitware.com" rel="noreferrer" target="_blank">www.kitware.com</a><br>
>><br>
>> Visit other Kitware open-source projects at<br>
>> <a href="http://www.kitware.com/opensource/opensource.html" rel="noreferrer" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
>><br>
>> Please keep messages on-topic and check the ParaView Wiki at:<br>
>> <a href="http://paraview.org/Wiki/ParaView" rel="noreferrer" target="_blank">http://paraview.org/Wiki/ParaView</a><br>
>><br>
>> Search the list archives at: <a href="http://markmail.org/search/?q=ParaView" rel="noreferrer" target="_blank">http://markmail.org/search/?q=ParaView</a><br>
>><br>
>> Follow this link to subscribe/unsubscribe:<br>
>> <a href="http://public.kitware.com/mailman/listinfo/paraview" rel="noreferrer" target="_blank">http://public.kitware.com/mailman/listinfo/paraview</a><br>
>><br>
></div></div></blockquote></div><br></div>