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

Function get_dataset

Filters/ParallelMPI/Testing/Python/TestCleanArrays.py:17–36  ·  view source on GitHub ↗
(pa=None,ca=None)

Source from the content-addressed store, hash-verified

15 print("Testing on non-composite dataset")
16
17def get_dataset(pa=None,ca=None):
18 sphere = vtkSphereSource()
19 sphere.Update()
20
21 data = sphere.GetOutputDataObject(0)
22 data.GetPointData().Initialize()
23 data.GetCellData().Initialize()
24
25 if pa:
26 array = vtkIntArray()
27 array.SetName(pa)
28 array.SetNumberOfTuples(data.GetNumberOfPoints())
29 data.GetPointData().AddArray(array)
30
31 if ca:
32 array = vtkIntArray()
33 array.SetName(ca)
34 array.SetNumberOfTuples(data.GetNumberOfCells())
35 data.GetCellData().AddArray(array)
36 return data
37
38
39data = get_dataset("PD-%d" % rank, "CD-%d" % rank)

Callers 1

TestCleanArrays.pyFile · 0.85

Calls 12

vtkSphereSourceClass · 0.50
vtkIntArrayClass · 0.50
UpdateMethod · 0.45
GetOutputDataObjectMethod · 0.45
InitializeMethod · 0.45
GetPointDataMethod · 0.45
GetCellDataMethod · 0.45
SetNameMethod · 0.45
SetNumberOfTuplesMethod · 0.45
GetNumberOfPointsMethod · 0.45
AddArrayMethod · 0.45
GetNumberOfCellsMethod · 0.45

Tested by

no test coverage detected