Beispiel #1
0
 def test_XdmfNodalResults2(self):
     with h5py.File("kratos.h5", "a", "core", backing_store=False) as f:
         f.create_dataset(
             "/Results/NodalDataValues/DENSITY", (15,), "float64")
         results = XdmfNodalResults(f["/Results"])
     self.assertEqual(results[0].name, "DENSITY")
     self.assertEqual(results[0].data.file_name, "kratos.h5")
     self.assertEqual(results[0].data.name, "/Results/NodalDataValues/DENSITY")
     self.assertEqual(results[0].data.dtype, "float64")
     self.assertEqual(results[0].attribute_type, "Scalar")
Beispiel #2
0
 def test_XdmfNodalResults1(self):
     with h5py.File("kratos.h5", "a", "core", backing_store=False) as f:
         f.create_dataset(
             "/Results/NodalSolutionStepData/VELOCITY", (15, 3), "float64")
         results = XdmfNodalResults(f["/Results"])
     self.assertEqual(results[0].name, "VELOCITY")
     self.assertEqual(results[0].data.file_name, "kratos.h5")
     self.assertEqual(results[0].data.name, "/Results/NodalSolutionStepData/VELOCITY")
     self.assertEqual(results[0].data.dtype, "float64")
     self.assertEqual(results[0].attribute_type, "Vector")
Beispiel #3
0
 def test_XdmfNodalResults_NoResultsFound(self):
     with h5py.File("kratos.h5", "a", "core", backing_store=False) as f:
         f.create_group("/Results/NodalSolutionStepData")
         results = XdmfNodalResults(f["/Results"])
         self.assertEqual(len(results), 0)