Ok thanks again for the advice.  Think it&#39;s really clear I&#39;m confused between the &quot;downstream&quot; nomenclature.  Do mean just a class that constructs or takes a D3 as input that I write from scratch outside of vtk? Or do you mean something totally different?  Clearly my understanding of &quot;it was to inherit&quot; was totally wrong.  I would prefer to stick with the downstream filter if that&#39;s more robust.<div>
<br></div><div>Could you give me a quick explanation in this context?  In addition could you point me towards an example of using a downstream filter in this context?</div><div><br></div><div>Sorry again for the confusion,</div>
<div>Andy<br><br><div class="gmail_quote">On 7 November 2012 16:48, Moreland, Kenneth <span dir="ltr">&lt;<a href="mailto:kmorel@sandia.gov" target="_blank">kmorel@sandia.gov</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">




<div style="font-size:14px;word-wrap:break-word">
<div style="font-family:Calibri,sans-serif">
<div>
<div>The instructions I gave were for a downstream filter separate from D3.  If you want to modify D3 itself (which sounds like a reasonable good idea for your purposes) then you will have change the value for UPDATE_NUMBER_OF_GHOST_LEVELS that the RequestData
 reads.  If you want to go with this approach, first blow away your RequestUpdateExtent method.  Let D3 do its regular thing.  Then implement a RequestData method like the following:</div>
</div>
</div>
<div style="font-family:Calibri,sans-serif"><br>
</div>
<blockquote style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:40px;border-top-style:none;border-right-style:none;border-bottom-style:none;border-left-style:none;border-width:initial;border-color:initial;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px">

<div><font face="Consolas">int MyD3::RequestData(</font></div>
<div><font face="Consolas">
<div>  vtkInformation *request,</div>
<div>  vtkInformationVector **inputVector,</div>
<div>  vtkInformationVector *outputVector)</div><div class="im">
<div>{</div>
<div>
<div>  vtkInformation *outInfo = outputVector-&gt;GetInformationObject(0);</div>
</div>
<div><br>
</div>
</div><div>  int requestedGhostLevel = outInfo-&gt;Get(</div>
<div>
<div>    vtkStreamingDemandDrivenPipeline::UPDATE_NUMBER_OF_GHOST_LEVELS());</div>
</div>
<div>  outInfo-&gt;Set(</div>
</font><span style="font-family:Consolas">
<div>
<div>    vtkStreamingDemandDrivenPipeline::UPDATE_NUMBER_OF_GHOST_LEVELS(),</div>
</div>
<div>    requestedGhostLevel + 1);</div>
<div><br>
</div>
<div>  return this-&gt;Superclass::RequestData(request, inputVector, outputVector);</div>
<div>}</div>
<div><br>
</div>
</span></div>
</blockquote>
<div style="font-family:Calibri,sans-serif">I don&#39;t know if the executive is going to get upset about you changing UPDATE_NUMBER_OF_GHOST_LEVELS in RequestData, but I think it will be all right.</div>
<div style="font-family:Calibri,sans-serif"><br>
</div>
<div style="font-family:Calibri,sans-serif">-Ken</div>
<div style="font-family:Calibri,sans-serif"><br>
</div>
<span style="font-family:Calibri,sans-serif">
<div style="border-right:medium none;padding-right:0in;padding-left:0in;padding-top:3pt;text-align:left;font-size:11pt;border-bottom:medium none;font-family:Calibri;border-top:#b5c4df 1pt solid;padding-bottom:0in;border-left:medium none">

<span style="font-weight:bold">From: </span>Andrew Parker &lt;<a href="mailto:andy.john.parker@googlemail.com" target="_blank">andy.john.parker@googlemail.com</a>&gt;<br>
<span style="font-weight:bold">Date: </span>Wednesday, November 7, 2012 9:31 AM<br>
<span style="font-weight:bold">To: </span>George Zagaris &lt;<a href="mailto:george.zagaris@kitware.com" target="_blank">george.zagaris@kitware.com</a>&gt;<br>
<span style="font-weight:bold">Cc: </span>Kenneth Moreland &lt;<a href="mailto:kmorel@sandia.gov" target="_blank">kmorel@sandia.gov</a>&gt;, &quot;<a href="mailto:vtkusers@vtk.org" target="_blank">vtkusers@vtk.org</a>&quot; &lt;<a href="mailto:vtkusers@vtk.org" target="_blank">vtkusers@vtk.org</a>&gt;, &quot;<a href="mailto:paraview@paraview.org" target="_blank">paraview@paraview.org</a>&quot;
 &lt;<a href="mailto:paraview@paraview.org" target="_blank">paraview@paraview.org</a>&gt;<br>
