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

Method FillGhostArrays

Filters/Geometry/vtkStructuredGridConnectivity.cxx:453–492  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

451
452//------------------------------------------------------------------------------
453void vtkStructuredGridConnectivity::FillGhostArrays(
454 int gridID, vtkUnsignedCharArray* nodesArray, vtkUnsignedCharArray* cellsArray)
455{
456 if (nodesArray == nullptr)
457 {
458 return;
459 }
460
461 // STEP 0: Get the grid information
462 int GridExtent[6];
463 this->GetGridExtent(gridID, GridExtent);
464
465 // STEP 1: Real extent
466 int RealExtent[6];
467 this->GetRealExtent(gridID, GridExtent, RealExtent);
468
469 // STEP 2: Get the data description
470 int dataDescription = vtkStructuredData::GetDataDescriptionFromExtent(GridExtent);
471
472 // STEP 3: Get the cell extent
473 int CellExtent[6];
474 vtkStructuredData::GetCellExtentFromPointExtent(GridExtent, CellExtent, dataDescription);
475
476 // STEP 4: Get the data dimension
477 int dim = vtkStructuredData::GetDataDimension(dataDescription);
478 assert("pre: data dimensions must be 1, 2 or 3" && (dim >= 1) && (dim <= 3));
479
480 // STEP 5: Get the grid dimensions from the given extent.
481 int dims[3];
482 vtkStructuredData::GetDimensionsFromExtent(GridExtent, dims);
483
484 // STEP 6: Get the number of nodes per cell
485 int numNodes = this->GetNumberOfNodesPerCell(dim);
486
487 // STEP 7: Mark nodes
488 this->FillNodesGhostArray(gridID, dataDescription, GridExtent, RealExtent, nodesArray);
489
490 // STEP 8: Mark Cells
491 this->FillCellsGhostArray(dataDescription, numNodes, dims, CellExtent, nodesArray, cellsArray);
492}
493
494//------------------------------------------------------------------------------
495void vtkStructuredGridConnectivity::GetRealExtent(int gridID, int GridExtent[6], int RealExtent[6])

Callers 1

ComputeNeighborsMethod · 0.95

Calls 6

GetGridExtentMethod · 0.95
GetRealExtentMethod · 0.95
FillNodesGhostArrayMethod · 0.95
FillCellsGhostArrayMethod · 0.95
GetDataDimensionFunction · 0.85
assertFunction · 0.50

Tested by

no test coverage detected