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

Method CreateNewCellAndCopyData

Filters/HyperTree/vtkHyperTreeGridGeometryImpl.cxx:66–86  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

64
65//----------------------------------------------------------------------------------------------
66void vtkHyperTreeGridGeometryImpl::CreateNewCellAndCopyData(
67 const std::vector<vtkIdType>& outPointIds, vtkIdType cellId)
68{
69 // Insert new cell
70 vtkIdType outputCellIndex =
71 this->OutCells->InsertNextCell(outPointIds.size(), outPointIds.data());
72
73 // Copy the data from the cell this face comes from
74 this->OutCellDataAttributes->CopyData(this->InCellDataAttributes, cellId, outputCellIndex);
75 // Insert value original VTK cell local index on server
76 if (this->PassThroughCellIds && !this->OriginalCellIdArrayName.empty())
77 {
78 auto typedCellIds = vtkIdTypeArray::SafeDownCast(
79 this->OutCellDataAttributes->GetArray(this->OriginalCellIdArrayName.c_str()));
80 if (!typedCellIds)
81 {
82 vtkErrorWithObjectMacro(nullptr, "Pass cell ids array has wrong type.");
83 }
84 typedCellIds->InsertValue(outputCellIndex, cellId);
85 }
86}
87
88//----------------------------------------------------------------------------------------------
89bool vtkHyperTreeGridGeometryImpl::IsMaskedOrGhost(vtkIdType globalNodeId) const

Calls 8

InsertNextCellMethod · 0.45
sizeMethod · 0.45
dataMethod · 0.45
CopyDataMethod · 0.45
emptyMethod · 0.45
GetArrayMethod · 0.45
c_strMethod · 0.45
InsertValueMethod · 0.45

Tested by

no test coverage detected