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

Method SetBlockTopology

Filters/Geometry/vtkStructuredAMRGridConnectivity.cxx:220–263  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

218
219//------------------------------------------------------------------------------
220void vtkStructuredAMRGridConnectivity::SetBlockTopology(int gridID)
221{
222 assert("pre: gridID is out-of-bounds!" && (gridID >= 0) &&
223 (gridID < static_cast<int>(this->NumberOfGrids)));
224
225 int gridExtent[6];
226 this->GetCoarsenedExtent(gridID, this->GridLevels[gridID], 0, gridExtent);
227
228 // Check in IMIN
229 if (gridExtent[0] > this->WholeExtent[0])
230 {
231 this->AddBlockConnection(gridID, AMRBlockFace::LEFT);
232 }
233
234 // Check in IMAX
235 if (gridExtent[1] < this->WholeExtent[1])
236 {
237 this->AddBlockConnection(gridID, AMRBlockFace::RIGHT);
238 }
239
240 // Check in JMIN
241 if (gridExtent[2] > this->WholeExtent[2])
242 {
243 this->AddBlockConnection(gridID, AMRBlockFace::BOTTOM);
244 }
245
246 // Check in JMAX
247 if (gridExtent[3] < this->WholeExtent[3])
248 {
249 this->AddBlockConnection(gridID, AMRBlockFace::TOP);
250 }
251
252 // Check in KMIN
253 if (gridExtent[4] > this->WholeExtent[4])
254 {
255 this->AddBlockConnection(gridID, AMRBlockFace::BACK);
256 }
257
258 // Check in KMAX
259 if (gridExtent[5] < this->WholeExtent[5])
260 {
261 this->AddBlockConnection(gridID, AMRBlockFace::FRONT);
262 }
263}
264
265//------------------------------------------------------------------------------
266void vtkStructuredAMRGridConnectivity::ComputeNeighbors()

Callers 1

ComputeNeighborsMethod · 0.95

Calls 3

GetCoarsenedExtentMethod · 0.95
AddBlockConnectionMethod · 0.95
assertFunction · 0.50

Tested by

no test coverage detected