1

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.

Nobody-86
  • 151
  • 5

1 Answers1

2

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.

Nico Vuaille
  • 2,310
  • 1
  • 6
  • 14
  • Thank you for the explanation. In my case, the solution via the array would probably be the right choice, since it is a coherent mesh of elements / cells and I want to have the nodes / point in the array. The only disadvantage I see is that a lot of unnecessary data is stored. If for example in a selection only 1'000 of 1'000'000 nodes are contained, I must store a 0 for 999'000 nodes. But if I have understood this correctly, it is not possible to create a subset where I specify the node numbers, is it? – Nobody-86 Mar 30 '22 at 12:50
  • Indeed, with arrays you should have one entry per points, so a lot of useless 0 in your case. That's another argument for the MultiBlock solution :) – Nico Vuaille Mar 30 '22 at 15:26
  • The multiblock solution is probably not suitable for my case, because some nodes / point belong to several selections at the same time. With the multiblock solution, these nodes / points would then be redundant. However, I have implemented the array solution and it works like a charm. Thanks again! – Nobody-86 Mar 31 '22 at 14:47