<span style="font-weight:bold">Subject: </span>[EXTERNAL] Re: [vtkusers] [Paraview] vtkDistributedDataFilter and ghost cells - PROGRESS<br>
</div><div><div class="h5">
<div><br>
</div>
<blockquote style="BORDER-LEFT:#b5c4df 5 solid;PADDING:0 0 0 5;MARGIN:0 0 0 5">
<div>
<div>So I&#39;ve added this in an .cpp file and complied it:
<div><br>
</div>
<div>
<div>vtkStandardNewMacro(MyD3)</div>
<div><br>
</div>
<div>MyD3::MyD3()</div>
<div>: vtkDistributedDataFilter()</div>
<div>{</div>
<div>}</div>
<div><br>
</div>
<div>void MyD3::PrintSelf(ostream&amp; os, vtkIndent indent)</div>
<div>{  </div>
<div>  this-&gt;Superclass::PrintSelf(os,indent);</div>
<div>}</div>
<div><br>
</div>
<div>int MyD3::RequestUpdateExtent(vtkInformation *vtkNotUsed(request),</div>
<div><span style="white-space:pre-wrap"></span>     vtkInformationVector **inputVector,</div>
<div><span style="white-space:pre-wrap"></span>     vtkInformationVector *outputVector)</div>
<div>{</div>
<div>  // get the info objects</div>
<div>  vtkInformation *inInfo = inputVector[0]-&gt;GetInformationObject(0);</div>
<div>  vtkInformation *outInfo = outputVector-&gt;GetInformationObject(0);</div>
<div>  </div>
<div>  int piece, numPieces, ghostLevels;</div>
<div>  </div>
<div>  // We require an extra layer of ghost cells from upstream.</div>
<div>    </div>
<div>  piece = outInfo-&gt;Get(vtkStreamingDemandDrivenPipeline::UPDATE_PIECE_NUMBER());</div>
<div>  numPieces = outInfo-&gt;Get(vtkStreamingDemandDrivenPipeline::UPDATE_NUMBER_OF_PIECES());</div>
<div>  ghostLevels = outInfo-&gt;Get(vtkStreamingDemandDrivenPipeline::UPDATE_NUMBER_OF_GHOST_LEVELS()) + 1; //##### New bit, modified from Ken&#39;s notes</div>
<div>  </div>
<div>  inInfo-&gt;Set(vtkStreamingDemandDrivenPipeline::UPDATE_PIECE_NUMBER(), piece);</div>
<div>  inInfo-&gt;Set(vtkStreamingDemandDrivenPipeline::UPDATE_NUMBER_OF_PIECES(), numPieces);</div>
<div>  inInfo-&gt;Set(vtkStreamingDemandDrivenPipeline::UPDATE_NUMBER_OF_GHOST_LEVELS(), ghostLevels);</div>
<div>  </div>
<div>  return 1;</div>
<div>}</div>
<div><br>
</div>
<div>And I add this to a .h file:</div>
<div><br>
</div>
<div>
<div>class MyD3</div>
<div>  : public vtkDistributedDataFilter</div>
<div>{</div>
<div>  vtkTypeMacro(MyD3, vtkDistributedDataFilter);</div>
<div>  </div>
<div>public:</div>
<div>  static MyD3 *New();</div>
<div>  void PrintSelf(ostream&amp; os, vtkIndent indent);</div>
<div>  int RequestUpdateExtent(vtkInformation *vtkNotUsed(request),</div>
<div><span style="white-space:pre-wrap"></span> vtkInformationVector **inputVector,</div>
<div><span style="white-space:pre-wrap"></span> vtkInformationVector *outputVector);</div>
<div>protected:</div>
<div>  MyD3();</div>
<div> </div>
<div>private:</div>
<div>  // MyD3(const MyD3&amp;);  // Not implemented.</div>
<div>  // void operator=(const MyD3&amp;);  // Not implemented.</div>
<div>};</div>
</div>
<div><br>
</div>
<div>I then invoke it in parallel 3 way, as I did before, but now using:</div>
<div><br>
</div>
<div>
<div>  vtkSmartPointer&lt;MyD3&gt; dd = vtkSmartPointer&lt;MyD3&gt;::New();</div>
<div> </div>
<div>  // here mesh is a vtkUnstructuredGrid on each processor, obtained from other (non-vtk) means, but represents a valid and checked subset of the entire mesh.</div>
<div>  dd-&gt;SetInput(mesh);</div>
<div>  dd-&gt;SetController(getVtkController());</div>
<div>  dd-&gt;SetBoundaryModeToSplitBoundaryCells();  // clipping</div>
<div>  dd-&gt;UseMinimalMemoryOff();</div>
<div>  dd-&gt;Update();</div>
<div>  </div>
<div>  vtkSmartPointer&lt;vtkUnstructuredGrid&gt; ddUmesh(vtkUnstructuredGrid::SafeDownCast(dd-&gt;GetOutput()));</div>
<div>  </div>
<div>  auto ids = ddUmesh-&gt;GetPointData()-&gt;GetGlobalIds();</div>
<div>  auto cids = ddUmesh-&gt;GetCellData()-&gt;GetGlobalIds();</div>
<div><br>
</div>
</div>
<div>########################</div>
<div>Notes:</div>
<div><br>
</div>
<div>1) Both ids, and cids remain null, although I now understand from Ken that cids will always be null as they&#39;re not created.</div>
<div>2) Using totalview and stopping the code in parallel 3 way on line 670 of vtkDistributedDataFilter.cxx, the member this-&gt;GhostLevel is always zero and never executes codes branches dependent on it, however, the above code successfully increments the ghostLevels
 to one.</div>
