(self)
| 39 | self.assertEqual(int(pd.GetArray("StagnationEnergy").GetValue(3)), 3) |
| 40 | |
| 41 | def testReader2D(self): |
| 42 | names = [("multi-bin-2D.xyz", "multi-bin-2D.q")] |
| 43 | |
| 44 | for name in names: |
| 45 | r = vtkMultiBlockPLOT3DReader() |
| 46 | print("Testing ", name[0]) |
| 47 | r.AutoDetectFormatOn() |
| 48 | r.SetFileName(VTK_DATA_ROOT + "/Data/" + name[0]) |
| 49 | r.SetQFileName(VTK_DATA_ROOT + "/Data/" + name[1]) |
| 50 | r.Update() |
| 51 | |
| 52 | output = r.GetOutput() |
| 53 | self.assertEqual(output.GetNumberOfBlocks(), 2) |
| 54 | |
| 55 | b0 = output.GetBlock(0) |
| 56 | self.assertEqual(int(b0.GetFieldData().GetArray("Properties").GetValue(0)), 2) |
| 57 | pd = b0.GetPointData() |
| 58 | self.assertEqual(int(pd.GetArray("Momentum").GetComponent(10, 2)), 0) |
| 59 | self.assertEqual(int(pd.GetArray("StagnationEnergy").GetValue(3)), 9) |
| 60 | |
| 61 | b1 = output.GetBlock(1) |
| 62 | self.assertEqual(int(b1.GetFieldData().GetArray("Properties").GetValue(0)), 2) |
| 63 | pd = b1.GetPointData() |
| 64 | self.assertEqual(int(pd.GetArray("Momentum").GetComponent(10, 2)), 0) |
| 65 | self.assertEqual(int(pd.GetArray("StagnationEnergy").GetValue(3)), 1) |
| 66 | |
| 67 | def testMetaReader(self): |
| 68 | r = vtkPlot3DMetaReader() |
nothing calls this directly
no test coverage detected