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

Method GetIndexFromLevelZeroCoordinates

Common/DataModel/vtkHyperTreeGrid.cxx:1362–1380  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

1360
1361//------------------------------------------------------------------------------
1362void vtkHyperTreeGrid::GetIndexFromLevelZeroCoordinates(
1363 vtkIdType& treeindex, unsigned int i, unsigned int j, unsigned int k) const
1364{
1365 // Distinguish between two cases depending on indexing order
1366 if (this->TransposedRootIndexing)
1367 {
1368 treeindex = static_cast<vtkIdType>(k) +
1369 static_cast<vtkIdType>(this->CellDims[2]) *
1370 (static_cast<vtkIdType>(j) +
1371 static_cast<vtkIdType>(i) * static_cast<vtkIdType>(this->CellDims[1]));
1372 }
1373 else
1374 {
1375 treeindex = static_cast<vtkIdType>(i) +
1376 static_cast<vtkIdType>(this->CellDims[0]) *
1377 (static_cast<vtkIdType>(j) +
1378 static_cast<vtkIdType>(k) * static_cast<vtkIdType>(this->CellDims[1]));
1379 }
1380}
1381
1382//------------------------------------------------------------------------------
1383// The shift is a request along each of the axes I,J,K

Callers 10

GenerateGhostArrayMethod · 0.95
SearchMethod · 0.80
RequestDataMethod · 0.80
ComputeTreeIndexFunction · 0.80
ProcessTreesMethod · 0.80
ProcessTreesMethod · 0.80
DetermineNeighborsMethod · 0.80

Calls

no outgoing calls

Tested by 1

ComputeTreeIndexFunction · 0.64