vtkMultiBlockDataSet and parallel pipelines

Hello!!!

I’m working with a vtkMultiBlockDataSet with around 6,000 blocks where each block is a vtkUnstructuredGrid. The data represents a finite element mesh and each block is a separate “Part”. Some of the blocks contain 3D cells, some 2D and some 1D - but I’m using vtkUnstructuredGrids for all of them right now although I can easily use PolyData for the 1D/2D blocks if necessary.

I’m trying to figure out how to efficiently and quickly apply filters to this data set. It seems obvious that filters such as creating free faces, feature edges, mesh quality etc. should be possible using a parallel pipeline, however I can’t find any examples or tutorials to help me get started.

So I have a few questions for the forum,

  1. Is my assumption that the above filters can be run in parallel across the blocks of a MultiBlockDataSet valid or not? To be clear, I’m thinking about SMP type parallelism at this point - using multiple cores on a single workstation
  2. If the answer to 10 is Yes… What is the basic approach that I should be looking at?
  3. Finally, a very basic question. It seems that I cannot pass the MultiBlockDataSet directly to any mapper - and that I first have to extract the faces into a vtkPolyData using something like vtkCompositeDataGeometryFilter before rendering. Is this the idiomatic way of rendering MultiBlockDataSets or am I missing something?

Thanks in advance for your help,

Doug

Not by default. However, there’s an experiemental executive that supported this. If you set the vtkThreadedCompositeDataPipeline as the default executive using vtkAlgorithm::SetDefaultExecutivePrototype and then the executive will execute the algorithm on each block in parallel. I say it’s experimental since I am not aware how well tested/used this executive is.

Better option is to use vtkCompositePolyDataMapper2 instead. It avoids merging all blocks into one.

Thank-you - I’ll try vtkThreadedCompositeDataPipeline. I did read more on the vtk pipeline and I now understand that it’s designed to run each filter serially, but that some filters support parallel operations.

I’m already using vtkCompositePolyDataMapper2 - and as long as all of the blocks are PolyData this works, but if any are UnstructuredGrids it just skips them.

So I’m still not clear on the best way to operate on the data.

For that, use the standard GeometryFilter or DataSetSurfaceFilter to convert UGs to PD. Those filters do each block separately and don’t bother appending them together – which saves time.