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

Function Test2

Filters/Parallel/Testing/Python/TestIntegrateAttributes.py:33–49  ·  view source on GitHub ↗
(datadir)

Source from the content-addressed store, hash-verified

31
32
33def Test2(datadir):
34 reader = vtkXMLUnstructuredGridReader()
35 reader.SetFileName(datadir + "/Data/elements.vtu")
36 reader.UpdateInformation();
37 reader.GetPointDataArraySelection().EnableAllArrays()
38 reader.GetCellDataArraySelection().EnableAllArrays()
39
40 f = vtkIntegrateAttributes()
41 f.SetInputConnection(reader.GetOutputPort())
42 f.Update()
43
44 result = f.GetOutputDataObject(0)
45 val = result.GetPointData().GetArray("pointScalars").GetValue(0)
46 assert (val > 83.1 and val < 83.2)
47
48 val = result.GetCellData().GetArray("Volume").GetValue(0)
49 assert (val > 1.999 and val < 2.01)
50
51def Test3(datadir):
52 reader = vtkDataSetReader()

Callers 1

Calls 13

EnableAllArraysMethod · 0.80
SetFileNameMethod · 0.45
UpdateInformationMethod · 0.45
SetInputConnectionMethod · 0.45
GetOutputPortMethod · 0.45
UpdateMethod · 0.45
GetOutputDataObjectMethod · 0.45
GetValueMethod · 0.45
GetArrayMethod · 0.45
GetPointDataMethod · 0.45

Tested by

no test coverage detected