[Paraview-developers] Timing - once more...

Utkarsh Ayachit utkarsh.ayachit at kitware.com
Wed Mar 21 08:36:27 EDT 2018


Cornelis,

The `request` vtkInformation object passed to the any of the
Request<foo>() methods on an algorithm has a key named
vtkExecutive::FROM_OUTPUT_PORT() which indicates which port that
request is coming from. Use that determine what time is being
requested in the current pass. Yes, VTK indeed updates the pipelines
that fan out separately for each output port with the update request
coming down each fanned out branch.

Utkarsh

p.s Berk has a series of blogs that is a good read to understand the
VTK pipeline

https://blog.kitware.com/?p=12491
https://blog.kitware.com/?p=12489
https://blog.kitware.com/?p=12480

On Wed, Mar 21, 2018 at 6:03 AM, Cornelis Bockemühl
<cornelis.bockemuehl at gmail.com> wrote:
> Dear all,
>
> My previous question regarding time series and MTime seems to be fixed now
> (including the memory issues!), but there is still a problem that is
> obviously really related to animation sequence time handling and which I
> also need to eventually address. The symptom was that my different output
> views (render view, table view) in ParaView were often not really all
> correctly synchronized with the time that I set in the time selector in the
> toolbar.
>
> The code that I put into RequestInformation basically defines the timesteps
> for all output ports: I posted it in my previous question and Utkarsh
> Ayachit considered it so far ok.
>
> Now in my RequestData function I am retrieving the required time with the
> following code:
>
>     info = outputVector->GetInformationObject(0);
>
>     vtkUnstructuredGrid* outFullGrid =
> vtkUnstructuredGrid::SafeDownCast(info->Get(vtkDataObject::DATA_OBJECT()));
>
>     double reqTime = 0.;
>
>     if(info->Has(vtkStreamingDemandDrivenPipeline::UPDATE_TIME_STEP()))
>
>         reqTime =
> info->Get(vtkStreamingDemandDrivenPipeline::UPDATE_TIME_STEP());
>
>
> In other words: I am referring to the info object for the first output port
> (which happens to refer to an unstructured grid). This always worked for my
> simple test cases, and "often" it also works now with the more complex setup
> with many output ports. BUT: it should ALWAYS work! And first of all: It
> should never simply "stick to some time" - no matter what I do in the time
> selection toolbar!
>
> For testing purposes I added the following code into my RequestData - in
> order to see whether the time step is the same for all the ports:
>
>     std::cout << "SEE WHICH TIMES I GET FROM OUTPUT INFOS" << std::endl;
>
>     for(int op = 0; op < GetNumberOfOutputPorts(); ++op)
>
>     {
>
>         vtkInformation* oinfo = outputVector->GetInformationObject(op);
>
>         if(oinfo->Has(vtkStreamingDemandDrivenPipeline::UPDATE_TIME_STEP()))
>
>         {
>
>             double ot =
> oinfo->Get(vtkStreamingDemandDrivenPipeline::UPDATE_TIME_STEP());
>
>             std::cout << "output port " << op << " has time " << ot <<
> std::endl;
>
>         }
>
>         else
>
>         {
>
>             std::cout << "output port " << op << " has no time" <<
> std::endl;
>
>         }
>
>     }
>
>
> The amazing finding is: no, you do NOT always get the same time for all the
> output port! By turning the view for different output ports on and off and
> also moving a little up and down along the time axis, this is a typical kind
> of output from the above test code:
>
> SEE WHICH TIMES I GET FROM OUTPUT INFOS
>
> output port 0 has time 0.05
>
> output port 1 has time 0.1
>
> output port 2 has time 0.05
>
> output port 3 has time 0.2
>
> output port 4 has time 0.05
>
> output port 5 has time 0.2
>
> output port 6 has time 0.2
>
> output port 7 has time 0.2
>
>
> Obviously this is not very consitent! The time step that is displayed in the
> timer tool bar is 0.1 at the same moment (so obviously not even the last
> move from 0.05 to 0.1 triggered a call to RequestData), and what I was
> trying to watch was the output from port 4.
>
> Basically I see that ParaView is that either I am missing still some more
> checking to find out which of the output port times are really the valid
> ones, or ParaView is trying to do some optimizations that are not fitting
> with my "simplistic approach" of just getting the time from output port 0 -
> or both.
>
> Any helpful hints on that one?
>
> Thanks for all and regards,
> Cornelis
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Search the list archives at:
> http://markmail.org/search/?q=Paraview-developers
>
> Follow this link to subscribe/unsubscribe:
> https://public.kitware.com/mailman/listinfo/paraview-developers
>


More information about the Paraview-developers mailing list