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

Method Initialize

Filters/Parallel/vtkHyperTreeGridPProbeFilter.cxx:300–329  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

298
299//------------------------------------------------------------------------------
300bool vtkHyperTreeGridPProbeFilter::Initialize(
301 vtkDataSet* input, vtkHyperTreeGrid* source, vtkDataSet* output)
302{
303 output->Initialize();
304
305 output->CopyStructure(input);
306
307 if (!(this->PassAttributeData(input, output)))
308 {
309 vtkErrorMacro("Failed to pass attribute data from input to output");
310 return false;
311 }
312
313 unsigned int numSourceCellArrays = source->GetCellData()->GetNumberOfArrays();
314 for (unsigned int iA = 0; iA < numSourceCellArrays; iA++)
315 {
316 vtkDataArray* da = source->GetCellData()->GetArray(iA);
317 if (!(output->GetPointData()->HasArray(da->GetName())))
318 {
319 auto localInstance = vtk::TakeSmartPointer(da->NewInstance());
320 localInstance->SetName(da->GetName());
321 localInstance->SetNumberOfComponents(da->GetNumberOfComponents());
322 output->GetPointData()->AddArray(localInstance);
323 localInstance->Initialize();
324 }
325 }
326
327 this->Locator->SetHTG(source);
328 return true;
329}
330
331//------------------------------------------------------------------------------
332bool vtkHyperTreeGridPProbeFilter::Reduce(

Callers 4

RequestDataMethod · 0.95
DoProbingMethod · 0.45
ReduceMethod · 0.45
PassAttributeDataMethod · 0.45

Calls 14

PassAttributeDataMethod · 0.95
CopyStructureMethod · 0.45
GetNumberOfArraysMethod · 0.45
GetCellDataMethod · 0.45
GetArrayMethod · 0.45
HasArrayMethod · 0.45
GetPointDataMethod · 0.45
GetNameMethod · 0.45
NewInstanceMethod · 0.45
SetNameMethod · 0.45
SetNumberOfComponentsMethod · 0.45
GetNumberOfComponentsMethod · 0.45

Tested by

no test coverage detected