[Paraview] How to use calculate weighted sum of given timesteps in paraview?

程迪 chengdi123000 at gmail.com
Sat Apr 25 11:56:12 EDT 2015


Dear all,

I am doing proper orthogonal decomposition on a openfoam data set. The last
step is to calculate the weighted sum of given timesteps of the dataset.
But I found it is very difficult to do it in programmable filter because of
3 reasons:

1. In programmable filter it is difficult to pass weight vector to the
Script;
2. In script of programmable filter, the locals() returns: [self, inputs,
output, request], in which *self *is vtkPythonProgrammableFilter, *inputs *is
a list of CompositeDataSet, *output *is CompositeDataSet, and *request
*is vtkInformation.
I do not know how to use it; And according to the blog [
http://berkgeveci.github.io/2014/09/02/programmable-filter/], I cannot loop
over all timesteps in vtkPythonProgrammableFilter; The author of the blog
recommend using vtkPythonAlgorithm, but
3. I do not know how to use vtk filters such as vtkPythonAlgorithm in
paraview.

I have tried some methods. But none of them worked.
I tried to find how TemporalStatistics filter is implemented.
I referred the code in this pipermail [
http://www.paraview.org/pipermail/paraview/2009-March/011443.html], it does
not request different timestep. But only used timestep values passed with
inputs;

I read this article on wiki[http://www.paraview.org/Wiki/Time_in_ParaView].
But I am still confused. I tried >>>reader1.UpdatePipeline(t1)
>>>reader2.UpdatePipeline(t2)
The information tab in paraview shows different "Current  data time" in
reader1 and reader2. But if I use ProgrammableFilter to use reader1 and
reader2 as inputs, it seems that the result is controlled by VCR time on
the top of paraview GUI.

Some more frustrating problem is because of the complexity of
proxies/servermanager structure of paraview, I cannot access the vtk Object
behind of paraview proxies. Even if I can write a vtk class in python like
what Berk Geveci did in his blog [
http://berkgeveci.github.io/2014/11/09/streaming-time/], I cannot use it in
paraview directly.

My question is:
What can I do next to calculate weighted sum of given timesteps in paraview?

Thanks.

Di CHENG

Institute of Mechanics, Chinese Academy of Sciences
No.15 Beisihuanxi Road, Beijing (100190)
P. R. China
E-mail: chengdi at imech.ac.cn
Tel.: +86-15801594911
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/paraview/attachments/20150425/8714c7c2/attachment.html>


More information about the ParaView mailing list