| 26 | vtkMPICommunicatorOpaqueComm* Comm = nullptr; |
| 27 | |
| 28 | void BuildVTKGrid(Grid& grid) |
| 29 | { |
| 30 | // create the points information |
| 31 | vtkNew<vtkDoubleArray> pointArray; |
| 32 | pointArray->SetNumberOfComponents(3); |
| 33 | pointArray->SetArray( |
| 34 | grid.GetPointsArray(), static_cast<vtkIdType>(grid.GetNumberOfPoints() * 3), 1); |
| 35 | vtkNew<vtkPoints> points; |
| 36 | points->SetData(pointArray); |
| 37 | VTKGrid->SetPoints(points); |
| 38 | |
| 39 | // create the cells |
| 40 | size_t numCells = grid.GetNumberOfCells(); |
| 41 | VTKGrid->Allocate(static_cast<vtkIdType>(numCells * 9)); |
| 42 | for (size_t cell = 0; cell < numCells; cell++) |
| 43 | { |
| 44 | unsigned int* cellPoints = grid.GetCellPoints(cell); |
| 45 | vtkIdType tmp[8] = { cellPoints[0], cellPoints[1], cellPoints[2], cellPoints[3], cellPoints[4], |
| 46 | cellPoints[5], cellPoints[6], cellPoints[7] }; |
| 47 | VTKGrid->InsertNextCell(VTK_HEXAHEDRON, 8, tmp); |
| 48 | } |
| 49 | } |
| 50 | |
| 51 | void UpdateVTKAttributes(Grid& grid, Attributes& attributes, vtkCPInputDataDescription* idd) |
| 52 | { |
no test coverage detected