MCPcopy Create free account
hub / github.com/Kitware/VTK / GetRealExtent

Method GetRealExtent

Filters/Geometry/vtkStructuredGridConnectivity.cxx:495–625  ·  view source on GitHub ↗

------------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

493
494//------------------------------------------------------------------------------
495void 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))

Callers 3

PrintSelfMethod · 0.95
MarkNodePropertyMethod · 0.95
FillGhostArraysMethod · 0.95

Calls 4

HasBlockConnectionMethod · 0.95
assertFunction · 0.50
ClampFunction · 0.50
flushMethod · 0.45

Tested by

no test coverage detected