<div>3) So basically moved forward a little bit, but still not working.  Any thoughts??</div>
<div>4) If I had created the ghost cells, how would I know, is my next question.  How can I visualise them to check?</div>
<div><br>
</div>
<div>Any thoughts really welcome.</div>
<div><br>
</div>
<div>Cheers again,</div>
<div>Andy</div>
<div><br>
</div>
<div><br>
</div>
<br>
<div class="gmail_quote">On 7 November 2012 14:50, George Zagaris <span dir="ltr">
&lt;<a href="mailto:george.zagaris@kitware.com" target="_blank">george.zagaris@kitware.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div>On Wed, Nov 7, 2012 at 9:34 AM, Andrew Parker<br>
&lt;<a href="mailto:andy.john.parker@googlemail.com" target="_blank">andy.john.parker@googlemail.com</a>&gt; wrote:<br>
&gt; Many thanks for that.  I perform some threshold stuff early on, so basically<br>
&gt;<br>
<br>
</div>
Perhaps an easy solution is to append a &quot;GlobalCellID&quot; and<br>
&quot;GlobalNodeID&quot; before thresholding. To the best of my knowledge,<br>
threshold will extract vtkUnstructuredGrid instance from whatever goes<br>
in the input and not automatically retain this type of global<br>
information.<br>
<br>
Hope this helps.<br>
<br>
Best,<br>
George<br>
<div>
<div><br>
&gt; On 7 November 2012 13:00, George Zagaris &lt;<a href="mailto:george.zagaris@kitware.com" target="_blank">george.zagaris@kitware.com</a>&gt; wrote:<br>
&gt;&gt;<br>
&gt;&gt; Hello,<br>
&gt;&gt;<br>
&gt;&gt; Since the data is essentially structured (rectilinear grids), I think<br>
&gt;&gt; the best way to get the global/local mapping is to use extent<br>
&gt;&gt; information. Specifically, you need the whole extent of the grid and<br>
&gt;&gt; the global extent of each partition. Then from the global IJK of a<br>
&gt;&gt; point or cell, and the whole extent you can use methods from<br>
&gt;&gt; vtkStructuredData to compute the corresponding global linear index for<br>
&gt;&gt; a point or cell. Do you have extent information?<br>
&gt;&gt;<br>
&gt;&gt; Also, I have done some work on ghost generation in VTK for structured<br>
&gt;&gt; (and AMR) data. Unfortunately, currently it doesn&#39;t work outside the<br>
&gt;&gt; box with rectilinear grids. This functionality can still be used to<br>
&gt;&gt; create ghost layers and exchange the fields (node and/or cell data) on<br>
&gt;&gt; the grid but, it doesn&#39;t communicate the coordindates on the<br>
&gt;&gt; rectilinear grid. Alternatively, you may be able to converge to a<br>
&gt;&gt; solution faster if you convert the rectilinear grid to a<br>
&gt;&gt; vtkStructuredGrid and use vtkPStructuredGridConnectivity or<br>
&gt;&gt; vtkPStructuredGridGhostDataGenerator to generate ghost layers. There<br>
&gt;&gt; are tests that illustrate how to use these classes and I can provide<br>
&gt;&gt; more information if you are interested.<br>
&gt;&gt;<br>
&gt;&gt; Best,<br>
&gt;&gt; George<br>
&gt;&gt;<br>
&gt;&gt; On Wed, Nov 7, 2012 at 7:22 AM, Moreland, Kenneth &lt;<a href="mailto:kmorel@sandia.gov" target="_blank">kmorel@sandia.gov</a>&gt;<br>
&gt;&gt; wrote:<br>
&gt;&gt; &gt; Hmmm. I thought global point IDs were always created. Maybe it only<br>
&gt;&gt; &gt; happens<br>
&gt;&gt; &gt; when ghost cells are created. Try getting that working first.<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; As far as global cell IDs are concerned, you are out of luck.<br>
&gt;&gt; &gt; vtkDistributedDataFilter does not create them. But they are not all that<br>
&gt;&gt; &gt; useful anyway since, unlike points, once you remove the out cells there<br>
&gt;&gt; &gt; is<br>
&gt;&gt; &gt; no overlap. Usually you can get all the information you want from the<br>
&gt;&gt; &gt; ghost<br>
&gt;&gt; &gt; level.<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; If you really need global cell IDs, I&#39;m sure you would have no trouble<br>
&gt;&gt; &gt; making them yourself. I would do it before running<br>
&gt;&gt; &gt; vtkDistributedDataFilter.<br>
&gt;&gt; &gt; Assuming when you first read in your data you have no duplicate cells,<br>
&gt;&gt; &gt; just<br>
&gt;&gt; &gt; label those on process 0 as 0..N_0, those on process 1 as N_0+1..N_1,<br>
&gt;&gt; &gt; and so<br>
&gt;&gt; &gt; on.<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; -Ken<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; Sent from my iPad so blame autocorrect.<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; On Nov 7, 2012, at 2:38 AM, &quot;Andrew Parker&quot;<br>
&gt;&gt; &gt; &lt;<a href="mailto:andy.john.parker@googlemail.com" target="_blank">andy.john.parker@googlemail.com</a>&gt; wrote:<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; So that&#39;s working now in terms of the cast, forgot GetOutput() inside<br>
&gt;&gt; &gt; the<br>
&gt;&gt; &gt; cast operator!  The returned vtkUGrid is now fully populated and<br>
&gt;&gt; &gt; contains<br>
&gt;&gt; &gt; sensible information.<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; However, both getPointData()-&gt;GetGlobalIds()  and<br>
&gt;&gt; &gt; getCellData()-&gt;GetGlobalIds() return null pointers.  Any thoughts?<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; Also, should I be using CellData since I want the cell global to local<br>
&gt;&gt; &gt; mapping for cells not the nodes, at the moment at least?<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; On 6 November 2012 19:05, Moreland, Kenneth &lt;<a href="mailto:kmorel@sandia.gov" target="_blank">kmorel@sandia.gov</a>&gt; wrote:<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; Perhaps it is outputting a composite data set of some type?  Try<br>
&gt;&gt; &gt;&gt; running<br>
&gt;&gt; &gt;&gt; GetClassName() to see what type of data object it really is.<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; -Ken<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; From: Andrew Parker &lt;<a href="mailto:andy.john.parker@googlemail.com" target="_blank">andy.john.parker@googlemail.com</a>&gt;<br>
&gt;&gt; &gt;&gt; Date: Tuesday, November 6, 2012 9:50 AM<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; To: Kenneth Moreland &lt;<a href="mailto:kmorel@sandia.gov" target="_blank">kmorel@sandia.gov</a>&gt;<br>
&gt;&gt; &gt;&gt; Cc: &quot;<a href="mailto:vtkusers@vtk.org" target="_blank">vtkusers@vtk.org</a>&quot; &lt;<a href="mailto:vtkusers@vtk.org" target="_blank">vtkusers@vtk.org</a>&gt;, &quot;<a href="mailto:paraview@paraview.org" target="_blank">paraview@paraview.org</a>&quot;<br>

