(Replying back to the ParaView mailing list because, contrary to popular 
opinion, I don't know everything. :)

Now that I'm looking at it, implementing this in ParaView is a bit harder than 
I originally thought.  However, it is pretty easy to write a VTK (not ParaView) 
Python script to convert the one data set to a series of data files.  I have 
attached such a script.  You need to run this with vtkpython (as opposed to, 
say pvpython or in the ParaView GUI).  I'm not sure if this executable comes 
with the ParaView binaries, but it definitely something that is built from the 
ParaView source.

The "right" way to implement this would be to create a new reader for ParaView 
that used the vtu format and the odd array-name-is-time convention.  It should 
be pretty trivial for a developer, but not something I would want to be 
someone's first experience with ParaView.

-Ken


On 4/15/10 8:24 PM, "wast...@gmail.com" <wast...@gmail.com> wrote:

By the way I attached the original data. Let me know what's your take on that, 
if you had a chance to take a look. Thanks!



On Thu, Apr 15, 2010 at 9:18 PM,  <wast...@gmail.com> wrote:
Thanks for the reply.

Now I am thinking to split the original vtu file to a series of vtu files 
according time series,

I can use the reader to get the data info as follow,
reader=XMLUnstructuredGridReader(FileName=fname);

when writing each individual vtu file, I need to delete other variables except 
the one corresponding to current time instance. Now the problem is that I can 
not get the data, all I got from the reader is data information. Do you know 
how to change the data structure of reader so 
XMLUnstructureedGridWriter(Input=reader,FileName=fname) can be used to generate 
the new files?

I am totally new to Paraview, and any suggestions is welcome.

Thanks,

Ken



On Thu, Apr 15, 2010 at 3:20 PM, Moreland, Kenneth <kmo...@sandia.gov> wrote:
>
> ParaView has no direct mechanism to recognize those multiple variables as a 
> time series.  The most straightforward way to do something like that would be 
> to create a filter that reports a time series based on the variables it 
> encounters in RequestInformation and then selects the appropriate variable 
> (with proper name change) in RequestData.
>
> Unless you are already developing C++ plugins, the quickest way to develop 
> such a filter would be to use the Python programmable filter.
>
> http://www.paraview.org/Wiki/Python_Programmable_Filter
>
> -Ken
>
>
> On 4/14/10 7:09 PM, "wast...@gmail.com" <wast...@gmail.com> wrote:
>
> Hi,
>
> I am dealing with a set of data with vtu format. There is a variable changing 
> over time, but somehow its value was stored separately at each time instance 
> and with different variable names. Say the variable is x, and at each time 
> instance its value was stored with x_001, x_002,x_003,....x_100. So now I am 
> wondering how to combine these to a single variable x with time indices in 
> Paraview. Your input is highly appreciated!
>
> Ken
>
>
>
>
>    ****      Kenneth Moreland
>     ***      Sandia National Laboratories
> ***********
> *** *** ***  email: kmo...@sandia.gov
> **  ***  **  phone: (505) 844-8919
>     ***      web:   http://www.cs.unm.edu/~kmorel 
> <http://www.cs.unm.edu/%7Ekmorel>
>





   ****      Kenneth Moreland
    ***      Sandia National Laboratories
***********
*** *** ***  email: kmo...@sandia.gov
**  ***  **  phone: (505) 844-8919
    ***      web:   http://www.cs.unm.edu/~kmorel

Attachment: TimeConvert.py
Description: TimeConvert.py

_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the ParaView Wiki at: 
http://paraview.org/Wiki/ParaView

Follow this link to subscribe/unsubscribe:
http://www.paraview.org/mailman/listinfo/paraview

Reply via email to