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

Method AddPointAndCells

Filters/ParallelGeometry/vtkPDistributedDataFilter.cxx:3348–3375  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

3346
3347//------------------------------------------------------------------------------
3348vtkIdTypeArray* vtkPDistributedDataFilter::AddPointAndCells(vtkIdType gid, vtkIdType localId,
3349 vtkUnstructuredGrid* grid, vtkIdType* gidCells, vtkIdTypeArray* ids)
3350{
3351 if (ids == nullptr)
3352 {
3353 ids = vtkIdTypeArray::New();
3354 }
3355
3356 ids->InsertNextValue(gid);
3357
3358 vtkIdList* cellList = vtkIdList::New();
3359
3360 grid->GetPointCells(localId, cellList);
3361
3362 vtkIdType numCells = cellList->GetNumberOfIds();
3363
3364 ids->InsertNextValue(numCells);
3365
3366 for (vtkIdType j = 0; j < numCells; j++)
3367 {
3368 vtkIdType globalCellId = gidCells[cellList->GetId(j)];
3369 ids->InsertNextValue(globalCellId);
3370 }
3371
3372 cellList->Delete();
3373
3374 return ids;
3375}
3376
3377//------------------------------------------------------------------------------
3378vtkIdTypeArray** vtkPDistributedDataFilter::GetGhostPointIds(

Calls 6

DeleteMethod · 0.65
NewFunction · 0.50
InsertNextValueMethod · 0.45
GetPointCellsMethod · 0.45
GetNumberOfIdsMethod · 0.45
GetIdMethod · 0.45

Tested by

no test coverage detected