示例#1
0
        //[TestMethod]
        public void ReadTable()
        {
            Hdf5.Settings.LowerCaseNaming = false;
            Hdf5.Settings.EnableErrorReporting(true);
            Hdf5Utils.LogWarning = (s) => Errors.Add(s);
            Hdf5Utils.LogError   = (s) => Errors.Add(s);
            string filename = @"D:\h5\d.hdf5";
            long   fileId   = -1;

            try
            {
                fileId = Hdf5.OpenFile(filename, true);
                var groupName = "/MODEL_STAGE[1]/RESULTS/ON_NODES/DISPLACEMENT/DATA";
                var groupId   = Hdf5.CreateOrOpenGroup(fileId, groupName);
                TabularData <double> tableOfData = Hdf5.Read2DTable <double>(groupId, "STEP_0");
            }
            finally
            {
                if (fileId > 0)
                {
                    Hdf5.CloseFile(fileId);
                }
            }
        }