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

Function handleNode

Common/DataModel/Testing/Python/TestHyperTreeGrid3DMandel.py:91–112  ·  view source on GitHub ↗
(cursor, sideArray, levelArray)

Source from the content-addressed store, hash-verified

89
90
91def handleNode(cursor, sideArray, levelArray):
92 cellBounds = [0, 0, 0, 0, 0, 0]
93 level = cursor.GetLevel()
94 cursor.GetBounds(cellBounds)
95
96 # Add field
97 idx = cursor.GetGlobalNodeIndex()
98 side = mandelbrotSide(cellBounds)
99 sideArray.InsertTuple1(idx, side)
100 mask.InsertTuple1(idx, side < CUT_OFF)
101
102 if cursor.IsLeaf():
103 if shouldRefine(cursor.GetLevel(), cellBounds):
104 cursor.SubdivideLeaf()
105 handleNode(cursor, sideArray, mask)
106
107 else:
108 nbChildren = cursor.GetNumberOfChildren()
109 for childIdx in range(nbChildren):
110 cursor.ToChild(childIdx)
111 handleNode(cursor, sideArray, mask)
112 cursor.ToParent()
113
114
115# -----------------------------------------------------------------------------

Callers 1

Calls 12

InsertTuple1Method · 0.80
mandelbrotSideFunction · 0.70
shouldRefineFunction · 0.70
rangeClass · 0.50
GetLevelMethod · 0.45
GetBoundsMethod · 0.45
GetGlobalNodeIndexMethod · 0.45
IsLeafMethod · 0.45
SubdivideLeafMethod · 0.45
GetNumberOfChildrenMethod · 0.45
ToChildMethod · 0.45
ToParentMethod · 0.45

Tested by

no test coverage detected