[Paraview] How to insert annotate time info into catalyst?

Andy Bauer andy.bauer at kitware.com
Wed Jan 24 16:56:56 EST 2018


Hi Seongmo,

Please keep the conversations on the mailing list so that anyone can follow
along or participate. Also, these types of things often get lost in my
inbox when they don't make it back to the ParaView mailing list.

What version of ParaView Catalyst are you using? I think the annotate time
filter should work with Catalyst but I haven't verified that. I vaguely
remember others using that filter with Catalyst though. Also, I think the
colormap bug was fixed. If you have a way of sharing a sample that
demonstrates either of those bugs I can try taking a look at the issue.

Best,
Andy

On Thu, Jan 18, 2018 at 6:40 PM, Seong Mo Yeon <seongmo.yeon at gmail.com>
wrote:

> Dear Andy Bauer
>
> I have a quick question.
> Is it possible to have annotate time filter processed in catalyst adaptor?
> Current my code cannot that filter.
>
> BTW, image extracted from catalyst looks different from render view of
> paraview at the time of writing a script. e.g., pressure colormap legend is
> missing.
>
> Regards
> Seongmo
>
> On 2018년 1월 18일 AM 1:17 +0900, Andy Bauer <andy.bauer at kitware.com>, wrote:
>
> Hi,
>
> My guess is that the TimeStep isn't getting set properly in the adaptor
> (though it looks like it should be in "dataDescription->SetTimeData(runTime.value(),
> runTime.deltaTValue());"). My suggestion would be to add in the following
> to either the RequestDataDescription() or DoCoProcessing() methods in the
> python script to see what Catalyst thinks the time step is:
>     print("In script2.py, the data time step is ",
> datadescription.GetTimeStep())
>
>
> On Wed, Jan 17, 2018 at 9:57 AM, SeongMo <seongmo.yeon at gmail.com> wrote:
>
>> Hi,
>>
>> I wrote a OpenFOAM adaptor for Catalyst.
>>
>> In the ParaView, the connection is made good and shows filtered flow
>> field as written in the python script.
>>
>> However, filename_%t and image_%t is not expanded as time marching but
>> just write filename_0 and image_0.png.
>>
>> As far as I know, %t should be replaced with current time as given in
>> dataDescription->SetTimeData.
>>
>> Any help would be appreciated.
>>
>>
>> FYI, python script is attached and snippet of my OpenFOAM Adaptor code
>> for Catalyst is as follows:
>>
>> // icoFoam.C
>>
>> #ifdef USE_CATALYST
>>     Foam::HashTable<string> options = args.options();
>>     IStringStream is(options["scriptList"]);
>>     wordList scriptList = readList<word>(is);
>>     OFAdaptor::Initialize(scriptList, mesh);
>> #endif
>>     while (runTime.loop())
>>     {
>>         runTime.write();
>> #ifdef USE_CATALYST
>>         OFAdaptor::CoProcess(mesh, runTime);
>> #endif
>>     }
>> #ifdef USE_CATALYST
>>     OFAdaptor::Finalize();
>> #endif
>>
>>
>> // OFAdaptor.C
>>
>> void CoProcess(Foam::fvMesh& mesh, Foam::Time& runTime)
>> {
>>        vtkNew<vtkCPDataDescription> dataDescription;
>>        dataDescription->AddInput("input");
>>        dataDescription->SetTimeData(runTime.value(),
>> runTime.deltaTValue());
>>        if (runTime.end())
>>        {
>>            // assume that we want to all the pipelines to execute
>>            // if it is the last time step
>>            dataDescription->ForceOutputOn();
>>        }
>>        if (Processor->RequestDataDescription(dataDescription.GetPointer())
>> != 0)
>>        {
>>            Foam::polyMesh::readUpdateState meshState = mesh.readUpdate();
>>
>>            if(meshState != Foam::polyMesh::UNCHANGED)
>>            {
>>                BuildVTKGrid(mesh);
>>            }
>>            UpdateVTKAttributes(mesh);
>> dataDescription->GetInputDescriptionByName("input")->SetGrid
>> (multiBlockDataSet);
>>            Processor->CoProcess(dataDescription.GetPointer());
>>        }
>> }
>>
>>
>> --
>> SeongMo Yeon, Ph.D, Senior Engineer
>> Offshore Hydrodynamics Research
>> SAMSUNG HEAVY INDUSTRIES CO., LTD.
>> Central Research Institute
>> E-mail : seongmo.yeon at gmail.com
>> Tel :
>> --------------------------------------------------------
>> Fluctuat nec mergitur
>>
>>
>> _______________________________________________
>> 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
>>
>> Search the list archives at: http://markmail.org/search/?q=ParaView
>>
>> Follow this link to subscribe/unsubscribe:
>> https://paraview.org/mailman/listinfo/paraview
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://paraview.org/pipermail/paraview/attachments/20180124/4d444931/attachment.html>


More information about the ParaView mailing list