find the boundary point indices in multiblock mesh


I am working with paraview multiblock files. Basically I have a couple of vtu files describing 2D flow fields, one is flow.vtu and the others are boundary_xx.vtu. The points on the boundary are also in the flow file. Now I would like to write a file with a list of all the points and connectivities, and append a list of indices (and connectivities) of the points that are one the boundaries.
I could not find an obvious way to get this information, the closest I could find was this example on finding cell intersections, but I’m not sure if this is the direction to go for this problem:

You can try the MergeBlock filter, it will outputs a single mesh that you can save as a vtu.

append a list of indices (and connectivities)

In point associated array you should have one value per points. So to list indices of boundary points, you will probably have to use a dummy value for inner indices.

I do not have the full pipeline but some piece you may want to look at:

  • BlockScalars to identify points of each block
  • MergeBlock to create one mesh
  • GenerateIds to get point ids as an associated array for further manip
  • Python Calculator to extract PointIds when relevant (depending on BlockScalars), probably using the numpy.where method.

Hi Nicolas,
Thanks for these pointers. I see what mergeblock and generateIds do, but BlockScalars just gives me a field with values of zero for some reason. The only thing that I do is couple a BlockScalars to my .vtm multiblock input.
My test data is here :
It’s just a 2D square with an inlet, outlet, top and bottom wall.
The strategy is I think that I should end up with a field where the points have values corresponding to the vtkblockcolors or something similar, and then I can match the values to the keys from the multiblock (using a programmable filter?)

It seems to be harder than I first though :expressionless:

Use the MergeBlock to get only one mesh and one list of points.

Then I think you should use programmable filter to browse each point and check if it is in a boundary cell (i.e. a cell of type Line) and then fill an array to store this info.

Thanks, but is there then still a way to distinguish between the different boundaries(i.e. know which keys belong to them) and keep their connectivity?
My current pure-python method is basically going directly through the list of boundary files, and compares their coordinates with the coordinates in the “Internal” block. The problem then is that I lose the connectivity and I also have to reconstruct this information. I’d think that there is an easy paraview way to find the subset of “Internal” that corresponds with the points in “Inlet”, basically returning the indices/points/connectivities in “Internal”.

I finally have something in pure ParaView (no python),
boundary.pvsm (861.8 KB)

The main idea of this state is to associate a value to each extracted boundaries with the Connectivity and then merge this info in the main mesh with Resample With DataSet.


  • ExtractBlocks to extract Internal mesh from original data


  • Extract Blocks to extract boundaries from original data
  • Merge Block without MergePoints option to convert to a single mesh
  • Connectivity to associated an id to each boundary
  • Calculator adds 1 to avoid 0
  • ResampleWithDataSet with Internal mesh as destination.

Hello, Nicolas, This works like a charm! The values 1,2,3,4 for the regionID, will they always be assigned in the order of the keys in the vtkmultiblockdataset? That will allow an easy connection to the original boundary names. Thanks again!

Not sure if the values are in a known order…