[Paraview] problems generating ghost cells, update on PKdTree questions
Christine Corbett Moran
corbett at physik.uzh.ch
Mon Nov 23 15:21:00 EST 2009
Hi Ken,
First of all thank you very much for your response.
I see the DATA_NUMBER_OF_GHOST_LEVELS or UPDATE_NUMBER_OF_GHOST_LEVELS
sets operating on vtkInformation, which I don't call Update on. Should
I somehow be accessing the vtkDataObject of the vtkInformation (or
something else related to the pipeline as a whole) and call Update on
it? That sounds like it is very likely my problem.
Right now
1. I run D3 within my data reader, I set the output to be D3->output,
then the _last thing_ I do is call:
output->GetInformation()->Set(vtkDataObject::DATA_NUMBER_OF_GHOST_LEVELS(), 1);
2. In a downstream filter which requires ghost cells, the _first
thing_ I do if running in parallel call:
inInfo->Set(vtkStreamingDemandDrivenPipeline::UPDATE_NUMBER_OF_GHOST_LEVELS(),1);
The documentation I can find on this is pretty fluffy ("filters can
request ghost cells"), so if anyone points me to something better it
would help tremendously (or even a good nugget of example code that I
missed in my grepping).
Cheers,
Christine
On Mon, Nov 23, 2009 at 8:57 PM, Moreland, Kenneth <kmorel at sandia.gov> wrote:
> I think setting UPDATE_NUMBER_OF_GHOST_LEVELS on the output of the filter
> before calling Update is the right thing to do. However, in your example
> code I do not see where that value is getting set. I only see the update
> extent being set, and that is not sufficient to produce ghost cells.
>
> -Ken
>
>
> On 11/19/09 4:50 PM, "Christine Corbett Moran" <corbett at physik.uzh.ch>
> wrote:
>
> I'm having trouble with generating ghost cells, either on my own or
> with D3 (via the duplicate boundary points mode). In neither case am I
> able to see a single ghost level of value 1 for any of my points on a
> test data set, which has 10,000 cells, one point per cell, distributed
> on 4 processors. I try both generating ghost cells at level one within
> my d3 call in my reader as follows:
> vtkSmartPointer<vtkDistributedDataFilter> d3 = \
> vtkSmartPointer<vtkDistributedDataFilter>::New();
> d3->AddInput(tipsyReadInitialOutput);
> d3->UpdateInformation();
> vtkStreamingDemandDrivenPipeline* exec = \
> static_cast<vtkStreamingDemandDrivenPipeline*>(d3->GetExecutive());
>
> // adds one ghostlevel
> exec->SetUpdateExtent(exec->GetOutputInformation(0), piece,
> numPieces, 1);
> d3->Update();
> // changing output to output of d3
> output->ShallowCopy(d3->GetOutput());
> output->GetInformation()->Set(
> vtkDataObject::DATA_NUMBER_OF_GHOST_LEVELS(), 1);
> And, as far as I can tell, the procedure for a filter requesting ghost
> levels is:
> // Requesting one level of ghost cells
> vtkInformation* inInfo =
> inputVector[0]->GetInformationObject(0);
> inInfo->Set(
> vtkStreamingDemandDrivenPipeline::UPDATE_NUMBER_OF_GHOST_LEVELS(),1);
> And my reader or D3 would then have to access the inInfo act on this
> request. However neither my filter nor D3 are generating any ghost
> cells, as is verified by examining:
> output->GetPointData()->GetArray("vtkGhostLevels")->GetTuple(
> nextHaloId)[0]
> Can any one see what's going on? I've read a chunk of vtk source
> referencing vtkGhostLevels or using UPDATE_NUMBER_OF_GHOST_LEVELS but
> haven't found the clue yet.
>
> An update on my D3/PKd tree question: I decided to run D3
> automatically if the user checks a button in my readers and strongly
> recommend they run D3 if they don't use my readers. I found that
> BuildLocator() or BuildLocatorFromPoints(points) never worked as I had
> hoped from the documentation (I wanted to call it once/or on all
> processes on the PkD tree generated by D3 and have it build a locator
> which works across all processes, i.e. can also find points belonging
> to a neighbor process), so instead I build a KdTree locator local to
> each process, separate from the PKdTree generated by D3, and
> coordinate a search if necessary, I can still make this highly data
> parallel for my applications, e.g. finding the mass of all points
> within a given radius by doing local searches/consolidation and just
> sending the results for a final consolidation to the root.
>
> Christine
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the ParaView Wiki at:
> http://paraview.org/Wiki/ParaView
>
> Follow this link to subscribe/unsubscribe:
> http://www.paraview.org/mailman/listinfo/paraview
>
>
>
>
> **** Kenneth Moreland
> *** Sandia National Laboratories
> ***********
> *** *** *** email: kmorel at sandia.gov
> ** *** ** phone: (505) 844-8919
> *** web: http://www.cs.unm.edu/~kmorel
>
>
More information about the ParaView
mailing list