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

Method IsNodeInterior

Filters/Geometry/vtkStructuredAMRGridConnectivity.cxx:1508–1562  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

1506
1507//------------------------------------------------------------------------------
1508bool vtkStructuredAMRGridConnectivity::IsNodeInterior(int i, int j, int k, int GridExtent[6])
1509{
1510 bool status = false;
1511 switch (this->DataDescription)
1512 {
1513 case vtkStructuredData::VTK_STRUCTURED_X_LINE:
1514 if ((GridExtent[0] < i) && (i < GridExtent[1]))
1515 {
1516 status = true;
1517 }
1518 break;
1519 case vtkStructuredData::VTK_STRUCTURED_Y_LINE:
1520 if ((GridExtent[2] < j) && (j < GridExtent[3]))
1521 {
1522 status = true;
1523 }
1524 break;
1525 case vtkStructuredData::VTK_STRUCTURED_Z_LINE:
1526 if ((GridExtent[4] < k) && (k < GridExtent[5]))
1527 {
1528 status = true;
1529 }
1530 break;
1531 case vtkStructuredData::VTK_STRUCTURED_XY_PLANE:
1532 if ((GridExtent[0] < i) && (i < GridExtent[1]) && (GridExtent[2] < j) && (j < GridExtent[3]))
1533 {
1534 status = true;
1535 }
1536 break;
1537 case vtkStructuredData::VTK_STRUCTURED_YZ_PLANE:
1538 if ((GridExtent[2] < j) && (j < GridExtent[3]) && (GridExtent[4] < k) && (k < GridExtent[5]))
1539 {
1540 status = true;
1541 }
1542 break;
1543 case vtkStructuredData::VTK_STRUCTURED_XZ_PLANE:
1544 if ((GridExtent[0] < i) && (i < GridExtent[1]) && (GridExtent[4] < k) && (k < GridExtent[5]))
1545 {
1546 status = true;
1547 }
1548 break;
1549 case vtkStructuredData::VTK_STRUCTURED_XYZ_GRID:
1550 if ((GridExtent[0] < i) && (i < GridExtent[1]) && (GridExtent[2] < j) &&
1551 (j < GridExtent[3]) && (GridExtent[4] < k) && (k < GridExtent[5]))
1552 {
1553 status = true;
1554 }
1555 break;
1556 default:
1557 std::cout << "Data description is: " << this->DataDescription << "\n";
1558 std::cout.flush();
1559 assert("pre: Undefined data-description!" && false);
1560 } // END switch
1561 return (status);
1562}
1563
1564//------------------------------------------------------------------------------
1565void vtkStructuredAMRGridConnectivity::FillGhostArrays(

Callers 1

MarkNodePropertyMethod · 0.95

Calls 2

assertFunction · 0.50
flushMethod · 0.45

Tested by

no test coverage detected