Search code examples
vtkparaview

Are there groups of entities in VTK format?


I would like to use paraview for postprocessing of FE models. However, I am missing an essential feature in VKT format, which probably exists, but I don't know its name or how it is implemented in VTK.

In FE models it is common to group some nodes/elements. Depending on the program these are named differently: Groups, Sets, Selections, ... . Basically they are just an array with the reference numbers for quick selection. For example: A tube could have the selections "inlet", "outlet" and "wall". Is there any possibility to store such a selection in VTK format? The goal would be to be able to apply filters only to this node selection, for example to get results only from certain nodes.

By the way, I do the export of my calculated data to VTK on my own, because my FE program does not have native support for the VTK format. So I am more interested in the required data structure than in a workflow for program XY.


Solution

  • In VTK, you cannot apply filters only on subset of a data object. What you need is to be able to split your data into several ones for processing.

    I see two ways for that:

    1. create one object per selection and then use a MultiBlockDataSet with one part per block. Then you can use vtkExtractBlock to apply filters on a specific part.
    2. Add a PartId array to your data. Then you can use thresholding to extract the region of interest.

    I advise to use 1. as it has more semantic.