&gt;&gt; &gt;&gt; &lt;<a href="mailto:paraview@paraview.org" target="_blank">paraview@paraview.org</a>&gt;<br>
&gt;&gt; &gt;&gt; Subject: [EXTERNAL] Re: [Paraview] vtkDistributedDataFilter and ghost<br>
&gt;&gt; &gt;&gt; cells<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; Thanks on both accounts.  Any thoughts why the downcast called after<br>
&gt;&gt; &gt;&gt; dd-&gt;Update() on distributedDataFilter is a null pointer?  As in, dd is<br>
&gt;&gt; &gt;&gt; working perfectly properly, but I don&#39;t seem to be able to extract a<br>
&gt;&gt; &gt;&gt; valid<br>
&gt;&gt; &gt;&gt; unstructuredgrid.  For a follow up question I assume<br>
&gt;&gt; &gt;&gt; getPointData()-&gt;GetGlobalIds() gives the local to global for the mesh<br>
&gt;&gt; &gt;&gt; nodes,<br>
&gt;&gt; &gt;&gt; and I should use getCellData()-&gt;GetGlobalIds() to get the local to<br>
&gt;&gt; &gt;&gt; global<br>
&gt;&gt; &gt;&gt; for the cells?  Once I get a valid pointer that is....<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; Cheers again,<br>
&gt;&gt; &gt;&gt; Andy<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; On 6 November 2012 16:40, Moreland, Kenneth &lt;<a href="mailto:kmorel@sandia.gov" target="_blank">kmorel@sandia.gov</a>&gt; wrote:<br>
&gt;&gt; &gt;&gt;&gt;<br>
&gt;&gt; &gt;&gt;&gt; You should be able to do a vtkUnstructuredGrid::SafeDownCast() to the<br>
&gt;&gt; &gt;&gt;&gt; data to get the unstructured mesh (and access to the point data).<br>
&gt;&gt; &gt;&gt;&gt;<br>
&gt;&gt; &gt;&gt;&gt; -Ken<br>
&gt;&gt; &gt;&gt;&gt;<br>
&gt;&gt; &gt;&gt;&gt; From: Andrew Parker &lt;<a href="mailto:andy.john.parker@googlemail.com" target="_blank">andy.john.parker@googlemail.com</a>&gt;<br>
&gt;&gt; &gt;&gt;&gt; Date: Tuesday, November 6, 2012 9:32 AM<br>
&gt;&gt; &gt;&gt;&gt; To: Kenneth Moreland &lt;<a href="mailto:kmorel@sandia.gov" target="_blank">kmorel@sandia.gov</a>&gt;<br>
&gt;&gt; &gt;&gt;&gt; Cc: &quot;<a href="mailto:vtkusers@vtk.org" target="_blank">vtkusers@vtk.org</a>&quot; &lt;<a href="mailto:vtkusers@vtk.org" target="_blank">vtkusers@vtk.org</a>&gt;, &quot;<a href="mailto:paraview@paraview.org" target="_blank">paraview@paraview.org</a>&quot;<br>

