[Paraview] co-processing script with two datasource ...

Andy Bauer andy.bauer at kitware.com
Tue Jun 23 00:14:14 EDT 2015


Hi,

You should look at the section on vtkCPDataDescription in the Catalyst
User's Guide (
http://www.paraview.org/files/catalyst/docs/ParaViewCatalystUsersGuide_v2.pdf).


You're adaptor code should look like:
    datadescription = vtkCoProcessorPython.vtkCPDataDescription()
    datadescription.SetTimeData(time, step)

    datadescription.AddInput("AtmData1")
    datadescription.AddInput("AtmData2")
    if cpscript.RequestDataDescription(datadescription) == 0:
       return
    inputdesc1 = datadescription.GetInputDescriptionByName("AtmData1")
    inputdesc2 = datadescription.GetInputDescriptionByName("AtmData2")
     if inputdesc1.GetIfGridIsNecessary() == True:
        inputdesc1.SetGrid(grid1)

   if inputdesc2.GetIfGridIsNecessary() == True:
       inputdesc2.SetGrid(grid2)

    cpscript.DoCoProcessing(datadescription)

On Mon, Jun 22, 2015 at 3:23 PM, <u.utku.turuncoglu at be.itu.edu.tr> wrote:

> Hi,
>
> Thanks for your help. The driver is running with following code,
>
>     datadescription = vtkCoProcessorPython.vtkCPDataDescription()
>     datadescription.SetTimeData(time, step)
>
>     datadescription.AddInput("AtmData1")
>     cpscript.RequestDataDescription(datadescription)
>     inputdesc1 = datadescription.GetInputDescriptionByName("AtmData1")
>     if inputdesc1.GetIfGridIsNecessary() == False:
>         return
>     inputdesc1.SetGrid(grid1)
>
>     datadescription.AddInput("AtmData2")
>     cpscript.RequestDataDescription(datadescription)
>     inputdesc2 = datadescription.GetInputDescriptionByName("AtmData2")
>     if inputdesc2.GetIfGridIsNecessary() == False:
>         return
>     inputdesc2.SetGrid(grid2)
>
>     cpscript.DoCoProcessing(datadescription)
>
> So, i just need to replace input with AtmData1 and AtmData2 to match with
> coprocessing script. I think that the input port names must watch with the
> names with driver code.
>
> Thanks again,
> Regards,
>
> --ufuk
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/paraview/attachments/20150623/2dbf1727/attachment.html>


More information about the ParaView mailing list