[vtkusers] Partitioning VTK PolyData for Multi-Processing

Magician f_magician at mac.com
Thu Nov 10 08:53:04 EST 2016


Hi Paul,


I checked the VTK User’s Guide, but couldn’t partition my datasets with vtkPolyDataStreamer.

Today I found the similar thread on the mailing list.
<http://public.kitware.com/pipermail/vtkusers/2009-December/056214.html>
It says the distributed data filter and parallel writer are used for the purpose.

So I tried the sample python on 2 CPUs:

    import vtk

    source = vtk.vtkPointSource()
    source.SetCenter((0.0, 0.0, 0.0))
    source.SetNumberOfPoints(1000000)
    source.SetRadius(1.0)
    source.Update()

    d3 = vtk.vtkDistributedDataFilter()
    d3.SetInputData(source.GetOutput())
    d3.SetBoundaryMode(0)
    d3.Update()

    writer = vtk.vtkXMLPUnstructuredGridWriter()
    writer.SetInputData(d3.GetOutput())
    writer.SetFileName(’test.pvtu’)
    writer.SetNumberOfPieces(2)
    writer.WriteSummaryFileOn()
    writer.SetStartPiece(0)
    writer.SetEndPiece(1)
    writer.Write()

…but the exported *.vtu-s are exactly same. Both have 1,000,000 points, and not partitioned.

Maybe the usage of the vtkDistributedDataFilter is wrong.
How to pass the partitioned data to the parallel writer?


Magician


> On Nov 8, 2016, at 00:37, Paul Korir <pkorir at ebi.ac.uk> wrote:
> 
> Hi Magician,
> 
> You could have a look at the Visualization Toolkit 4th Ed. pg. 96 and pg. 389.
> 
> It talks about using streamers such as vtkPolyDataStreamer (http://www.vtk.org/doc/release/7.0/html/classvtkPolyDataStreamer.html#details <http://www.vtk.org/doc/release/7.0/html/classvtkPolyDataStreamer.html#details>).
> 
> HTH,
> 
> Paul
> 
> On 05/11/2016 13:56, Magician wrote:
>> Hi all,
>> 
>> 
>> I'm using VTK 7.1.0 (pvpython with ParaView 5.2.0 RC3)
>> for processing VTK PolyData.
>> The data consists of billions of point coordinates, point cells and point values.
>> 
>> I'd like to partition the data for multi-processing,
>> but there are not enough informations.
>> Now I'm splitting data and writing *.pvtp files manually.
>> 
>> Is there a easy way to convert *.vtp to *.pvtp includes several partitions,
>> or extract data by rectangular (or other geometric) regions?
>> 
>> 
>> Magician
>> _______________________________________________
>> Powered by www.kitware.com <http://www.kitware.com/>
>> 
>> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html <http://www.kitware.com/opensource/opensource.html>
>> 
>> Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ <http://www.vtk.org/Wiki/VTK_FAQ>
>> 
>> Search the list archives at: http://markmail.org/search/?q=vtkusers <http://markmail.org/search/?q=vtkusers>
>> 
>> Follow this link to subscribe/unsubscribe:
>> http://public.kitware.com/mailman/listinfo/vtkusers <http://public.kitware.com/mailman/listinfo/vtkusers>
> 
> -- 
> Paul x4422

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20161110/b56ebaec/attachment.html>


More information about the vtkusers mailing list