&gt;&gt; &gt;&gt;&gt; &lt;<a href="mailto:paraview@paraview.org" target="_blank">paraview@paraview.org</a>&gt;<br>
&gt;&gt; &gt;&gt;&gt; Subject: [EXTERNAL] Re: [Paraview] vtkDistributedDataFilter and ghost<br>
&gt;&gt; &gt;&gt;&gt; cells<br>
&gt;&gt; &gt;&gt;&gt;<br>
&gt;&gt; &gt;&gt;&gt; Another question which I&#39;d forgotten, how do I get to a<br>
&gt;&gt; &gt;&gt;&gt; vtkUnstructuredGrid per processor from the vtkDistributedDataFilter.<br>
&gt;&gt; &gt;&gt;&gt;<br>
&gt;&gt; &gt;&gt;&gt; For instance, dd-&gt;GetOutput()-&gt;GetPointData()-&gt;GetGlobalIds() doesn&#39;t<br>
&gt;&gt; &gt;&gt;&gt; work as it&#39;s a vtkDataObject<br>
&gt;&gt; &gt;&gt;&gt;<br>
&gt;&gt; &gt;&gt;&gt; Stupid question I&#39;m sure but the doxy notes say this type returns an<br>
&gt;&gt; &gt;&gt;&gt; unstructured mesh, but I can&#39;t seem to get it out?<br>
&gt;&gt; &gt;&gt;&gt;<br>
&gt;&gt; &gt;&gt;&gt; Also, why exactly do I need the vtkPieceScalars and<br>
&gt;&gt; &gt;&gt;&gt; vtkDataSetSurfaceFilter again? If the above can be made to work and<br>
&gt;&gt; &gt;&gt;&gt; return<br>
&gt;&gt; &gt;&gt;&gt; the mapping, what are they adding in terms of information?<br>
&gt;&gt; &gt;&gt;&gt;<br>
&gt;&gt; &gt;&gt;&gt; Thanks again,<br>
&gt;&gt; &gt;&gt;&gt; Andy<br>
&gt;&gt; &gt;&gt;&gt;<br>
&gt;&gt; &gt;&gt;&gt; On 6 November 2012 16:00, Moreland, Kenneth &lt;<a href="mailto:kmorel@sandia.gov" target="_blank">kmorel@sandia.gov</a>&gt; wrote:<br>
&gt;&gt; &gt;&gt;&gt;&gt;<br>
&gt;&gt; &gt;&gt;&gt;&gt; I believe vtkDistributedDataFilter will always return with global<br>
&gt;&gt; &gt;&gt;&gt;&gt; point<br>
&gt;&gt; &gt;&gt;&gt;&gt; ids (a mapping from local point ids to global point ids), although it<br>
&gt;&gt; &gt;&gt;&gt;&gt; might<br>
&gt;&gt; &gt;&gt;&gt;&gt; pass them if they already exist.  So<br>
&gt;&gt; &gt;&gt;&gt;&gt; dd-&gt;GetOutput()-&gt;GetPointData()-&gt;GetGlobalIds() should return the<br>
&gt;&gt; &gt;&gt;&gt;&gt; array that<br>
&gt;&gt; &gt;&gt;&gt;&gt; gives this mapping.<br>
&gt;&gt; &gt;&gt;&gt;&gt;<br>
&gt;&gt; &gt;&gt;&gt;&gt; Ghost cells are only created on demand, and this is usually done by<br>
&gt;&gt; &gt;&gt;&gt;&gt; pipeline convention.  If you have a filter that needs a layer of<br>
&gt;&gt; &gt;&gt;&gt;&gt; ghost<br>
&gt;&gt; &gt;&gt;&gt;&gt; cells, it should override the RequestUpdateExtent method to increment<br>
&gt;&gt; &gt;&gt;&gt;&gt; the<br>
&gt;&gt; &gt;&gt;&gt;&gt; value of UPDATE_NUMBER_OF_GHOST_LEVELS from the output information to<br>
&gt;&gt; &gt;&gt;&gt;&gt; the<br>
&gt;&gt; &gt;&gt;&gt;&gt; input information.  This method would look something like this.<br>
&gt;&gt; &gt;&gt;&gt;&gt;<br>
&gt;&gt; &gt;&gt;&gt;&gt; int vtkDistributedDataFilter::RequestUpdateExtent(<br>
&gt;&gt; &gt;&gt;&gt;&gt;   vtkInformation *vtkNotUsed(request),<br>
&gt;&gt; &gt;&gt;&gt;&gt;   vtkInformationVector **inputVector,<br>
&gt;&gt; &gt;&gt;&gt;&gt;   vtkInformationVector *outputVector)<br>
&gt;&gt; &gt;&gt;&gt;&gt; {<br>
&gt;&gt; &gt;&gt;&gt;&gt;   // get the info objects<br>
&gt;&gt; &gt;&gt;&gt;&gt;   vtkInformation *inInfo = inputVector[0]-&gt;GetInformationObject(0);<br>
&gt;&gt; &gt;&gt;&gt;&gt;   vtkInformation *outInfo = outputVector-&gt;GetInformationObject(0);<br>
&gt;&gt; &gt;&gt;&gt;&gt;<br>
&gt;&gt; &gt;&gt;&gt;&gt;   int piece, numPieces, ghostLevels;<br>
&gt;&gt; &gt;&gt;&gt;&gt;<br>
&gt;&gt; &gt;&gt;&gt;&gt;   // We require an extra layer of ghost cells from upstream.<br>
&gt;&gt; &gt;&gt;&gt;&gt;<br>
&gt;&gt; &gt;&gt;&gt;&gt;   piece =<br>
&gt;&gt; &gt;&gt;&gt;&gt;<br>
&gt;&gt; &gt;&gt;&gt;&gt; outInfo-&gt;Get(vtkStreamingDemandDrivenPipeline::UPDATE_PIECE_NUMBER());<br>
&gt;&gt; &gt;&gt;&gt;&gt;   numPieces =<br>
&gt;&gt; &gt;&gt;&gt;&gt;<br>
&gt;&gt; &gt;&gt;&gt;&gt;<br>
&gt;&gt; &gt;&gt;&gt;&gt; outInfo-&gt;Get(vtkStreamingDemandDrivenPipeline::UPDATE_NUMBER_OF_PIECES());<br>
&gt;&gt; &gt;&gt;&gt;&gt;   ghostLevels =<br>
&gt;&gt; &gt;&gt;&gt;&gt;<br>
&gt;&gt; &gt;&gt;&gt;&gt;<br>
&gt;&gt; &gt;&gt;&gt;&gt; outInfo-&gt;Get(vtkStreamingDemandDrivenPipeline::UPDATE_NUMBER_OF_GHOST_LEVELS());<br>
&gt;&gt; &gt;&gt;&gt;&gt;<br>
&gt;&gt; &gt;&gt;&gt;&gt;<br>
&gt;&gt; &gt;&gt;&gt;&gt; inInfo-&gt;Set(vtkStreamingDemandDrivenPipeline::UPDATE_PIECE_NUMBER(),<br>
&gt;&gt; &gt;&gt;&gt;&gt; piece);<br>
&gt;&gt; &gt;&gt;&gt;&gt;<br>
&gt;&gt; &gt;&gt;&gt;&gt;<br>
&gt;&gt; &gt;&gt;&gt;&gt; inInfo-&gt;Set(vtkStreamingDemandDrivenPipeline::UPDATE_NUMBER_OF_PIECES(),<br>
&gt;&gt; &gt;&gt;&gt;&gt;               numPieces);<br>
&gt;&gt; &gt;&gt;&gt;&gt;<br>
&gt;&gt; &gt;&gt;&gt;&gt;<br>
&gt;&gt; &gt;&gt;&gt;&gt; inInfo-&gt;Set(vtkStreamingDemandDrivenPipeline::UPDATE_NUMBER_OF_GHOST_LEVELS(),<br>
&gt;&gt; &gt;&gt;&gt;&gt;               ghostLevels);<br>
&gt;&gt; &gt;&gt;&gt;&gt;<br>
&gt;&gt; &gt;&gt;&gt;&gt;   return 1;<br>
&gt;&gt; &gt;&gt;&gt;&gt; }<br>
&gt;&gt; &gt;&gt;&gt;&gt;<br>
&gt;&gt; &gt;&gt;&gt;&gt;<br>
&gt;&gt; &gt;&gt;&gt;&gt; The operation of the RequestData method should also strip off this<br>
&gt;&gt; &gt;&gt;&gt;&gt; layer<br>
&gt;&gt; &gt;&gt;&gt;&gt; of ghost cells.  It might be possible to request a layer of ghost<br>
&gt;&gt; &gt;&gt;&gt;&gt; cells by<br>
&gt;&gt; &gt;&gt;&gt;&gt; setting UPDATE_NUMBER_OF_GHOST_LEVELS at the bottom of the pipeline,<br>
&gt;&gt; &gt;&gt;&gt;&gt; but I&#39;m<br>
&gt;&gt; &gt;&gt;&gt;&gt; not totally sure how to make that work.  It&#39;s probably easier (or at<br>
&gt;&gt; &gt;&gt;&gt;&gt; least<br>
&gt;&gt; &gt;&gt;&gt;&gt; cleaner) to do it from within a filter.<br>
&gt;&gt; &gt;&gt;&gt;&gt;<br>
&gt;&gt; &gt;&gt;&gt;&gt; -Ken<br>
&gt;&gt; &gt;&gt;&gt;&gt;<br>
&gt;&gt; &gt;&gt;&gt;&gt; From: Andrew Parker &lt;<a href="mailto:andy.john.parker@googlemail.com" target="_blank">andy.john.parker@googlemail.com</a>&gt;<br>
&gt;&gt; &gt;&gt;&gt;&gt; Date: Tuesday, November 6, 2012 8:25 AM<br>
&gt;&gt; &gt;&gt;&gt;&gt; To: &quot;<a href="mailto:vtkusers@vtk.org" target="_blank">vtkusers@vtk.org</a>&quot; &lt;<a href="mailto:vtkusers@vtk.org" target="_blank">vtkusers@vtk.org</a>&gt;, &quot;<a href="mailto:paraview@paraview.org" target="_blank">paraview@paraview.org</a>&quot;<br>

