MCPcopy Create free account
hub / github.com/Kitware/ParaView / CatalystCoProcess

Function CatalystCoProcess

Examples/Catalyst/CFullExample2/FEAdaptor.cxx:106–134  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

104}
105
106void CatalystCoProcess(unsigned int numberOfPoints, double* pointsData, unsigned int numberOfCells,
107 unsigned int* cellsData, double* velocityData, float* pressureData, double time,
108 unsigned int timeStep, int lastTimeStep)
109{
110 vtkCPProcessor* processor = vtkCPAdaptorAPI::GetCoProcessor();
111 vtkCPDataDescription* dataDescription = vtkCPAdaptorAPI::GetCoProcessorData();
112 if (processor == nullptr || dataDescription == nullptr)
113 {
114 std::cerr << "ERROR: Catalyst not properly initialized.\n";
115 return;
116 }
117
118 dataDescription->AddInput("input");
119 dataDescription->SetTimeData(time, timeStep);
120 if (lastTimeStep == true)
121 {
122 // assume that we want to all the pipelines to execute if it
123 // is the last time step.
124 dataDescription->ForceOutputOn();
125 }
126 if (processor->RequestDataDescription(dataDescription) != 0)
127 {
128 vtkCPInputDataDescription* idd = dataDescription->GetInputDescriptionByName("input");
129 BuildVTKDataStructures(
130 idd, numberOfPoints, pointsData, velocityData, numberOfCells, cellsData, pressureData);
131 idd->SetGrid(VTKGrid);
132 processor->CoProcess(dataDescription);
133 }
134}
135
136void CatalystFinalize()
137{ // Used to free grid if it was used

Callers 1

mainFunction · 0.70

Calls 8

GetCoProcessorFunction · 0.85
GetCoProcessorDataFunction · 0.85
SetTimeDataMethod · 0.80
BuildVTKDataStructuresFunction · 0.70
AddInputMethod · 0.45
CoProcessMethod · 0.45

Tested by

no test coverage detected