CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   ParaView (https://www.cfd-online.com/Forums/paraview/)
-   -   [General] Reading array in data structure in paraview with vtkMultiBlock (https://www.cfd-online.com/Forums/paraview/192960-reading-array-data-structure-paraview-vtkmultiblock.html)

gafxian87 September 14, 2017 07:47

Reading array in data structure in paraview with vtkMultiBlock
 
1 Attachment(s)
Hello all,

I would like to ask if there is an a priori way of knowing how many blocks there are in a vtkMultiBlockDataSet data structure in order to access an array.I'm using an in house tool. So I do an operation and I want to retrieve the following array (Field Data):

CalculatorOrig_seal =CalculatorOrig(Input=extractblock_seal) *this is a pyton filter
CalculatorOrig_seal.FieldData = ['MM absolute total temperature']


rawData = paraview.servermanager.Fetch(rRCalculatorOrig_seal )

So with much trial an error (going over the blocks) I find that:

rawData.GetBlock(3).GetBlock(0).GetFieldData().GetA rray('MM absolute total temperature').GetValue(0)

Gives me the value I need, so is there a way to know a priori how many blocks there are from this rather large data structure (which is attached). Any help is much appreciated!!!

Thanks


All times are GMT -4. The time now is 11:08.