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

Method RecursivelyProcessGradientTree

Filters/HyperTree/vtkHyperTreeGridGradient.cxx:578–605  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

576//------------------------------------------------------------------------------
577template <class Cursor, class Worker>
578void vtkHyperTreeGridGradient::RecursivelyProcessGradientTree(Cursor* supercursor, Worker& worker)
579{
580 // Retrieve global index of input cursor
581 vtkIdType id = supercursor->GetGlobalNodeIndex();
582
583 if (this->InGhostArray && this->InGhostArray->GetTuple1(id))
584 {
585 return;
586 }
587
588 // Descend further into input trees only if cursor is not a leaf
589 if (!IsLeaf(supercursor))
590 {
591 unsigned int numChildren = supercursor->GetNumberOfChildren();
592 for (unsigned int child = 0; child < numChildren; ++child)
593 {
594 // Create child cursor from parent in input grid
595 supercursor->ToChild(child);
596 // Recurse
597 this->RecursivelyProcessGradientTree(supercursor, worker);
598 supercursor->ToParent();
599 }
600 }
601 else if (!this->InMask || !this->InMask->GetTuple1(id))
602 {
603 worker.AccumulateGradienAt(supercursor);
604 }
605}
606
607//------------------------------------------------------------------------------
608template <class Worker>

Callers 1

ProcessTreesMethod · 0.95

Calls 7

GetTuple1Method · 0.80
AccumulateGradienAtMethod · 0.80
IsLeafFunction · 0.70
GetGlobalNodeIndexMethod · 0.45
GetNumberOfChildrenMethod · 0.45
ToChildMethod · 0.45
ToParentMethod · 0.45

Tested by

no test coverage detected