[Paraview] Temporal shift with Python Programmable Filter

Eric Monson emonson at cs.duke.edu
Tue Feb 5 13:05:33 EST 2008


Maybe this shows the point you're trying to make? -- I can see that  
when the output of the PPF is a copy of the Shift = 0 point, the PPF  
executes every time I step the time forward or backwards. If the  
output of the PPF is a copy of the Shift = 1 point, then the PPF  
executes every time I step forward, but only executes every other time  
I click the time backwards. (I'm probing this by printing the output  
of GetUpdateTime(), and nothing prints out in the console every other  
time step.)

I'm trying to re-read your idea and see whether I really understand  
it... Are you talking about the data time steps matching, or the  
UpdateTime matching, so the pipeline doesn't know to update itself?

Okay, now it's starting to work both directions -- This is really  
bugging me, because problems seem to start or end for no apparent  
reason... Ugh. Things are reproducible if I've just freshly built the  
pipeline from scratch, but after working with it for a while problems  
come and go.

It must be something about copying the data and how changes get  
propagated up or downstream...

Let me know if you get any more ideas,
-Eric


On Feb 5, 2008, at 12:03 PM, Moreland, Kenneth wrote:

> This is a total guess, but maybe it has something to do with the  
> time value placed in the data set.  Data objects often hold the time  
> value on which they are supposed to be defined.  Maybe when you copy  
> the shifted data, its time value is also shifted.  When you then  
> step the time, the new time now matches the shifted time from the  
> last time update.  Perhaps the pipeline sees the time match and does  
> not update the pipeline.
>
> -Ken
>
>> -----Original Message-----
>> From: paraview-bounces+kmorel=sandia.gov at paraview.org [mailto:paraview-
>> bounces+kmorel=sandia.gov at paraview.org] On Behalf Of Eric Monson
>> Sent: Monday, February 04, 2008 10:11 AM
>> To: ParaView List
>> Subject: [Paraview] Temporal shift with Python Programmable Filter
>>
>> Hey All,
>>
>> This may seem like an odd question, but I think the answer may help
>> clarify a larger problem I'm having...
>>
>> I'm trying to calculate the velocity vectors for diffusing particles,
>> and the way I'm doing it right now is to feed two copies of my
>> Unstructured Grid data into the Python Programmable Filter (PPF). The
>> first copy has a time shift of 0, and the second one has Shift = 1.
>> These are both Temporal Data Sets, and so I've been accessing the
>> underlying Unstructured Grids by doing this:
>>
>> in0 = self.GetInputDataObject(0,0).GetDataSet(0,0)
>> in1 = self.GetInputDataObject(0,1).GetDataSet(0,0)
>>
>> I force the PPF output to vtkUnstructuredGrid, and I have been making
>> the output equivalent to one of the input points like so:
>>
>> out1 = self.GetOutput()
>> out1.DeepCopy(in1)
>>
>> (In the complete calculation I later add a vtkFloatArray to "out1"
>> containing the calculated velocity vectors.)
>>
>> The odd thing I see is that if the output is a copy of the Shift = 0
>> point, I can increment time forward and backwards (arrow click on  
>> Time
>> control) and everything looks fine. If the output is a copy of the
>> Shift = 1 point, then on every other click it increments, and on the
>> other clicks it doesn't move or change its scalar values. (If Shift =
>> -1, then it increments properly backwards, but not forwards.)
>>
>> Is there some sort of update forcing I should be doing that I'm not?
>> Is this an unreliable way of accessing the data from within the
>> Temporal Data Sets?
>>
>> (I seemingly randomly get cases where my calculated velocity vector
>> goes to zero and won't snap out of it unless I rebuild the whole
>> pipeline from scratch, so I'm hoping I'm just doing something wrong
>> here...)
>>
>> Thanks for the help,
>> -Eric
>>
>> -----------------------------------------------------
>> Eric E. Monson
>> Duke Visualization Technology Group
>>
>>
>> _______________________________________________
>> ParaView mailing list
>> ParaView at paraview.org
>> http://www.paraview.org/mailman/listinfo/paraview
>



More information about the ParaView mailing list