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

Method SubGrid

IO/Parallel/vtkPChacoReader.cxx:442–465  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

440}
441
442vtkUnstructuredGrid* vtkPChacoReader::SubGrid(vtkUnstructuredGrid* ug, vtkIdType from, vtkIdType to)
443{
444 vtkUnstructuredGrid* tmp = vtkUnstructuredGrid::New();
445
446 if (from > to)
447 {
448 this->SetUpEmptyGrid(tmp);
449 }
450 else
451 {
452 tmp->ShallowCopy(ug);
453
454 vtkExtractCells* ec = vtkExtractCells::New();
455 ec->AddCellRange(from, to);
456 ec->SetInputData(tmp);
457 ec->Update();
458
459 tmp->Initialize();
460 tmp->ShallowCopy(ec->GetOutput());
461 ec->Delete();
462 }
463
464 return tmp;
465}
466char* vtkPChacoReader::MarshallDataSet(vtkUnstructuredGrid* extractedGrid, vtkIdType& len)
467{
468 // taken from vtkCommunicator::WriteDataSet

Callers 1

DivideCellsMethod · 0.95

Calls 9

SetUpEmptyGridMethod · 0.95
AddCellRangeMethod · 0.80
DeleteMethod · 0.65
NewFunction · 0.50
ShallowCopyMethod · 0.45
SetInputDataMethod · 0.45
UpdateMethod · 0.45
InitializeMethod · 0.45
GetOutputMethod · 0.45

Tested by

no test coverage detected