XMDF
2.2
|
Modules | |
4.6.2. Determining all entities in a file | |
As mentioned above, the file structure for HDF5 files consists of a hierarchical tree of groups. Each group may contain variables or other groups. This section defines the variables that a group must include for a particular type of data (2D mesh geometry, Grid geometry, data sets, etc.) We do not specify a particular path that these items must be stored in (like /Meshes/2D/MeshA) since these locations may change in the future (in order to include multiple scenarios, etc.). Instead we have created functions inside the API to determine paths for a group. Every group includes a "Grouptype string" that identifies the type of information contained in the group. The grouptypes and their meanings are given in Table 1.
Table 1 Group types defined as part of XMDF.
All functions that read from or write to a group use an identifier to the group. This identifier is of type xid and is obtained by creating or opening a group.
The following API functions are used to create groups for meshes, grids, and cross-sections. Creating data set and attribute groups will be discussed later because they are associated with a specific grid or mesh. The path is a string with slashes ‘/’ to specify the groups. The identifier is the file identifier received from the open file or close file command. The create group operation for data sets should only be used when writing data sets for a mesh, grid, or cross-sections that are not defined in the file.
The following API function is used to open existing groups for reading/writing.
When the group is no longer needed the following call must be made to close the group: