Create a channel for vtkMultiBlock

Hello,

I am writing a Catalyst2 adapter for a particle-in-cell code. Catalyst has channels to pass different type of information. My original idea was to have a channel for mesh and for particle separately, but then I realised that there are multiple species of particles too.

I could achieve what I want by having a channel per particle specie, but I don’t think it’s very elegant. I noticed in some of the example a multiblock variable. To be specific the only example that has it is Examples/Catalyst2/CxxMultiChannelInputExample, but it doesn’t seem to develop it much as the result only has one block?

My question is therefore, how would I structure Conduit tree to obtain a vtkMultiBlockDataSet on the other side? Specifically, I would need to have point sets named after the specie.

Please advise.

Sorry, the moment after writing this I realised that vtkMultiBlockDataSet is for distributing data across processors rather than having a single container for different data sets of the same type. I will need to rephrase this question!

Robert,

I believe what you are looking for is different coordsets. You can define one coordset for your cells and one for your particles, or even one per specie. All of these can go in a single channel.

If you need to organize your species - maybe you want your hydrocarbons grouped, or your liquid particles grouped - take a look at the assembly node. This node allows you to create a tree of names representing an arbitrary organization of your data. In ParaView, you can then use the ExtractBlock filter to fetch your data by path using a path in the assembly tree.

1 Like

Hi @robertsawko !

A different approach to represent different particle species would be to add a dedicated field for each particle which enumerate the particle type. Then in the python pipeline, use selection by id to extract specific particle based on the type field.