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

Method ComputeIndexPair

Common/DataModel/vtkAMRMetaData.cxx:100–113  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

98
99//------------------------------------------------------------------------------
100void vtkAMRMetaData::ComputeIndexPair(unsigned int index, unsigned int& level, unsigned int& id)
101{
102 this->GenerateBlockLevel();
103
104 if (static_cast<vtkIdType>(index) >= this->BlockLevel->GetNumberOfValues())
105 {
106 vtkErrorMacro("Invalid index to ComputeIndexPair: " << index << " "
107 << this->BlockLevel->GetNumberOfValues());
108 return;
109 }
110
111 level = this->BlockLevel->GetValue(static_cast<vtkIdType>(index));
112 id = index - this->NumBlocks[level];
113}
114
115//------------------------------------------------------------------------------
116void vtkAMRMetaData::GenerateBlockLevel()

Callers 8

LoadRequestedBlocksMethod · 0.45
AssignAndLoadBlocksMethod · 0.45
GetLevelAndIndexFunction · 0.45
TestOverlappingAMRFunction · 0.45
TestNonOverlappingAMRFunction · 0.45
GetAMRSliceInPlaneMethod · 0.45

Calls 3

GenerateBlockLevelMethod · 0.95
GetNumberOfValuesMethod · 0.45
GetValueMethod · 0.45

Tested by 4

TestOverlappingAMRFunction · 0.36
TestNonOverlappingAMRFunction · 0.36