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

Method MarkNodeProperty

Filters/Geometry/vtkStructuredGridConnectivity.cxx:320–375  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

318
319//------------------------------------------------------------------------------
320void vtkStructuredGridConnectivity::MarkNodeProperty(
321 int gridID, int i, int j, int k, int ext[6], int realExtent[6], unsigned char& p)
322{
323 p = 0;
324
325 // Check if the node is an interior a node, i.e., it is not on any boundary
326 // shared or real boundary and not in a ghost region. Interior nodes can only
327 // be internal nodes!
328 if (!this->IsNodeInterior(i, j, k, realExtent))
329 {
330 // If the node is on the boundary of the computational domain mark it
331 // if( this->IsNodeOnBoundary(i,j,k) )
332 // {
333 // BOUNDARY might be used in the future
334 // }
335
336 // Check if the node is also on a shared boundary or if it is a ghost node
337 if (this->IsNodeOnSharedBoundary(gridID, realExtent, i, j, k))
338 {
339 // SHARED might be used in the future
340
341 // For shared nodes we must check for ownership
342 vtkIdList* neiList = vtkIdList::New();
343 this->SearchNeighbors(gridID, i, j, k, neiList);
344
345 if (neiList->GetNumberOfIds() > 0)
346 {
347 int neiRealExtent[6];
348 int neiGridExtent[6];
349
350 for (vtkIdType nei = 0; nei < neiList->GetNumberOfIds(); ++nei)
351 {
352 vtkIdType neiIdx = neiList->GetId(nei);
353 this->GetGridExtent(neiIdx, neiGridExtent);
354 this->GetRealExtent(neiIdx, neiGridExtent, neiRealExtent);
355
356 // If my gridID is not the smallest gridID that shares the point,then
357 // I don't own the point.
358 // The convention is that the grid with the smallest gridID will own the
359 // point and all other grids should IGNORE it when computing statistics
360 // etc.
361 if (this->IsNodeWithinExtent(i, j, k, neiRealExtent) && gridID > neiList->GetId(nei))
362 {
363 p |= vtkDataSetAttributes::HIDDENPOINT;
364 break;
365 }
366 } // END for all neis
367 } // END if neisList isn't empty
368 neiList->Delete();
369 } // END if node is on a shared boundary
370 else if (this->IsGhostNode(ext, realExtent, i, j, k))
371 {
372 p |= vtkDataSetAttributes::DUPLICATEPOINT;
373 }
374 }
375}
376
377//------------------------------------------------------------------------------

Callers 1

FillNodesGhostArrayMethod · 0.95

Calls 11

IsNodeInteriorMethod · 0.95
SearchNeighborsMethod · 0.95
GetGridExtentMethod · 0.95
GetRealExtentMethod · 0.95
IsGhostNodeMethod · 0.95
IsNodeWithinExtentMethod · 0.80
DeleteMethod · 0.65
NewFunction · 0.50
GetNumberOfIdsMethod · 0.45
GetIdMethod · 0.45

Tested by

no test coverage detected