[Paraview] Attaching D3 to my own reader

Berk Geveci berk.geveci at kitware.com
Thu Oct 22 07:10:46 EDT 2009


There are some possibly issues with having ghost levels all the time.
Quantitative filters (histogram for example) don't know to ignore
ghost levels yet. Those are things we need to fix. Beyond that, you
should be OK. I plan on cleaning up and improving ghost level support
in the near future.

On Thu, Oct 22, 2009 at 5:56 AM, Paul Edwards <paul.m.edwards at gmail.com> wrote:
> Thanks berk - it works now :)
>
> BTW I also needed to set:
>    outInfo->Set(vtkStreamingDemandDrivenPipeline::UPDATE_NUMBER_OF_GHOST_LEVELS(),
> 1);
>
> Will this change the results for any filters if I keep ghost cells on
> all the time?  And, is this the recommended thing to do?  Also, is
> there any documentation on writing filters to handle ghost levels?
>
> Thanks,
> Paul
>
> 2009/10/21 Berk Geveci <berk.geveci at kitware.com>:
>> I am guessing that this has something to do with ghost levels. When
>> you first update your reader, no one requests ghost levels so the
>> reader produces none. Later, when you apply extract surface with Piece
>> Invariant turned on, it asks for ghost levels which causes your reader
>> to re-execute. However, it still does not produce ghost levels because
>> you are not passing this request to D3. Here is what should work:
>>
>> * To execute the D3 filter, do something like this:
>> d3->UpdateInformation();
>> exec = static_cast<vtkStreamingDemandDrivenPipeline*>(d3->GetExecutive());
>> exec->SetUpdateExtent(exec->GetOutputInformation(), piece, numPieces,
>> 1); // 1 -> ghostlevel
>> d3->Update();
>> // shallow copy and such
>>
>> Then, something like:
>>
>> output->GetInformation()->Set(vtkDataObject::DATA_NUMBER_OF_GHOST_LEVELS(), 1);
>>
>> What I did above is to always produce 1 ghost level. Filters that did
>> not ask for ghost levels will ignore this extra ghost level. Filters
>> that do ask for ghost levels should function fine.
>>
>> Let me know if you need more help. Also, let me know if this works or
>> not because I am writing this without trying it :-)
>>
>> -berk
>>
>>
>> On Wed, Oct 21, 2009 at 7:03 AM, Paul Edwards <paul.m.edwards at gmail.com> wrote:
>>> I am trying to use D3 in my parallel reader to distribute the data.
>>> Previously I have been doing this in the ParaView pipeline but now I
>>> would like to incorporate it into my readers RequestData.  I am
>>> experiencing a problem when I use the reader, extract the surface and
>>> then use the feature edges filter.  Everything works as expected until
>>> clicking apply for Feature Edges where request data is called again
>>> for my filter and then the partition boundaries included in the
>>> output.  This does not happen if I remove the D3 from my RequestData
>>> and use in the ParaView pipeline.
>>>
>>> I am adding the D3 filter as outlined below in my RequestData:
>>>
>>>    vtkMultiBlockDataSet* output = vtkMultiBlockDataSet::SafeDownCast(
>>>            outInfo->Get(vtkDataObject::DATA_OBJECT()));
>>>    VTK_CREATE(vtkMultiBlockDataSet, multiblock);
>>>
>>>    // ...
>>>    // READ IN MULTIBLOCK DATA HERE
>>>    // ...
>>>
>>>    VTK_CREATE(vtkDistributedDataFilter, d3);
>>>    d3->AddInput(multiblock);
>>>    d3->Update();
>>>    output->ShallowCopy(d3->GetOutput());
>>>
>>> Can anyone see anything wrong with this?  Could it be because I need
>>> to set something else in the RequestInformation?  Currently I do this:
>>>
>>>    vtkInformation *outInfo = outputVector->GetInformationObject(0);
>>>    outInfo->Set(vtkStreamingDemandDrivenPipeline::MAXIMUM_NUMBER_OF_PIECES(),
>>> -1);
>>>    return 1;
>>>
>>> Any advice would be appreciated.
>>>
>>> Thanks,
>>> Paul
>>> _______________________________________________
>>> 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
>>>
>>
>


More information about the ParaView mailing list