[Paraview] CoProcessing needed fields

Tim Gallagher tim.gallagher at gatech.edu
Wed Nov 7 14:57:43 EST 2012


Hi,

I see in the example code for ParaView/CoProcessing/Adaptors/FortranAdaptors/PhastaAdaptor/PhastaAdaptor.cxx calls like:

  vtkCPInputDataDescription* idd =
    ParaViewCoProcessing::GetCoProcessorData()->GetInputDescriptionByName("input");

  ...

  if(idd->IsFieldNeeded("velocity"))
  {
  ...

The only way IsFieldNeeded returns true is if that name field was added with AddCellField or AddPointField. 

Where does that happen? My intuition says that the python or C++ processing script (generated by exporting state) would have those calls in it for the datasets that are actually used. In other words, if I set up my view in the GUI and I load my data and put a Slice through it and color by "Velocity", I expected the script from Export State to contain a call to AddCellField("Velocity"). At the very least I expected to see calls to add the fields I chose to load when I loaded my sample file to set up the view. 

So is that something that I need to put in the script on my own after it's exported or did I miss something? If I have to put it there myself, is RequestDataDescription the correct place to put that?

Thanks,

Tim


More information about the ParaView mailing list