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

Method GetIJKBlockOrientation

Filters/Geometry/vtkStructuredGridConnectivity.cxx:948–998  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

946
947//------------------------------------------------------------------------------
948void vtkStructuredGridConnectivity::GetIJKBlockOrientation(
949 int i, int j, int k, int ext[6], int orientation[3])
950{
951 orientation[0] = orientation[1] = orientation[2] = BlockFace::NOT_ON_BLOCK_FACE;
952
953 switch (this->DataDescription)
954 {
955 case vtkStructuredData::VTK_STRUCTURED_X_LINE:
956 orientation[0] = this->Get1DOrientation(
957 i, ext[0], ext[1], BlockFace::LEFT, BlockFace::RIGHT, BlockFace::NOT_ON_BLOCK_FACE);
958 break;
959 case vtkStructuredData::VTK_STRUCTURED_Y_LINE:
960 orientation[1] = this->Get1DOrientation(
961 j, ext[2], ext[3], BlockFace::BOTTOM, BlockFace::TOP, BlockFace::NOT_ON_BLOCK_FACE);
962 break;
963 case vtkStructuredData::VTK_STRUCTURED_Z_LINE:
964 orientation[2] = this->Get1DOrientation(
965 k, ext[4], ext[5], BlockFace::BACK, BlockFace::FRONT, BlockFace::NOT_ON_BLOCK_FACE);
966 break;
967 case vtkStructuredData::VTK_STRUCTURED_XY_PLANE:
968 orientation[0] = this->Get1DOrientation(
969 i, ext[0], ext[1], BlockFace::LEFT, BlockFace::RIGHT, BlockFace::NOT_ON_BLOCK_FACE);
970 orientation[1] = this->Get1DOrientation(
971 j, ext[2], ext[3], BlockFace::BOTTOM, BlockFace::TOP, BlockFace::NOT_ON_BLOCK_FACE);
972 break;
973 case vtkStructuredData::VTK_STRUCTURED_YZ_PLANE:
974 orientation[1] = this->Get1DOrientation(
975 j, ext[2], ext[3], BlockFace::BOTTOM, BlockFace::TOP, BlockFace::NOT_ON_BLOCK_FACE);
976 orientation[2] = this->Get1DOrientation(
977 k, ext[4], ext[5], BlockFace::BACK, BlockFace::FRONT, BlockFace::NOT_ON_BLOCK_FACE);
978 break;
979 case vtkStructuredData::VTK_STRUCTURED_XZ_PLANE:
980 orientation[0] = this->Get1DOrientation(
981 i, ext[0], ext[1], BlockFace::LEFT, BlockFace::RIGHT, BlockFace::NOT_ON_BLOCK_FACE);
982 orientation[2] = this->Get1DOrientation(
983 k, ext[4], ext[5], BlockFace::BACK, BlockFace::FRONT, BlockFace::NOT_ON_BLOCK_FACE);
984 break;
985 case vtkStructuredData::VTK_STRUCTURED_XYZ_GRID:
986 orientation[0] = this->Get1DOrientation(
987 i, ext[0], ext[1], BlockFace::LEFT, BlockFace::RIGHT, BlockFace::NOT_ON_BLOCK_FACE);
988 orientation[1] = this->Get1DOrientation(
989 j, ext[2], ext[3], BlockFace::BOTTOM, BlockFace::TOP, BlockFace::NOT_ON_BLOCK_FACE);
990 orientation[2] = this->Get1DOrientation(
991 k, ext[4], ext[5], BlockFace::BACK, BlockFace::FRONT, BlockFace::NOT_ON_BLOCK_FACE);
992 break;
993 default:
994 std::cout << "Data description is: " << this->DataDescription << "\n";
995 std::cout.flush();
996 assert("pre: Undefined data-description!" && false);
997 }
998}
999
1000//------------------------------------------------------------------------------
1001void vtkStructuredGridConnectivity::CreateGhostedExtent(int gridID, int N)

Callers 1

Calls 3

Get1DOrientationMethod · 0.95
assertFunction · 0.50
flushMethod · 0.45

Tested by

no test coverage detected