65 file1.
Create(
"HDF5_test.h5");
68 file1.
Write(
"data",
"int", value1);
72 file2.
Open(
"HDF5_test.h5");
75 file2.
Read(
"data",
"int", value2);
90 file1.
Create(
"HDF5_test.h5");
92 const int data1[2] = {1, 2};
93 file1.
Write(
"data",
"values", H5T_NATIVE_INT, 2, data1);
97 file2.
Open(
"HDF5_test.h5");
99 int data2[2] = {-1, -1};
100 file2.
Read(
"data",
"values", H5T_NATIVE_INT, 2, data2);
116 file1.
Create(
"HDF5_test.h5");
118 const int value1 = 5;
121 file1.
Write(
"group 1/group 2/data",
"int", value1);
125 file2.
Open(
"HDF5_test.h5");
128 file2.
Read(
"group 1/group 2/data",
"int", value2);
136 int main(
int argc,
char* argv[])
void Write(const std::string &GroupName, const std::string &DataSetName, int data)
Write an integer in group GroupName using the given DataSetName.
void CreateGroup(const std::string &GroupName)
Create group GroupName.
void Read(const std::string &GroupName, const std::string &DataSetName, int &data)
Read an integer from group /GroupName/DataSetName.
int main(int argc, char **argv)
static int runUnitTestsFromMain(int argc, char *argv[])
void Open(const std::string FileName, int AccessType=H5F_ACC_RDWR)
Open specified file with given access type.
TEUCHOS_UNIT_TEST(EpetraExt_hypre, Construct)
class HDF5: A class for storing Epetra objects in parallel binary files
void Close()
Close the file.
void Create(const std::string FileName)
Create a new file.
#define TEST_EQUALITY(v1, v2)