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

Method ComputeWholeExtent

Filters/Geometry/vtkStructuredAMRGridConnectivity.cxx:2067–2105  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

2065
2066//------------------------------------------------------------------------------
2067void vtkStructuredAMRGridConnectivity::ComputeWholeExtent()
2068{
2069 if (!this->LevelExists(0))
2070 {
2071 vtkErrorMacro("AMR dataset has no level 0!\n");
2072 return;
2073 }
2074
2075 std::set<int>::iterator iter;
2076 std::set<int> rootLevelGrids = this->AMRHierarchy[0];
2077
2078 int ext[6];
2079 bool initialPass = true;
2080 for (iter = rootLevelGrids.begin(); iter != rootLevelGrids.end(); ++iter)
2081 {
2082 int gridIdx = *iter;
2083 this->GetGridExtent(gridIdx, ext);
2084
2085 if (initialPass)
2086 {
2087 for (int i = 0; i < 6; ++i)
2088 {
2089 this->WholeExtent[i] = ext[i];
2090 }
2091 initialPass = false;
2092 } // END if
2093 else
2094 {
2095 for (int dim = 0; dim < 3; ++dim)
2096 {
2097 this->WholeExtent[dim * 2] = std::min(this->WholeExtent[dim * 2], ext[dim * 2]);
2098 this->WholeExtent[dim * 2 + 1] = std::max(this->WholeExtent[dim * 2 + 1], ext[dim * 2 + 1]);
2099 } // END for all dimensions
2100 } // END else
2101 } // END for all grids at level L0
2102
2103 this->DataDescription = vtkStructuredData::GetDataDescriptionFromExtent(this->WholeExtent);
2104 this->DataDimension = vtkStructuredData::GetDataDimension(this->DataDescription);
2105}
2106VTK_ABI_NAMESPACE_END

Callers 1

ComputeNeighborsMethod · 0.95

Calls 7

LevelExistsMethod · 0.95
GetGridExtentMethod · 0.95
GetDataDimensionFunction · 0.85
minFunction · 0.50
maxFunction · 0.50
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected