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

Cornelis Bockemühl cornelis.bockemuehl at gmail.com
Wed Mar 21 06:03:11 EDT 2018


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::SafeDownCas
t(info->Get(vtkDataObject::DATA_OBJECT()));

    double reqTime = 0.;

    if(info->Has(vtkStreamingDemandDrivenPipeline::UPDATE_TIME_STEP()))

        reqTime = info->Get(vtkStreamingDemandDrivenPipeline::UPDATE_TI
ME_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_STE
P()))

        {

            double ot = oinfo->Get(vtkStreamingDemandDrivenPipeline::UP
DATE_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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://public.kitware.com/pipermail/paraview-developers/attachments/20180321/2122d279/attachment.html>


More information about the Paraview-developers mailing list