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

Method GetCoarsenedExtent

Filters/Geometry/vtkStructuredAMRGridConnectivity.cxx:1887–1910  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

1885
1886//------------------------------------------------------------------------------
1887void vtkStructuredAMRGridConnectivity::GetCoarsenedExtent(
1888 int gridIdx, int fromLevel, int toLevel, int ext[6])
1889{
1890 assert("pre: grid index is out-of-bounds!" && (gridIdx >= 0) &&
1891 (gridIdx < static_cast<int>(this->NumberOfGrids)));
1892 assert("pre: toLevel must be >= 0" && (toLevel >= 0));
1893
1894 // STEP 0: Acquire the grid extent corresponding to the given grid.
1895 this->GetGridExtent(gridIdx, ext);
1896
1897 // STEP 1: If we are at the same level, we need to do nothing
1898 if (fromLevel == toLevel)
1899 {
1900 return;
1901 }
1902
1903 // STEP 2: Get the orientation vector and dimension
1904 int orient[3];
1905 int ndim = -1;
1906 this->GetOrientationVector(this->DataDescription, orient, ndim);
1907
1908 // STEP 3: Coarsen the extent
1909 this->CoarsenExtent(orient, ndim, fromLevel, toLevel, ext);
1910}
1911
1912//------------------------------------------------------------------------------
1913void vtkStructuredAMRGridConnectivity::CoarsenExtent(

Callers 2

SetBlockTopologyMethod · 0.95
EstablishNeighborsMethod · 0.95

Calls 4

GetGridExtentMethod · 0.95
GetOrientationVectorMethod · 0.95
CoarsenExtentMethod · 0.95
assertFunction · 0.50

Tested by

no test coverage detected