------------------------------------------------------------------------------
| 493 | |
| 494 | //------------------------------------------------------------------------------ |
| 495 | void vtkStructuredGridConnectivity::GetRealExtent(int gridID, int GridExtent[6], int RealExtent[6]) |
| 496 | { |
| 497 | for (int i = 0; i < 6; ++i) |
| 498 | { |
| 499 | RealExtent[i] = GridExtent[i]; |
| 500 | } |
| 501 | |
| 502 | if (this->NumberOfGhostLayers == 0) |
| 503 | { |
| 504 | return; |
| 505 | } |
| 506 | |
| 507 | switch (this->DataDescription) |
| 508 | { |
| 509 | case vtkStructuredData::VTK_STRUCTURED_X_LINE: |
| 510 | if (this->HasBlockConnection(gridID, BlockFace::LEFT)) |
| 511 | { |
| 512 | RealExtent[0] += this->NumberOfGhostLayers; // imin |
| 513 | } |
| 514 | if (this->HasBlockConnection(gridID, BlockFace::RIGHT)) |
| 515 | { |
| 516 | RealExtent[1] -= this->NumberOfGhostLayers; // imax |
| 517 | } |
| 518 | break; |
| 519 | case vtkStructuredData::VTK_STRUCTURED_Y_LINE: |
| 520 | if (this->HasBlockConnection(gridID, BlockFace::BOTTOM)) |
| 521 | { |
| 522 | RealExtent[2] += this->NumberOfGhostLayers; // jmin |
| 523 | } |
| 524 | if (this->HasBlockConnection(gridID, BlockFace::TOP)) |
| 525 | { |
| 526 | RealExtent[3] -= this->NumberOfGhostLayers; // jmax |
| 527 | } |
| 528 | break; |
| 529 | case vtkStructuredData::VTK_STRUCTURED_Z_LINE: |
| 530 | if (this->HasBlockConnection(gridID, BlockFace::BACK)) |
| 531 | { |
| 532 | RealExtent[4] += this->NumberOfGhostLayers; // kmin |
| 533 | } |
| 534 | if (this->HasBlockConnection(gridID, BlockFace::FRONT)) |
| 535 | { |
| 536 | RealExtent[5] -= this->NumberOfGhostLayers; // kmax |
| 537 | } |
| 538 | break; |
| 539 | case vtkStructuredData::VTK_STRUCTURED_XY_PLANE: |
| 540 | if (this->HasBlockConnection(gridID, BlockFace::LEFT)) |
| 541 | { |
| 542 | RealExtent[0] += this->NumberOfGhostLayers; // imin |
| 543 | } |
| 544 | if (this->HasBlockConnection(gridID, BlockFace::RIGHT)) |
| 545 | { |
| 546 | RealExtent[1] -= this->NumberOfGhostLayers; // imax |
| 547 | } |
| 548 | if (this->HasBlockConnection(gridID, BlockFace::BOTTOM)) |
| 549 | { |
| 550 | RealExtent[2] += this->NumberOfGhostLayers; // jmin |
| 551 | } |
| 552 | if (this->HasBlockConnection(gridID, BlockFace::TOP)) |
no test coverage detected