Ok thanks again for the advice. Think it's really clear I'm confused between the "downstream" 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 "it was to inherit" was totally wrong. I would prefer to stick with the downstream filter if that'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"><<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 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->GetInformationObject(0);</div>
</div>
<div><br>
</div>
</div><div> int requestedGhostLevel = outInfo->Get(</div>
<div>
<div> vtkStreamingDemandDrivenPipeline::UPDATE_NUMBER_OF_GHOST_LEVELS());</div>
</div>
<div> outInfo->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->Superclass::RequestData(request, inputVector, outputVector);</div>
<div>}</div>
<div><br>
</div>
</span></div>
</blockquote>
<div style="font-family:Calibri,sans-serif">I don'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 <<a href="mailto:andy.john.parker@googlemail.com" target="_blank">andy.john.parker@googlemail.com</a>><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 <<a href="mailto:george.zagaris@kitware.com" target="_blank">george.zagaris@kitware.com</a>><br>
<span style="font-weight:bold">Cc: </span>Kenneth Moreland <<a href="mailto:kmorel@sandia.gov" target="_blank">kmorel@sandia.gov</a>>, "<a href="mailto:vtkusers@vtk.org" target="_blank">vtkusers@vtk.org</a>" <<a href="mailto:vtkusers@vtk.org" target="_blank">vtkusers@vtk.org</a>>, "<a href="mailto:paraview@paraview.org" target="_blank">paraview@paraview.org</a>"
<<a href="mailto:paraview@paraview.org" target="_blank">paraview@paraview.org</a>><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'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& os, vtkIndent indent)</div>
<div>{ </div>
<div> this->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]->GetInformationObject(0);</div>
<div> vtkInformation *outInfo = outputVector->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->Get(vtkStreamingDemandDrivenPipeline::UPDATE_PIECE_NUMBER());</div>
<div> numPieces = outInfo->Get(vtkStreamingDemandDrivenPipeline::UPDATE_NUMBER_OF_PIECES());</div>
<div> ghostLevels = outInfo->Get(vtkStreamingDemandDrivenPipeline::UPDATE_NUMBER_OF_GHOST_LEVELS()) + 1; //##### New bit, modified from Ken's notes</div>
<div> </div>
<div> inInfo->Set(vtkStreamingDemandDrivenPipeline::UPDATE_PIECE_NUMBER(), piece);</div>
<div> inInfo->Set(vtkStreamingDemandDrivenPipeline::UPDATE_NUMBER_OF_PIECES(), numPieces);</div>
<div> inInfo->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& 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&); // Not implemented.</div>
<div> // void operator=(const MyD3&); // 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<MyD3> dd = vtkSmartPointer<MyD3>::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->SetInput(mesh);</div>
<div> dd->SetController(getVtkController());</div>
<div> dd->SetBoundaryModeToSplitBoundaryCells(); // clipping</div>
<div> dd->UseMinimalMemoryOff();</div>
<div> dd->Update();</div>
<div> </div>
<div> vtkSmartPointer<vtkUnstructuredGrid> ddUmesh(vtkUnstructuredGrid::SafeDownCast(dd->GetOutput()));</div>
<div> </div>
<div> auto ids = ddUmesh->GetPointData()->GetGlobalIds();</div>
<div> auto cids = ddUmesh->GetCellData()->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'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->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">
<<a href="mailto:george.zagaris@kitware.com" target="_blank">george.zagaris@kitware.com</a>></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>
<<a href="mailto:andy.john.parker@googlemail.com" target="_blank">andy.john.parker@googlemail.com</a>> wrote:<br>
> Many thanks for that. I perform some threshold stuff early on, so basically<br>
><br>
<br>
</div>
Perhaps an easy solution is to append a "GlobalCellID" and<br>
"GlobalNodeID" 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>
> On 7 November 2012 13:00, George Zagaris <<a href="mailto:george.zagaris@kitware.com" target="_blank">george.zagaris@kitware.com</a>> wrote:<br>
>><br>
>> Hello,<br>
>><br>
>> Since the data is essentially structured (rectilinear grids), I think<br>
>> the best way to get the global/local mapping is to use extent<br>
>> information. Specifically, you need the whole extent of the grid and<br>
>> the global extent of each partition. Then from the global IJK of a<br>
>> point or cell, and the whole extent you can use methods from<br>
>> vtkStructuredData to compute the corresponding global linear index for<br>
>> a point or cell. Do you have extent information?<br>
>><br>
>> Also, I have done some work on ghost generation in VTK for structured<br>
>> (and AMR) data. Unfortunately, currently it doesn't work outside the<br>
>> box with rectilinear grids. This functionality can still be used to<br>
>> create ghost layers and exchange the fields (node and/or cell data) on<br>
>> the grid but, it doesn't communicate the coordindates on the<br>
>> rectilinear grid. Alternatively, you may be able to converge to a<br>
>> solution faster if you convert the rectilinear grid to a<br>
>> vtkStructuredGrid and use vtkPStructuredGridConnectivity or<br>
>> vtkPStructuredGridGhostDataGenerator to generate ghost layers. There<br>
>> are tests that illustrate how to use these classes and I can provide<br>
>> more information if you are interested.<br>
>><br>
>> Best,<br>
>> George<br>
>><br>
>> On Wed, Nov 7, 2012 at 7:22 AM, Moreland, Kenneth <<a href="mailto:kmorel@sandia.gov" target="_blank">kmorel@sandia.gov</a>><br>
>> wrote:<br>
>> > Hmmm. I thought global point IDs were always created. Maybe it only<br>
>> > happens<br>
>> > when ghost cells are created. Try getting that working first.<br>
>> ><br>
>> > As far as global cell IDs are concerned, you are out of luck.<br>
>> > vtkDistributedDataFilter does not create them. But they are not all that<br>
>> > useful anyway since, unlike points, once you remove the out cells there<br>
>> > is<br>
>> > no overlap. Usually you can get all the information you want from the<br>
>> > ghost<br>
>> > level.<br>
>> ><br>
>> > If you really need global cell IDs, I'm sure you would have no trouble<br>
>> > making them yourself. I would do it before running<br>
>> > vtkDistributedDataFilter.<br>
>> > Assuming when you first read in your data you have no duplicate cells,<br>
>> > just<br>
>> > label those on process 0 as 0..N_0, those on process 1 as N_0+1..N_1,<br>
>> > and so<br>
>> > on.<br>
>> ><br>
>> > -Ken<br>
>> ><br>
>> > Sent from my iPad so blame autocorrect.<br>
>> ><br>
>> > On Nov 7, 2012, at 2:38 AM, "Andrew Parker"<br>
>> > <<a href="mailto:andy.john.parker@googlemail.com" target="_blank">andy.john.parker@googlemail.com</a>> wrote:<br>
>> ><br>
>> > So that's working now in terms of the cast, forgot GetOutput() inside<br>
>> > the<br>
>> > cast operator! The returned vtkUGrid is now fully populated and<br>
>> > contains<br>
>> > sensible information.<br>
>> ><br>
>> > However, both getPointData()->GetGlobalIds() and<br>
>> > getCellData()->GetGlobalIds() return null pointers. Any thoughts?<br>
>> ><br>
>> > Also, should I be using CellData since I want the cell global to local<br>
>> > mapping for cells not the nodes, at the moment at least?<br>
>> ><br>
>> > On 6 November 2012 19:05, Moreland, Kenneth <<a href="mailto:kmorel@sandia.gov" target="_blank">kmorel@sandia.gov</a>> wrote:<br>
>> >><br>
>> >> Perhaps it is outputting a composite data set of some type? Try<br>
>> >> running<br>
>> >> GetClassName() to see what type of data object it really is.<br>
>> >><br>
>> >> -Ken<br>
>> >><br>
>> >> From: Andrew Parker <<a href="mailto:andy.john.parker@googlemail.com" target="_blank">andy.john.parker@googlemail.com</a>><br>
>> >> Date: Tuesday, November 6, 2012 9:50 AM<br>
>> >><br>
>> >> To: Kenneth Moreland <<a href="mailto:kmorel@sandia.gov" target="_blank">kmorel@sandia.gov</a>><br>
>> >> Cc: "<a href="mailto:vtkusers@vtk.org" target="_blank">vtkusers@vtk.org</a>" <<a href="mailto:vtkusers@vtk.org" target="_blank">vtkusers@vtk.org</a>>, "<a href="mailto:paraview@paraview.org" target="_blank">paraview@paraview.org</a>"<br>
>> >> <<a href="mailto:paraview@paraview.org" target="_blank">paraview@paraview.org</a>><br>
>> >> Subject: [EXTERNAL] Re: [Paraview] vtkDistributedDataFilter and ghost<br>
>> >> cells<br>
>> >><br>
>> >> Thanks on both accounts. Any thoughts why the downcast called after<br>
>> >> dd->Update() on distributedDataFilter is a null pointer? As in, dd is<br>
>> >> working perfectly properly, but I don't seem to be able to extract a<br>
>> >> valid<br>
>> >> unstructuredgrid. For a follow up question I assume<br>
>> >> getPointData()->GetGlobalIds() gives the local to global for the mesh<br>
>> >> nodes,<br>
>> >> and I should use getCellData()->GetGlobalIds() to get the local to<br>
>> >> global<br>
>> >> for the cells? Once I get a valid pointer that is....<br>
>> >><br>
>> >> Cheers again,<br>
>> >> Andy<br>
>> >><br>
>> >> On 6 November 2012 16:40, Moreland, Kenneth <<a href="mailto:kmorel@sandia.gov" target="_blank">kmorel@sandia.gov</a>> wrote:<br>
>> >>><br>
>> >>> You should be able to do a vtkUnstructuredGrid::SafeDownCast() to the<br>
>> >>> data to get the unstructured mesh (and access to the point data).<br>
>> >>><br>
>> >>> -Ken<br>
>> >>><br>
>> >>> From: Andrew Parker <<a href="mailto:andy.john.parker@googlemail.com" target="_blank">andy.john.parker@googlemail.com</a>><br>
>> >>> Date: Tuesday, November 6, 2012 9:32 AM<br>
>> >>> To: Kenneth Moreland <<a href="mailto:kmorel@sandia.gov" target="_blank">kmorel@sandia.gov</a>><br>
>> >>> Cc: "<a href="mailto:vtkusers@vtk.org" target="_blank">vtkusers@vtk.org</a>" <<a href="mailto:vtkusers@vtk.org" target="_blank">vtkusers@vtk.org</a>>, "<a href="mailto:paraview@paraview.org" target="_blank">paraview@paraview.org</a>"<br>
>> >>> <<a href="mailto:paraview@paraview.org" target="_blank">paraview@paraview.org</a>><br>
>> >>> Subject: [EXTERNAL] Re: [Paraview] vtkDistributedDataFilter and ghost<br>
>> >>> cells<br>
>> >>><br>
>> >>> Another question which I'd forgotten, how do I get to a<br>
>> >>> vtkUnstructuredGrid per processor from the vtkDistributedDataFilter.<br>
>> >>><br>
>> >>> For instance, dd->GetOutput()->GetPointData()->GetGlobalIds() doesn't<br>
>> >>> work as it's a vtkDataObject<br>
>> >>><br>
>> >>> Stupid question I'm sure but the doxy notes say this type returns an<br>
>> >>> unstructured mesh, but I can't seem to get it out?<br>
>> >>><br>
>> >>> Also, why exactly do I need the vtkPieceScalars and<br>
>> >>> vtkDataSetSurfaceFilter again? If the above can be made to work and<br>
>> >>> return<br>
>> >>> the mapping, what are they adding in terms of information?<br>
>> >>><br>
>> >>> Thanks again,<br>
>> >>> Andy<br>
>> >>><br>
>> >>> On 6 November 2012 16:00, Moreland, Kenneth <<a href="mailto:kmorel@sandia.gov" target="_blank">kmorel@sandia.gov</a>> wrote:<br>
>> >>>><br>
>> >>>> I believe vtkDistributedDataFilter will always return with global<br>
>> >>>> point<br>
>> >>>> ids (a mapping from local point ids to global point ids), although it<br>
>> >>>> might<br>
>> >>>> pass them if they already exist. So<br>
>> >>>> dd->GetOutput()->GetPointData()->GetGlobalIds() should return the<br>
>> >>>> array that<br>
>> >>>> gives this mapping.<br>
>> >>>><br>
>> >>>> Ghost cells are only created on demand, and this is usually done by<br>
>> >>>> pipeline convention. If you have a filter that needs a layer of<br>
>> >>>> ghost<br>
>> >>>> cells, it should override the RequestUpdateExtent method to increment<br>
>> >>>> the<br>
>> >>>> value of UPDATE_NUMBER_OF_GHOST_LEVELS from the output information to<br>
>> >>>> the<br>
>> >>>> input information. This method would look something like this.<br>
>> >>>><br>
>> >>>> int vtkDistributedDataFilter::RequestUpdateExtent(<br>
>> >>>> vtkInformation *vtkNotUsed(request),<br>
>> >>>> vtkInformationVector **inputVector,<br>
>> >>>> vtkInformationVector *outputVector)<br>
>> >>>> {<br>
>> >>>> // get the info objects<br>
>> >>>> vtkInformation *inInfo = inputVector[0]->GetInformationObject(0);<br>
>> >>>> vtkInformation *outInfo = outputVector->GetInformationObject(0);<br>
>> >>>><br>
>> >>>> int piece, numPieces, ghostLevels;<br>
>> >>>><br>
>> >>>> // We require an extra layer of ghost cells from upstream.<br>
>> >>>><br>
>> >>>> piece =<br>
>> >>>><br>
>> >>>> outInfo->Get(vtkStreamingDemandDrivenPipeline::UPDATE_PIECE_NUMBER());<br>
>> >>>> numPieces =<br>
>> >>>><br>
>> >>>><br>
>> >>>> outInfo->Get(vtkStreamingDemandDrivenPipeline::UPDATE_NUMBER_OF_PIECES());<br>
>> >>>> ghostLevels =<br>
>> >>>><br>
>> >>>><br>
>> >>>> outInfo->Get(vtkStreamingDemandDrivenPipeline::UPDATE_NUMBER_OF_GHOST_LEVELS());<br>
>> >>>><br>
>> >>>><br>
>> >>>> inInfo->Set(vtkStreamingDemandDrivenPipeline::UPDATE_PIECE_NUMBER(),<br>
>> >>>> piece);<br>
>> >>>><br>
>> >>>><br>
>> >>>> inInfo->Set(vtkStreamingDemandDrivenPipeline::UPDATE_NUMBER_OF_PIECES(),<br>
>> >>>> numPieces);<br>
>> >>>><br>
>> >>>><br>
>> >>>> inInfo->Set(vtkStreamingDemandDrivenPipeline::UPDATE_NUMBER_OF_GHOST_LEVELS(),<br>
>> >>>> ghostLevels);<br>
>> >>>><br>
>> >>>> return 1;<br>
>> >>>> }<br>
>> >>>><br>
>> >>>><br>
>> >>>> The operation of the RequestData method should also strip off this<br>
>> >>>> layer<br>
>> >>>> of ghost cells. It might be possible to request a layer of ghost<br>
>> >>>> cells by<br>
>> >>>> setting UPDATE_NUMBER_OF_GHOST_LEVELS at the bottom of the pipeline,<br>
>> >>>> but I'm<br>
>> >>>> not totally sure how to make that work. It's probably easier (or at<br>
>> >>>> least<br>
>> >>>> cleaner) to do it from within a filter.<br>
>> >>>><br>
>> >>>> -Ken<br>
>> >>>><br>
>> >>>> From: Andrew Parker <<a href="mailto:andy.john.parker@googlemail.com" target="_blank">andy.john.parker@googlemail.com</a>><br>
>> >>>> Date: Tuesday, November 6, 2012 8:25 AM<br>
>> >>>> To: "<a href="mailto:vtkusers@vtk.org" target="_blank">vtkusers@vtk.org</a>" <<a href="mailto:vtkusers@vtk.org" target="_blank">vtkusers@vtk.org</a>>, "<a href="mailto:paraview@paraview.org" target="_blank">paraview@paraview.org</a>"<br>
>> >>>> <<a href="mailto:paraview@paraview.org" target="_blank">paraview@paraview.org</a>><br>
>> >>>> Subject: [EXTERNAL] [Paraview] vtkDistributedDataFilter and ghost<br>
>> >>>> cells<br>
>> >>>><br>
>> >>>> Hi,<br>
>> >>>><br>
>> >>>> Hope you can help. I have some code running in parallel, that by<br>
>> >>>> other<br>
>> >>>> means I have constructed nprocs worth of vtkRectilinearGrids, one per<br>
>> >>>> process. Each of which is a valid nprocs-worth of the whole serial<br>
>> >>>> mesh,<br>
>> >>>> I've check this and I am happy with that i.e. it's partitioned<br>
>> >>>> properly and<br>
>> >>>> nothing is missing. I need the following information to process my<br>
>> >>>> data in<br>
>> >>>> parallel:<br>
>> >>>><br>
>> >>>> 1) I would like the local -> global cell mapping between the local<br>
>> >>>> rgrid<br>
>> >>>> and the corresponding global single mesh.<br>
>> >>>> 2) I would like to know which cells are on processor boundaries for<br>
>> >>>> parallel exchange purposes.<br>
>> >>>> 3) I would like all the double arrays per processor to be "expanded"<br>
>> >>>> by<br>
>> >>>> the amount of (1 level of) ghost cells such that I can properly do<br>
>> >>>> the<br>
>> >>>> computations I want with the ability to exchange only those<br>
>> >>>> additional cells<br>
>> >>>> given the local to global mapping.<br>
>> >>>><br>
>> >>>> I have tried from the examples to use the following code, which I<br>
>> >>>> call<br>
>> >>>> on every process, each of which has it's own local rgrid as I said.<br>
>> >>>> I do<br>
>> >>>> the following:<br>
>> >>>><br>
>> >>>> vtkSmartPointer<vtkDistributedDataFilter> dd =<br>
>> >>>> vtkSmartPointer<vtkDistributedDataFilter>::New();<br>
>> >>>> dd->SetInput(rgrid);<br>
>> >>>><br>
>> >>>> dd->SetController(getVtkController());<br>
>> >>>> dd->SetBoundaryModeToSplitBoundaryCells();<br>
>> >>>> //dd->SetBoundaryModeToAssignToOneRegion();<br>
>> >>>> //dd->SetBoundaryModeToAssignToAllIntersectingRegions();<br>
>> >>>> dd->UseMinimalMemoryOff();<br>
>> >>>> dd->Update();<br>
>> >>>> vtkPieceScalars *ps = vtkPieceScalars::New();<br>
>> >>>> ps->SetInputConnection(dd->GetOutputPort());<br>
>> >>>> ps->SetScalarModeToCellData();<br>
>> >>>> vtkDataSetSurfaceFilter *dss = vtkDataSetSurfaceFilter::New();<br>
>> >>>> dss->SetInputConnection(ps->GetOutputPort());<br>
>> >>>><br>
>> >>>> The dd object works fine and writing its contents out on each<br>
>> >>>> processor<br>
>> >>>> gives nprocs worth of meshes, each of which look slightly different<br>
>> >>>> to the<br>
>> >>>> way I've partitioned them up, but sum to the same serial mesh so I am<br>
>> >>>> happy<br>
>> >>>> with that working correctly. But I can't for the life of me figure<br>
>> >>>> out how<br>
>> >>>> to obtain local to global cell mappings, allocate ghost cells, or<br>
>> >>>> work out<br>
>> >>>> how to exchange data given the above partition info and comms....<br>
>> >>>><br>
>> >>>> Note I have not provided any additional information to "dd" regarding<br>
>> >>>> global cells as per the doxy notes so I assume it went away and<br>
>> >>>> computed it.<br>
>> >>>> I can't figure out how to extract it however. I also have no idea<br>
>> >>>> how to<br>
>> >>>> modify each local processor rgrid to include the ghost cells for that<br>
>> >>>> processor. Finally given that info, I could exchange between<br>
>> >>>> processors to<br>
>> >>>> write to each local processors ghost cells the corresponding "real"<br>
>> >>>> cell<br>
>> >>>> data from the neighbouring meshes and continue the code.<br>
>> >>>><br>
>> >>>> Any help really appreciated!<br>
>> >>>><br>
>> >>>> Cheers,<br>
>> >>>> Andy<br>
>> >>>><br>
>> >>><br>
>> >>><br>
>> >>><br>
>> >>> --<br>
>> >>><br>
>> >>> __________________________________<br>
>> >>><br>
>> >>> Dr Andrew Parker<br>
>> >>><br>
>> >>> Em@il: <a href="mailto:andrew.parker@cantab.net" target="_blank">andrew.parker@cantab.net</a><br>
>> >>><br>
>> >>><br>
>> >><br>
>> >><br>
>> >><br>
>> >> --<br>
>> >><br>
>> >> __________________________________<br>
>> >><br>
>> >> Dr Andrew Parker<br>
>> >><br>
>> >> Em@il: <a href="mailto:andrew.parker@cantab.net" target="_blank">andrew.parker@cantab.net</a><br>
>> >><br>
>> >><br>
>> ><br>
>> ><br>
>> ><br>
>> > --<br>
>> ><br>
>> > __________________________________<br>
>> ><br>
>> > Dr Andrew Parker<br>
>> ><br>
>> > Em@il: <a href="mailto:andrew.parker@cantab.net" target="_blank">andrew.parker@cantab.net</a><br>
>> ><br>
>> ><br>
>> ><br>
>> > _______________________________________________<br>
>> > Powered by <a href="http://www.kitware.com" 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" target="_blank">
http://www.kitware.com/opensource/opensource.html</a><br>
>> ><br>
>> > Please keep messages on-topic and check the VTK FAQ at:<br>
>> > <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
>> ><br>
>> > Follow this link to subscribe/unsubscribe:<br>
>> > <a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
>> ><br>
><br>
><br>
><br>
><br>
> --<br>
><br>
> __________________________________<br>
><br>
> Dr Andrew Parker<br>
><br>
> Em@il: <a href="mailto:andrew.parker@cantab.net" target="_blank">andrew.parker@cantab.net</a><br>
><br>
><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>