(datadir)
| 31 | |
| 32 | |
| 33 | def 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 | |
| 51 | def Test3(datadir): |
| 52 | reader = vtkDataSetReader() |
no test coverage detected