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

Function Test1

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

Source from the content-addressed store, hash-verified

12VTK_DATA_ROOT = testing.GetDataRoot()
13
14def Test1(datadir):
15 reader = vtkXMLUnstructuredGridReader()
16 reader.SetFileName(datadir + "/Data/quadraticTetra01.vtu")
17 reader.UpdateInformation();
18 reader.GetPointDataArraySelection().EnableAllArrays()
19 reader.GetCellDataArraySelection().EnableAllArrays()
20
21 f = vtkIntegrateAttributes()
22 f.SetInputConnection(reader.GetOutputPort())
23 f.Update()
24
25 result = f.GetOutputDataObject(0)
26 val = result.GetPointData().GetArray("scalars").GetValue(0)
27 assert (val > 0.0162 and val < 0.01621)
28
29 val = result.GetCellData().GetArray("Volume").GetValue(0)
30 assert (val > 0.128 and val < 0.1284)
31
32
33def Test2(datadir):

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