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

Method SearchNeighbors

Filters/Geometry/vtkStructuredGridConnectivity.cxx:281–298  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

279
280//------------------------------------------------------------------------------
281void vtkStructuredGridConnectivity::SearchNeighbors(
282 int gridID, int i, int j, int k, vtkIdList* neiList)
283{
284 assert("pre: neiList should not be nullptr" && (neiList != nullptr));
285 assert("pre: gridID is out-of-bounds" &&
286 ((gridID >= 0) && (gridID < static_cast<int>(this->NumberOfGrids))));
287
288 for (unsigned int nei = 0; nei < this->Neighbors[gridID].size(); ++nei)
289 {
290 vtkStructuredNeighbor* myNei = &this->Neighbors[gridID][nei];
291 assert("pre: myNei != nullptr" && (myNei != nullptr));
292
293 if (this->IsNodeWithinExtent(i, j, k, myNei->OverlapExtent))
294 {
295 neiList->InsertNextId(myNei->NeighborID);
296 }
297 } // END for all neis
298}
299
300//------------------------------------------------------------------------------
301void vtkStructuredGridConnectivity::MarkCellProperty(

Callers 1

MarkNodePropertyMethod · 0.95

Calls 4

IsNodeWithinExtentMethod · 0.80
InsertNextIdMethod · 0.80
assertFunction · 0.50
sizeMethod · 0.45

Tested by

no test coverage detected