| 136 | } |
| 137 | |
| 138 | void CoProcess( |
| 139 | Grid& grid, Attributes& attributes, double time, unsigned int timeStep, bool lastTimeStep) |
| 140 | { |
| 141 | vtkNew<vtkCPDataDescription> dataDescription; |
| 142 | dataDescription->AddInput("input"); |
| 143 | dataDescription->SetTimeData(time, timeStep); |
| 144 | if (lastTimeStep == true) |
| 145 | { |
| 146 | // assume that we want to all the pipelines to execute if it |
| 147 | // is the last time step. |
| 148 | dataDescription->ForceOutputOn(); |
| 149 | } |
| 150 | if (Processor->RequestDataDescription(dataDescription) != 0) |
| 151 | { |
| 152 | vtkCPInputDataDescription* idd = dataDescription->GetInputDescriptionByName("input"); |
| 153 | BuildVTKDataStructures(grid, attributes, idd); |
| 154 | idd->SetGrid(VTKGrid); |
| 155 | int wholeExtent[6]; |
| 156 | for (int i = 0; i < 3; i++) |
| 157 | { |
| 158 | wholeExtent[2 * i] = 0; |
| 159 | wholeExtent[2 * i + 1] = grid.GetNumPoints()[i] - 1; |
| 160 | } |
| 161 | |
| 162 | dataDescription->GetInputDescriptionByName("input")->SetWholeExtent(wholeExtent); |
| 163 | Processor->CoProcess(dataDescription); |
| 164 | } |
| 165 | } |
| 166 | } // end of Catalyst namespace |
no test coverage detected