# vtkMultiBlockDataSet with vtkUnstructuredGrid blueprint

**URL:** https://discourse.paraview.org/t/vtkmultiblockdataset-with-vtkunstructuredgrid-blueprint/13668
**Category:** In Situ Support
**Created:** [January 11, 2024, 12:25am UTC](https://discourse.paraview.org/t/vtkmultiblockdataset-with-vtkunstructuredgrid-blueprint/13668 "2024-01-11T00:25:21Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![Juan\_Jose\_Casafranca](https://discourse.paraview.org/user_avatar/discourse.paraview.org/juan_jose_casafranca/32/3499_2.png) [@Juan\_Jose\_Casafranca](https://discourse.paraview.org/u/Juan_Jose_Casafranca)
#### Post date: [January 11, 2024, 12:25am UTC](https://discourse.paraview.org/t/vtkmultiblockdataset-with-vtkunstructuredgrid-blueprint/13668/1 "2024-01-11T00:25:21Z")

</div>

I have a simulation where I have several solid objects organized hierarchically (for example, wheels of a car). I want to enable live visualization using catalyst, and I want to create a vtkMultiBlockDataset hierarchy with vtkUnstructedGrid at the leaf.

I have two questions regarding this:

- Is it possible to define that kind of hierarchy with conduit?
- What should be the python script for catalyst?

---

<div class="post-metadata">

### Author: ![Alexandre\_Minot](https://discourse.paraview.org/user_avatar/discourse.paraview.org/alexandre_minot/32/7132_2.png) [@Alexandre\_Minot](https://discourse.paraview.org/u/Alexandre_Minot)
#### Post date: [January 11, 2024, 2:53pm UTC](https://discourse.paraview.org/t/vtkmultiblockdataset-with-vtkunstructuredgrid-blueprint/13668/2 "2024-01-11T14:53:45Z")

</div>

What you are looking for can be done using the multimesh protocol of the blueprint: [ParaView-Catalyst Blueprint — ParaView Documentation 5.11.0 documentation](https://docs.paraview.org/en/latest/Catalyst/blueprints.html#protocol-multimesh)

Let me explain. The first element is that the ParaView Conduit source (the output of Conduit if you will) is a Partitioned Dataset Collection. This is the new internal data format of VTK, used in place of Multiblock Datasets. This collection is a flat collection of datasets, as in, you cannot create put them at different level in a tree. This is by design. Instead, a tree of labels is created along side your data to define the hierarchy of your data. This is called the assembly node. To view an example of this, in ParaView, use source → PartitionedDataSetCollectionSource then Filters → ExtractBlock and select Assembly in the property pane instead of Hierarchy. You will see the tree of labels, which in this example only has one level.

 ![image](https://discourse.paraview.org/uploads/default/original/2X/7/72621267327d33608c0546c364fddcd56eb40721.png)

Now back to Conduit. In your simulation code, you should put your data flat using the mesh blueprint, with one topology per object (one per wheel). You then create an assembly node in the blueprint containing the hierarchy of topology names.

Once on the ParaView side, each object can be extracted using the ExtractBlock filter and Assembly option.

[https://llnl-conduit.readthedocs.io/en/latest/blueprint\_mesh.html](https://llnl-conduit.readthedocs.io/en/latest/blueprint_mesh.html)

---

<div class="post-metadata">

### Author: ![Juan\_Jose\_Casafranca](https://discourse.paraview.org/user_avatar/discourse.paraview.org/juan_jose_casafranca/32/3499_2.png) [@Juan\_Jose\_Casafranca](https://discourse.paraview.org/u/Juan_Jose_Casafranca)
#### Post date: [January 11, 2024, 5:15pm UTC](https://discourse.paraview.org/t/vtkmultiblockdataset-with-vtkunstructuredgrid-blueprint/13668/3 "2024-01-11T17:15:27Z")

</div>

Thanks. So from the simulation code, I just need to create a multimesh conduit node, and that will be converted into a PartitionedDataSetCollection.

However, its not clear to me how I should fetch that from the python script. Do I need to use a TrivialProducer?

---

<div class="post-metadata">

### Author: ![Alexandre\_Minot](https://discourse.paraview.org/user_avatar/discourse.paraview.org/alexandre_minot/32/7132_2.png) [@Alexandre\_Minot](https://discourse.paraview.org/u/Alexandre_Minot)
#### Post date: [January 11, 2024, 5:41pm UTC](https://discourse.paraview.org/t/vtkmultiblockdataset-with-vtkunstructuredgrid-blueprint/13668/4 "2024-01-11T17:41:38Z")

</div>

Use ParaView to create your first Catalyst script. Load a result file from your simulation code, add a slice, then a VTPC extractor. Use file → save catalyst state. You will see that in the created python file, the file reader has been exported. That file reader has a registrationName=“something”. Replace the registration name content by the channel name you used on the simulation code side. Catalyst will use the Conduit channel instead of reading the file as the start of the pipeline.

Make sure you go through all the docs, as it can be a bit tricky to get started.

> [@How to try out Catalyst2](https://discourse.paraview.org/t/how-to-try-out-catalyst2/9008):
>
> Catalyst is an in-situ framework created as a part of ParaView a few years ago. With time and use, we saw the different drawbacks of our approach and then it was decided to create a new architecture, [Catalyst2](https://catalyst-in-situ.readthedocs.io/en/latest/index.html) With this new implementation, it is: easier to implement in your simulation (less knowledges required) easier to update from a version to another (less dependencies, binary compatibility) possible to activate Steering mode, where ParaView can modify simulation parameters at runtime A…

[https://catalyst-in-situ.readthedocs.io/en/latest/index.html](https://catalyst-in-situ.readthedocs.io/en/latest/index.html)

---

<div class="post-metadata">

### Author: ![Juan\_Jose\_Casafranca](https://discourse.paraview.org/user_avatar/discourse.paraview.org/juan_jose_casafranca/32/3499_2.png) [@Juan\_Jose\_Casafranca](https://discourse.paraview.org/u/Juan_Jose_Casafranca)
#### Post date: [January 11, 2024, 5:54pm UTC](https://discourse.paraview.org/t/vtkmultiblockdataset-with-vtkunstructuredgrid-blueprint/13668/5 "2024-01-11T17:54:39Z")

</div>

I have read the documentation several times and I still have doubts :-s  
Right now I am exporting my simulation results in a custom format, based on HDF. I am in the process of exporting it as VTKHDF, now that it supports transient data, but I haven’t finished that migration yet.

To test, I have added a WavefrontReader to load a .obj file. If I just replace the registrationName, it will try to load the Conduit channel as if it was a OBJ? In the case of my custom file format, how will that work? Which readers can be used with Catalyst?

---

<div class="post-metadata">

### Author: ![Alexandre\_Minot](https://discourse.paraview.org/user_avatar/discourse.paraview.org/alexandre_minot/32/7132_2.png) [@Alexandre\_Minot](https://discourse.paraview.org/u/Alexandre_Minot)
#### Post date: [January 11, 2024, 6:00pm UTC](https://discourse.paraview.org/t/vtkmultiblockdataset-with-vtkunstructuredgrid-blueprint/13668/6 "2024-01-11T18:00:17Z")

</div>

I’m not sure. My guess is that any reader will behave the same. The reader is essentially ignored by Catalyst and replaced by the ConduitSource. You could go through the vtk code and see if the Conduit Source has a python interface that you could use directly in the Catalyst script.

---

<div class="post-metadata">

### Author: ![Juan\_Jose\_Casafranca](https://discourse.paraview.org/user_avatar/discourse.paraview.org/juan_jose_casafranca/32/3499_2.png) [@Juan\_Jose\_Casafranca](https://discourse.paraview.org/u/Juan_Jose_Casafranca)
#### Post date: [January 11, 2024, 6:04pm UTC](https://discourse.paraview.org/t/vtkmultiblockdataset-with-vtkunstructuredgrid-blueprint/13668/7 "2024-01-11T18:04:18Z")

</div>

Okay! That was my main doubt, it is totally unclear how the data is fetched, in the different example in ParaView they use TrivialProducer, but I think this is not properly documented!

Do you know if its possible to remove the extractors? I dont really want to save anything to disk, my use case is to be able to watch the simulation while I am debugging the simulation code

---

<div class="post-metadata">

### Author: ![Alexandre\_Minot](https://discourse.paraview.org/user_avatar/discourse.paraview.org/alexandre_minot/32/7132_2.png) [@Alexandre\_Minot](https://discourse.paraview.org/u/Alexandre_Minot)
#### Post date: [January 11, 2024, 6:08pm UTC](https://discourse.paraview.org/t/vtkmultiblockdataset-with-vtkunstructuredgrid-blueprint/13668/8 "2024-01-11T18:08:16Z")

</div>

Yeah, if you activate the live visualization, you probably don’t need the extractors. The option to activate the live visualization is given when you export a Catalyst state from ParaView.

---

<div class="post-metadata">

### Author: ![Juan\_Jose\_Casafranca](https://discourse.paraview.org/user_avatar/discourse.paraview.org/juan_jose_casafranca/32/3499_2.png) [@Juan\_Jose\_Casafranca](https://discourse.paraview.org/u/Juan_Jose_Casafranca)
#### Post date: [January 11, 2024, 6:19pm UTC](https://discourse.paraview.org/t/vtkmultiblockdataset-with-vtkunstructuredgrid-blueprint/13668/9 "2024-01-11T18:19:25Z")

</div>

Thanks, I think I have understand how this works. Ill create another thread if I have other doubts.

I have run a simple test changing the Reader type (from FastUniformGrid that is used in a test to WavefrontOBJReader) and yeah, it just gets ignored and the source type is in both cases a Partioned Dataset
