CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   ParaView (http://www.cfd-online.com/Forums/paraview/)
-   -   servermanager.Fetch() vs CellArrays.Available (http://www.cfd-online.com/Forums/paraview/118461-servermanager-fetch-vs-cellarrays-available.html)

A_kenny_A May 28, 2013 05:58

servermanager.Fetch() vs CellArrays.Available
 
I am trying to map a variable onto a stl file with ResampleWithDataset with a Python-Script (client – server). The problem is that it always maps all the variables (I have 25). One variable takes about 2 minutes and because of that resamplewithdataset takes about 60minutes.
So I have tried to load only the desired variables:
Mesh = OpenFOAMReader()
Mesh.FileName = “…case.foam”
Mesh.CellArrays = [“U”, “p”]
UpdatePipeline()
Now I check which variables are loaded:
Mesh.CellArrays.Available
>>> [“U”,”p”]
this is ok. But if I check the vtkMultiblockDataset I see that all variables are loaded:

data = servermanager.Fetch(Mesh)
print data
>>>
…
Cell Data:
Debug:Off
ModifiedTime:560721
Reference Count:1
RegisteredEvents(none)
Number Of Arrays: 24
Array 0 name = U
Array 1 name = p
(...)
Array 22 name = UMean
Array 23 name = pMean …
How can I avoid to load all variables? Or how can I define, that only one variable is mapped?


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