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

Method Execute

Filters/ParallelDIY2/vtkGhostCellsGenerator.cxx:80–128  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

78
79//----------------------------------------------------------------------------
80int vtkGhostCellsGenerator::Execute(vtkDataObject* inputDO, vtkInformationVector* outputVector)
81{
82 vtkDataObject* outputDO = vtkDataObject::GetData(outputVector, 0);
83
84 vtkInformation* outInfo = outputVector->GetInformationObject(0);
85
86 int retVal = 1;
87
88 vtkSmartPointer<vtkDataObject> modifInputDO =
89 vtkSmartPointer<vtkDataObject>::Take(inputDO->NewInstance());
90 modifInputDO->ShallowCopy(inputDO);
91 if (this->GenerateProcessIds)
92 {
93 vtkNew<vtkGenerateProcessIds> pidGenerator;
94 pidGenerator->SetInputData(modifInputDO);
95 pidGenerator->GenerateCellDataOn();
96 pidGenerator->GeneratePointDataOn();
97 pidGenerator->Update();
98 modifInputDO->ShallowCopy(pidGenerator->GetOutputDataObject(0));
99 }
100 if (this->GenerateGlobalIds)
101 {
102 vtkNew<vtkGenerateGlobalIds> gidGenerator;
103 gidGenerator->SetInputData(modifInputDO);
104 gidGenerator->Update();
105 modifInputDO->ShallowCopy(gidGenerator->GetOutputDataObject(0));
106 }
107
108 int reqGhostLayers =
109 outInfo->Get(vtkStreamingDemandDrivenPipeline::UPDATE_NUMBER_OF_GHOST_LEVELS());
110
111 if (this->UseStaticMeshCache)
112 {
113 if (this->UseCacheIfPossible(modifInputDO, outputDO))
114 {
115 // Cache copied to output, we still need to sync
116 retVal &= this->GenerateGhostCells(modifInputDO, outputDO, reqGhostLayers, true);
117 return retVal;
118 }
119 }
120
121 retVal &= this->GenerateGhostCells(modifInputDO, outputDO, reqGhostLayers, this->SynchronizeOnly);
122
123 if (this->UseStaticMeshCache)
124 {
125 this->UpdateCache(outputDO);
126 }
127 return retVal;
128}
129
130//----------------------------------------------------------------------------
131int vtkGhostCellsGenerator::GenerateGhostCells(

Callers 3

RequestDataMethod · 0.95
RequestDataMethod · 0.45
RequestDataMethod · 0.45

Calls 12

UseCacheIfPossibleMethod · 0.95
GenerateGhostCellsMethod · 0.95
UpdateCacheMethod · 0.95
TakeFunction · 0.85
GetInformationObjectMethod · 0.80
GetDataFunction · 0.50
NewInstanceMethod · 0.45
ShallowCopyMethod · 0.45
SetInputDataMethod · 0.45
UpdateMethod · 0.45
GetOutputDataObjectMethod · 0.45
GetMethod · 0.45

Tested by

no test coverage detected