------------------------------------------------------------------------------
| 950 | |
| 951 | //------------------------------------------------------------------------------ |
| 952 | void vtkTecplotReader::GetStructuredGridFromPointPackingZone(int iDimSize, int jDimSize, |
| 953 | int kDimSize, int zoneIndx, const char* zoneName, vtkMultiBlockDataSet* multZone) |
| 954 | { |
| 955 | if (!zoneName || !multZone) |
| 956 | { |
| 957 | vtkErrorMacro("Zone name un-specified or nullptr vtkMultiBlockDataSet."); |
| 958 | return; |
| 959 | } |
| 960 | |
| 961 | if (jDimSize == 1 && kDimSize == 1) |
| 962 | { |
| 963 | this->Internal->TopologyDim = vtkMath::Max(this->Internal->TopologyDim, 1); |
| 964 | } |
| 965 | else if (kDimSize == 1) |
| 966 | { |
| 967 | this->Internal->TopologyDim = vtkMath::Max(this->Internal->TopologyDim, 2); |
| 968 | } |
| 969 | else |
| 970 | { |
| 971 | this->Internal->TopologyDim = vtkMath::Max(this->Internal->TopologyDim, 3); |
| 972 | } |
| 973 | |
| 974 | // number of points, number of cells, and dimensionality |
| 975 | int numNodes = iDimSize * jDimSize * kDimSize; |
| 976 | int gridDims[3] = { iDimSize, jDimSize, kDimSize }; |
| 977 | |
| 978 | // Create vtkPoints and vtkStructuredGrid and associate them |
| 979 | vtkPoints* pntCords = vtkPoints::New(); |
| 980 | vtkStructuredGrid* strcGrid = vtkStructuredGrid::New(); |
| 981 | this->GetArraysFromPointPackingZone(numNodes, pntCords, strcGrid->GetPointData()); |
| 982 | strcGrid->SetDimensions(gridDims); |
| 983 | strcGrid->SetPoints(pntCords); |
| 984 | pntCords->Delete(); |
| 985 | pntCords = nullptr; |
| 986 | |
| 987 | if ((this->Internal->TopologyDim == 2 || this->Internal->TopologyDim == 3) || |
| 988 | (this->Internal->TopologyDim == 0 && this->Internal->GeometryDim > 1)) |
| 989 | { |
| 990 | multZone->SetBlock(zoneIndx, strcGrid); |
| 991 | multZone->GetMetaData(zoneIndx)->Set(vtkCompositeDataSet::NAME(), zoneName); |
| 992 | } |
| 993 | strcGrid->Delete(); |
| 994 | strcGrid = nullptr; |
| 995 | } |
| 996 | |
| 997 | void vtkTecplotReader::GetPolygonalGridFromBlockPackingZone(int numNodes, int numCells, |
| 998 | int numFaces, int zoneIndx, const char* zoneName, vtkMultiBlockDataSet* multZone) |
no test coverage detected