With a linear list of mesh items, the selection is becoming absolutely crazy and if we also wish to have proper support for selecting cell-zones, we are going to need a hierarchical selection or risk have something completely unusable (partial example below). Adding zones and set names into to the selection list, will add even more.
In itself, this is not a roadblock for further development of the reader, but it would be nice to get out of the way. The next stage will probably need to entail replacing the current multiblock with a data assembly, partitioned data set etc.
Currently, the frontend to the OpenFOAM reader is vtkPOpenFOAMReader. For the parallel decomposed cases, each processor entry is treated as a separate multiblock dataset and then these are all composed together. If I use the older terminology, I think that each of these individual readers should be populating part of a multipiece dataset. This becomes even more important if we want to read the OpenFOAM collated file format, in which we lose the one-to-one correspondence of reader to data block. As the current worst case example, we would have a collated format that is partially segregated by ranks:
processors24_0-11
processors24_12-24
To be efficient, this would spin off two readers, each populating 12 pieces of the output.
After this type of reworking, I think that it would also make sense to have a closer correspondence between user selection and the output topology. It should certainly make the internals easier to follow.
In theory, I think we can piggy back on the DataAssembly + selectors concept to add support for block selection on readers. A few code changes will be needed in ParaView:
add support for an “information property” that can return a vtkDataAssembly. Currently, we only support obtaining it as part of data information … thus suitable for filters like Extract Block where the widget is using input’s data information.
Update vtkSMDataAssemblyDomain to use assembly from an information property rather than input’s data information.
I know that it won’t just happen immediately, but sounds promising. I hope that after the 5.9.0 release is done and dusted, it will possible to change the OpenFOAM reader ABI as well. It looks like we may need some reworking of how times are handled, plus a different composition. When we get that far, will open a gitlab issue for communication.
Sounds good. Also worth adding to the list is using PartitionedDataSetCollection + DataAssembly instead of multiblock dataset as the output. Actively working on getting this new dataset type working right now so more things coming in that regard.
Is there a particular branch that I can monitor (to get a general idea of how it looks)? Or still only local to your machine?
You probably already thought of this, but adding a tree selector to the vtm reader (and vtm.series by extension?) could provide a smallish reference implementation for other readers to follow.
Interesting thought. The XML readers in VTK need to be reworked, IMO. This would make sense to do for sure when we do that. The rework is not on the radar right now since it’s a big undertaking, but I definitely want to see the XML readers simplified.
Yes, I think this I can do as part the code developments needed to support use of data assembly for block selection by readers.
Hi @utkarsh.ayachit - Is there now also somewhere to look in the paraview code for implementing/using this selector? I have a MR 7602 ongoing. Would really benefit from improving the selector mechanism soon.
here’s the MR 4694. See the new class pqDataAssemblyPropertyWidget. This is pqPropertyWidget created for properties with vtkSMDataAssemblyDomain. This domain currently only works with data-assembly provided by input’s data information (vtkPVDataInformation). This domain will need to be extended to support working with an “information-only” property instead. Next we’ll need to add a mechanism for an information-only property to fetch vtkDataAssembly to the client from the reader. Those are the items that I’ll need to put together before you can use it in your reader.
The Extract Block filter, in this MR, works with selectors so would be a good starting point to see how the selectors are described/work etc.
haha! Sorry! It has grown into a massive change, unfortunately. I’ve tried to organize commits logically, so it should help unravel the complexity a bit.
@olesenm, I just added support to the IOSS reader to allow selection blocks using assembly, in addition to simply the block names. Here are the relevant changes:
The user can select blocks by name or instead use the assembly to choose the ones the reader. The reader reads all blocks either explicitly enabled or enabled via the assembly.
The Assembly Selector looks just like the right thing. I guess it would just be a matter of xml definitions to make the Block selector an advanced (hidden) panel.
Indeed. In IOSS, the assembly information is sometimes not available. So I’ve setup the hints to hide the widget when that’s the case. But you can set it up to be shown as advanced always for your reader.