| 2344 | //------------------------------------------------------------------------------ |
| 2345 | |
| 2346 | void vtkMPASReader::OutputCells() |
| 2347 | { |
| 2348 | vtkDebugMacro(<< "In OutputCells..." << endl); |
| 2349 | vtkUnstructuredGrid* output = GetOutput(); |
| 2350 | |
| 2351 | output->Allocate(this->MaximumCells, this->MaximumCells); |
| 2352 | |
| 2353 | int cellType = GetCellType(); |
| 2354 | size_t val; |
| 2355 | |
| 2356 | size_t pointsPerPolygon; |
| 2357 | if (this->ShowMultilayerView) |
| 2358 | { |
| 2359 | pointsPerPolygon = 2 * this->PointsPerCell; |
| 2360 | } |
| 2361 | else |
| 2362 | { |
| 2363 | pointsPerPolygon = this->PointsPerCell; |
| 2364 | } |
| 2365 | |
| 2366 | vtkDebugMacro(<< "OutputCells: this->MaximumCells: " << this->MaximumCells << " cellType: " |
| 2367 | << cellType << " this->MaximumNVertLevels: " << this->MaximumNVertLevels |
| 2368 | << " LayerThickness: " << LayerThickness << " ProjectLatLon: " << ProjectLatLon |
| 2369 | << " ShowMultilayerView: " << ShowMultilayerView); |
| 2370 | |
| 2371 | std::vector<vtkIdType> polygon(pointsPerPolygon); |
| 2372 | |
| 2373 | for (size_t j = 0; j < this->CurrentExtraCell; j++) |
| 2374 | { |
| 2375 | |
| 2376 | int* conns; |
| 2377 | if (this->Geometry == Projected) |
| 2378 | { |
| 2379 | conns = this->ModConnections + (j * this->PointsPerCell); |
| 2380 | } |
| 2381 | else |
| 2382 | { |
| 2383 | conns = this->OrigConnections + (j * this->PointsPerCell); |
| 2384 | } |
| 2385 | |
| 2386 | int minLevel = 0; |
| 2387 | |
| 2388 | if (this->IncludeTopography) |
| 2389 | { |
| 2390 | int* connections; |
| 2391 | |
| 2392 | // check if it is a mirror cell, if so, get original |
| 2393 | if (j >= this->NumberOfCells + this->CellOffset) |
| 2394 | { |
| 2395 | size_t origCellNum = *(this->CellMap + (j - this->NumberOfCells - this->CellOffset)); |
| 2396 | connections = this->OrigConnections + (origCellNum * this->PointsPerCell); |
| 2397 | } |
| 2398 | else |
| 2399 | { |
| 2400 | connections = this->OrigConnections + (j * this->PointsPerCell); |
| 2401 | } |
| 2402 | |
| 2403 | minLevel = this->MaximumLevelPoint[connections[0]]; |
no test coverage detected