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

Method SetGlobalIndexFromLocal

Common/DataModel/vtkHyperTree.cxx:329–344  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

327
328//---------------------------------------------------------------------------
329void vtkHyperTree::SetGlobalIndexFromLocal(vtkIdType index, vtkIdType global)
330{
331 assert("pre: not_globalindex_from_local_if_use_globalindex_start" &&
332 this->Datas->GlobalIndexStart < 0);
333
334 // If local index outside map range, resize the latter
335 if (static_cast<vtkIdType>(this->Datas->GlobalIndexTable.size()) <= index)
336 {
337 this->Datas->GlobalIndexTable.resize(index + 1, -1);
338 }
339 // This service allows the value of the global index to be positioned
340 // several times in order to take into account a first description,
341 // a priori, incomplete followed by a more detailed description.
342 // The last call overwrites, replaces what was written previously.
343 this->Datas->GlobalIndexTable[index] = global;
344}
345
346//---------------------------------------------------------------------------
347vtkIdType vtkHyperTree::GetGlobalIndexFromLocal(vtkIdType index) const

Calls 3

assertFunction · 0.50
sizeMethod · 0.45
resizeMethod · 0.45

Tested by

no test coverage detected