[Paraview] Stupid question on Programmable Source

Dennis Conklin dennis_conklin at goodyear.com
Thu Oct 22 15:14:08 EDT 2015


All,

So I have these text files that I want to read in to create an unstructured grid and associated variables.   So far I have the mesh and I am now struggling with how to efficiently assign the element variables.

The variable file looks like this:

Element 1
97 variables listed

Element 2
97 variables listed
...

So, I have a set of variables which is 97 x number of Elements.

And I have a list which contains the Names of all the 97 variables.

Initially I thought I would read them into a giant array of [97,NumElems].   Then, I thought I would then assign them to elements with something like
output.GetCellData().append(GiantArray[i:],VariableName[i])

However, there is no append to Cell Data in Programmable source that I can find so now I am looking at creating 97 vtk.vtkFloatArrays, setting the name of each, setting the number of components of each, setting the number of tuples of each and then calling output.GetCellData().AddArray() 97 times.

What am I missing to make this all more efficient??

Would it be more efficient make this a Programmable Filter instead (with no input?) so that I can use the CellData.append?

Any suggestions gratefully accepted

Dennis
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/paraview/attachments/20151022/362624f0/attachment.html>


More information about the ParaView mailing list