(self)
| 137 | return |
| 138 | |
| 139 | def testFifth(self): |
| 140 | # This test is based on selecting a BP file that contains a group of meshes. |
| 141 | r = vtkIOFides.vtkFidesReader() |
| 142 | r.SetFileName(VTK_DATA_ROOT + "/Data/groups.bp") |
| 143 | r.UpdateInformation() |
| 144 | self.assertTrue(r.GetOutputInformation(0).Has( |
| 145 | vtkStreamingDemandDrivenPipeline.TIME_STEPS())) |
| 146 | nsteps = r.GetOutputInformation(0).Length(vtkStreamingDemandDrivenPipeline.TIME_STEPS()) |
| 147 | self.assertEqual(nsteps, 11) |
| 148 | for i in range(nsteps): |
| 149 | self.assertEqual(r.GetOutputInformation(0).Get( |
| 150 | vtkStreamingDemandDrivenPipeline.TIME_STEPS(),i), i) |
| 151 | pds = r.GetPointDataArraySelection() |
| 152 | pds.DisableAllArrays() |
| 153 | pds.EnableArray("accel") |
| 154 | pds.EnableArray("disp") |
| 155 | pds.EnableArray("force") |
| 156 | cds = r.GetCellDataArraySelection() |
| 157 | cds.DisableAllArrays() |
| 158 | cds.EnableArray("eqps") |
| 159 | cds.EnableArray("mises") |
| 160 | r.Update() |
| 161 | |
| 162 | pdsc = r.GetOutputDataObject(0) |
| 163 | self.assertTrue(isinstance(pdsc, vtkPartitionedDataSetCollection)) |
| 164 | self.assertEqual(pdsc.GetNumberOfPartitionedDataSets(), 4) |
| 165 | pds = pdsc.GetPartitionedDataSet(0) |
| 166 | nParts = pds.GetNumberOfPartitions() |
| 167 | self.assertEqual(nParts, 1) |
| 168 | |
| 169 | ds = pds.GetPartition(0) |
| 170 | self.assertEqual(ds.GetNumberOfCells(), 8) |
| 171 | self.assertEqual(ds.GetNumberOfPoints(), 27) |
| 172 | self.assertEqual(ds.GetPointData().GetNumberOfArrays(), 3) |
| 173 | self.assertEqual(ds.GetCellData().GetNumberOfArrays(), 2) |
| 174 | self.assertEqual(ds.GetPointData().GetArray(0).GetName(), "accel") |
| 175 | self.assertEqual(ds.GetPointData().GetArray(1).GetName(), "disp") |
| 176 | self.assertEqual(ds.GetPointData().GetArray(2).GetName(), "force") |
| 177 | self.assertEqual(ds.GetCellData().GetArray(0).GetName(), "eqps") |
| 178 | self.assertEqual(ds.GetCellData().GetArray(1).GetName(), "mises") |
| 179 | return |
| 180 | |
| 181 | def testSixth(self): |
| 182 | # This test reads a uniform grid with 4 blocks. It tests the ability of fides to |
nothing calls this directly
no test coverage detected