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

Method CopyStructure

Common/DataModel/vtkGraph.cxx:615–638  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

613
614//------------------------------------------------------------------------------
615void vtkGraph::CopyStructure(vtkGraph* g)
616{
617 // Copy on write.
618 this->SetInternals(g->Internals);
619 if (g->Points)
620 {
621 if (!this->Points)
622 {
623 this->Points = vtkPoints::New();
624 }
625 this->Points->ShallowCopy(g->Points);
626 }
627 else if (this->Points)
628 {
629 this->Points->Delete();
630 this->Points = nullptr;
631 }
632
633 // Propagate information used by distributed graphs
634 this->Information->Set(
635 vtkDataObject::DATA_PIECE_NUMBER(), g->Information->Get(vtkDataObject::DATA_PIECE_NUMBER()));
636 this->Information->Set(vtkDataObject::DATA_NUMBER_OF_PIECES(),
637 g->Information->Get(vtkDataObject::DATA_NUMBER_OF_PIECES()));
638}
639
640//------------------------------------------------------------------------------
641void vtkGraph::CopyInternal(vtkGraph* g, bool deep)

Callers 15

vtkIOSSModelMethod · 0.45
GetEntityMeshMethod · 0.45
GetMeshMethod · 0.45
RequestDataMethod · 0.45
PolyDataExecuteMethod · 0.45
RequestDataMethod · 0.45
GetAMRBlockMethod · 0.45
ExtractCellsMethod · 0.45
DecomposeMethod · 0.45

Calls 5

DeleteMethod · 0.65
NewFunction · 0.50
ShallowCopyMethod · 0.45
SetMethod · 0.45
GetMethod · 0.45

Tested by 2

TestCopyFunction · 0.36
TestCopyFunction · 0.36