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

Function Gather

IO/MPIParallel/Testing/Python/Plot3DMPIIO.py:17–27  ·  view source on GitHub ↗
(c, arr, root)

Source from the content-addressed store, hash-verified

15VTK_DATA_ROOT = vtkGetDataRoot()
16
17def Gather(c, arr, root):
18 vtkArr = vtkDoubleArray()
19 count = len(arr)
20 vtkArr.SetNumberOfTuples(count)
21 for i in range(count):
22 vtkArr.SetValue(i, arr[i])
23 vtkResult = vtkDoubleArray()
24 c.Gather(vtkArr, vtkResult, root)
25 result = [vtkResult.GetValue(i) for i in range(vtkResult.GetNumberOfTuples())]
26 return [ tuple(result[i : i + count]) \
27 for i in range(0, vtkResult.GetNumberOfTuples(), count) ]
28
29renWin = vtkRenderWindow()
30

Callers 3

Plot3DMPIIO.pyFile · 0.70
RequestDataMethod · 0.50
RequestDataMethod · 0.50

Calls 7

vtkDoubleArrayClass · 0.50
rangeClass · 0.50
SetNumberOfTuplesMethod · 0.45
SetValueMethod · 0.45
GatherMethod · 0.45
GetValueMethod · 0.45
GetNumberOfTuplesMethod · 0.45

Tested by

no test coverage detected