[Paraview] How to Average Transient Data
John Biddiscombe
biddisco at cscs.ch
Thu Aug 10 03:44:46 EDT 2006
Kent
I have got a vtkTemporalInterpolationFilter which is the first class in
what I hope will become a new pipeline model. It maintains a cache of
datasets each of which corresponds to a timestep of the data. It could
be simply modified to make it a vtkTemporalAveragingFilter which would
do what you want.
I've made some changes to the executives to support the temporal
requests - but am still only half finished and would like to spend
another couple of weeks on it before I put it on our public svn server.
Can you wait that long? (also If you have specific requests above your
initial email, then please ask)
The basic idea is that any Reader (or pipeline section) that is Time
enabled (currently my NetCDF, HDF5-Particle), plus Ensight, Exodus, vtk
xml I think(others?) will provide a requested timestep from the
available timesteps on disk/file. The TemporalPipeline manages the
RequestInformation and RequestData, RequestXXX phases by looping the
upstream pipeline and placing the data in a cache. The algorithm that
subclasses the TemporalPipeline can request TimeStep N (or more
preferably for example TIME_VALUE T=4.6), the pipeline will then loop
and fetch datasets from T=4, T=5 and produce an interpolated dataset
coresponding to T=4.6. The algorithm can request a timestep and let the
cache return it, generate it, or fetch it if not present. When a
timestep is requested which does not use any cache'd datasets, the
cache'd ones are dropped (could be modified to use a better algorithm
here such as MRU N datasets).
In the case of the TemporalAveragingFilter, you would override the
Algorithm to do an average instead of an interpolation, and also specify
how many datasets you need for each timestep. Averaging by 2,3,4....N
would require only one parameter change.
I will experiment by implementing the averaging algorithm.
One catch. The whole process is going to be unstable if the datasets
change geometry between timesteps. Currently, I can average all the
scalars and points, if they are invariant under the number present in
each timestep. If they change betweeen steps, then we are in trouble.
I will keep you informed of progress and send code as soon as I'm
confident that all is working stably.
JB
More information about the ParaView
mailing list