&gt;&gt; &gt;&gt;&gt;&gt; &lt;<a href="mailto:paraview@paraview.org" target="_blank">paraview@paraview.org</a>&gt;<br>
&gt;&gt; &gt;&gt;&gt;&gt; Subject: [EXTERNAL] [Paraview] vtkDistributedDataFilter and ghost<br>
&gt;&gt; &gt;&gt;&gt;&gt; cells<br>
&gt;&gt; &gt;&gt;&gt;&gt;<br>
&gt;&gt; &gt;&gt;&gt;&gt; Hi,<br>
&gt;&gt; &gt;&gt;&gt;&gt;<br>
&gt;&gt; &gt;&gt;&gt;&gt; Hope you can help.  I have some code running in parallel, that by<br>
&gt;&gt; &gt;&gt;&gt;&gt; other<br>
&gt;&gt; &gt;&gt;&gt;&gt; means I have constructed nprocs worth of vtkRectilinearGrids, one per<br>
&gt;&gt; &gt;&gt;&gt;&gt; process.  Each of which is a valid nprocs-worth of the whole serial<br>
&gt;&gt; &gt;&gt;&gt;&gt; mesh,<br>
&gt;&gt; &gt;&gt;&gt;&gt; I&#39;ve check this and I am happy with that i.e. it&#39;s partitioned<br>
&gt;&gt; &gt;&gt;&gt;&gt; properly and<br>
&gt;&gt; &gt;&gt;&gt;&gt; nothing is missing.  I need the following information to process my<br>
&gt;&gt; &gt;&gt;&gt;&gt; data in<br>
&gt;&gt; &gt;&gt;&gt;&gt; parallel:<br>
&gt;&gt; &gt;&gt;&gt;&gt;<br>
&gt;&gt; &gt;&gt;&gt;&gt; 1) I would like the local -&gt; global cell mapping between the local<br>
&gt;&gt; &gt;&gt;&gt;&gt; rgrid<br>
&gt;&gt; &gt;&gt;&gt;&gt; and the corresponding global single mesh.<br>
&gt;&gt; &gt;&gt;&gt;&gt; 2) I would like to know which cells are on processor boundaries for<br>
&gt;&gt; &gt;&gt;&gt;&gt; parallel exchange purposes.<br>
&gt;&gt; &gt;&gt;&gt;&gt; 3) I would like all the double arrays per processor to be &quot;expanded&quot;<br>
&gt;&gt; &gt;&gt;&gt;&gt; by<br>
&gt;&gt; &gt;&gt;&gt;&gt; the amount of (1 level of) ghost cells such that I can properly do<br>
&gt;&gt; &gt;&gt;&gt;&gt; the<br>
&gt;&gt; &gt;&gt;&gt;&gt; computations I want with the ability to exchange only those<br>
&gt;&gt; &gt;&gt;&gt;&gt; additional cells<br>
&gt;&gt; &gt;&gt;&gt;&gt; given the local to global mapping.<br>
&gt;&gt; &gt;&gt;&gt;&gt;<br>
&gt;&gt; &gt;&gt;&gt;&gt; I have tried from the examples to use the following code, which I<br>
&gt;&gt; &gt;&gt;&gt;&gt; call<br>
&gt;&gt; &gt;&gt;&gt;&gt; on every process, each of which has it&#39;s own local rgrid as I said.<br>
&gt;&gt; &gt;&gt;&gt;&gt; I do<br>
&gt;&gt; &gt;&gt;&gt;&gt; the following:<br>
&gt;&gt; &gt;&gt;&gt;&gt;<br>
&gt;&gt; &gt;&gt;&gt;&gt;  vtkSmartPointer&lt;vtkDistributedDataFilter&gt; dd =<br>
&gt;&gt; &gt;&gt;&gt;&gt; vtkSmartPointer&lt;vtkDistributedDataFilter&gt;::New();<br>
&gt;&gt; &gt;&gt;&gt;&gt;  dd-&gt;SetInput(rgrid);<br>
&gt;&gt; &gt;&gt;&gt;&gt;<br>
&gt;&gt; &gt;&gt;&gt;&gt;  dd-&gt;SetController(getVtkController());<br>
&gt;&gt; &gt;&gt;&gt;&gt;  dd-&gt;SetBoundaryModeToSplitBoundaryCells();<br>
&gt;&gt; &gt;&gt;&gt;&gt;  //dd-&gt;SetBoundaryModeToAssignToOneRegion();<br>
&gt;&gt; &gt;&gt;&gt;&gt;  //dd-&gt;SetBoundaryModeToAssignToAllIntersectingRegions();<br>
&gt;&gt; &gt;&gt;&gt;&gt;  dd-&gt;UseMinimalMemoryOff();<br>
&gt;&gt; &gt;&gt;&gt;&gt;  dd-&gt;Update();<br>
&gt;&gt; &gt;&gt;&gt;&gt;  vtkPieceScalars *ps = vtkPieceScalars::New();<br>
&gt;&gt; &gt;&gt;&gt;&gt;  ps-&gt;SetInputConnection(dd-&gt;GetOutputPort());<br>
&gt;&gt; &gt;&gt;&gt;&gt;  ps-&gt;SetScalarModeToCellData();<br>
&gt;&gt; &gt;&gt;&gt;&gt;  vtkDataSetSurfaceFilter *dss = vtkDataSetSurfaceFilter::New();<br>
&gt;&gt; &gt;&gt;&gt;&gt;  dss-&gt;SetInputConnection(ps-&gt;GetOutputPort());<br>
&gt;&gt; &gt;&gt;&gt;&gt;<br>
&gt;&gt; &gt;&gt;&gt;&gt; The dd object works fine and writing its contents out on each<br>
&gt;&gt; &gt;&gt;&gt;&gt; processor<br>
&gt;&gt; &gt;&gt;&gt;&gt; gives nprocs worth of meshes, each of which look slightly different<br>
&gt;&gt; &gt;&gt;&gt;&gt; to the<br>
&gt;&gt; &gt;&gt;&gt;&gt; way I&#39;ve partitioned them up, but sum to the same serial mesh so I am<br>
&gt;&gt; &gt;&gt;&gt;&gt; happy<br>
&gt;&gt; &gt;&gt;&gt;&gt; with that working correctly. But I can&#39;t for the life of me figure<br>
&gt;&gt; &gt;&gt;&gt;&gt; out how<br>
&gt;&gt; &gt;&gt;&gt;&gt; to obtain local to global cell mappings, allocate ghost cells, or<br>
&gt;&gt; &gt;&gt;&gt;&gt; work out<br>
&gt;&gt; &gt;&gt;&gt;&gt; how to exchange data given the above partition info and comms....<br>
&gt;&gt; &gt;&gt;&gt;&gt;<br>
&gt;&gt; &gt;&gt;&gt;&gt; Note I have not provided any additional information to &quot;dd&quot; regarding<br>
&gt;&gt; &gt;&gt;&gt;&gt; global cells as per the doxy notes so I assume it went away and<br>
&gt;&gt; &gt;&gt;&gt;&gt; computed it.<br>
&gt;&gt; &gt;&gt;&gt;&gt; I can&#39;t figure out how to extract it however.  I also have no idea<br>
&gt;&gt; &gt;&gt;&gt;&gt; how to<br>
&gt;&gt; &gt;&gt;&gt;&gt; modify each local processor rgrid to include the ghost cells for that<br>
&gt;&gt; &gt;&gt;&gt;&gt; processor.  Finally given that info, I could exchange between<br>
&gt;&gt; &gt;&gt;&gt;&gt; processors to<br>
&gt;&gt; &gt;&gt;&gt;&gt; write to each local processors ghost cells the corresponding &quot;real&quot;<br>
&gt;&gt; &gt;&gt;&gt;&gt; cell<br>
&gt;&gt; &gt;&gt;&gt;&gt; data from the neighbouring meshes and continue the code.<br>
&gt;&gt; &gt;&gt;&gt;&gt;<br>
&gt;&gt; &gt;&gt;&gt;&gt; Any help really appreciated!<br>
&gt;&gt; &gt;&gt;&gt;&gt;<br>
&gt;&gt; &gt;&gt;&gt;&gt; Cheers,<br>
&gt;&gt; &gt;&gt;&gt;&gt; Andy<br>
&gt;&gt; &gt;&gt;&gt;&gt;<br>
&gt;&gt; &gt;&gt;&gt;<br>
&gt;&gt; &gt;&gt;&gt;<br>
&gt;&gt; &gt;&gt;&gt;<br>
&gt;&gt; &gt;&gt;&gt; --<br>
&gt;&gt; &gt;&gt;&gt;<br>
&gt;&gt; &gt;&gt;&gt; __________________________________<br>
&gt;&gt; &gt;&gt;&gt;<br>
&gt;&gt; &gt;&gt;&gt;    Dr Andrew Parker<br>
&gt;&gt; &gt;&gt;&gt;<br>
&gt;&gt; &gt;&gt;&gt;    Em@il:  <a href="mailto:andrew.parker@cantab.net" target="_blank">andrew.parker@cantab.net</a><br>
&gt;&gt; &gt;&gt;&gt;<br>
&gt;&gt; &gt;&gt;&gt;<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; --<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; __________________________________<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt;    Dr Andrew Parker<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt;    Em@il:  <a href="mailto:andrew.parker@cantab.net" target="_blank">andrew.parker@cantab.net</a><br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; --<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; __________________________________<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt;    Dr Andrew Parker<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt;    Em@il:  <a href="mailto:andrew.parker@cantab.net" target="_blank">andrew.parker@cantab.net</a><br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; _______________________________________________<br>
&gt;&gt; &gt; Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; Visit other Kitware open-source projects at<br>
&gt;&gt; &gt; <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">
http://www.kitware.com/opensource/opensource.html</a><br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; Please keep messages on-topic and check the VTK FAQ at:<br>
&gt;&gt; &gt; <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; Follow this link to subscribe/unsubscribe:<br>
&gt;&gt; &gt; <a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
&gt;&gt; &gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; --<br>
&gt;<br>
&gt; __________________________________<br>
&gt;<br>
&gt;    Dr Andrew Parker<br>
&gt;<br>
&gt;    Em@il:  <a href="mailto:andrew.parker@cantab.net" target="_blank">andrew.parker@cantab.net</a><br>
&gt;<br>
&gt;<br>
</div>
</div>
</blockquote>
</div>
<br>
<br clear="all">
<div><br>
</div>
-- <br>
<p>__________________________________</p>
<p>   Dr Andrew Parker</p>
<p>   <a href="mailto:Em@il" target="_blank">Em@il</a>:  <a href="mailto:andrew.parker@cantab.net" target="_blank">
andrew.parker@cantab.net</a></p>
<br>
</div>
</div>
</div>
</blockquote>
</div></div></span>
</div>

</blockquote></div><br><br clear="all"><div><br></div>-- <br><p>__________________________________</p><p>   Dr Andrew Parker</p><p>   <a href="mailto:Em@il" target="_blank">Em@il</a>:  <a href="mailto:andrew.parker@cantab.net" target="_blank">andrew.parker@cantab.net</a></p>
<br>
</div>