moab
|
Modules | |
Tag type values (MOAB-specific) | |
Functions | |
hid_t | mhdf_getNativeType (hid_t input_type, int size, mhdf_Status *status) |
Make type native-endian. | |
void | mhdf_createTag (mhdf_FileHandle file_handle, const char *tag_name, enum mhdf_TagDataType tag_type, int size, int storage, const void *default_value, const void *global_value, hid_t hdf_type, hid_t mhdf_base_type, mhdf_Status *status) |
Add a tag to the file. | |
hid_t | mhdf_getTagDataType (mhdf_FileHandle file_handle, const char *tag_name, mhdf_Status *status) |
Get handle to HDF5 type object for tag data. | |
void | mhdf_createVarLenTag (mhdf_FileHandle file_handle, const char *tag_name, enum mhdf_TagDataType tag_type, int storage, const void *default_value, int default_value_length, const void *global_value, int global_value_length, hid_t hdf_type, hid_t hdf_base_type, mhdf_Status *status) |
Add variable-length tag to file. | |
int | mhdf_getNumberTags (mhdf_FileHandle file_handle, mhdf_Status *status) |
Get the number of tags in the file. | |
char ** | mhdf_getTagNames (mhdf_FileHandle file_handle, int *num_names_out, mhdf_Status *status) |
Get the name for each tag defined in the file. | |
void | mhdf_getTagInfo (mhdf_FileHandle file_handle, const char *tag_name, enum mhdf_TagDataType *class_out, int *size_out, int *tstt_storage_out, int *have_default_out, int *have_global_out, int *have_sparse_out, mhdf_Status *status) |
Get the description of a specified tag. | |
void | mhdf_getTagValues (mhdf_FileHandle file_handle, const char *tag_name, hid_t output_data_type, void *default_value, void *global_value, mhdf_Status *status) |
Get the default and global values of the tag. | |
int | mhdf_haveDenseTag (mhdf_FileHandle file_handle, const char *tag_name, const char *elem_group, mhdf_Status *status) |
Check if the file contains dense tag data for the specified tag and element group. | |
hid_t | mhdf_createDenseTagData (mhdf_FileHandle file_handle, const char *tag_name, const char *elem_group, long num_values, mhdf_Status *status) |
Create an object to hold dense tag values for a given element group. | |
hid_t | mhdf_openDenseTagData (mhdf_FileHandle file_handle, const char *tag_name, const char *elem_group, long *num_values_out, mhdf_Status *status) |
Open the object containing dense tag values for a given element group. | |
void | mhdf_createSparseTagData (mhdf_FileHandle file_handle, const char *tag_name, long num_values, hid_t entities_and_values_out[2], mhdf_Status *status) |
Create file objects to store sparse tag data. | |
void | mhdf_createVarLenTagData (mhdf_FileHandle file_handle, const char *tag_name, long num_entities, long num_values, hid_t entities_and_values_out[3], mhdf_Status *status) |
Create file objects to store (sparse) variable-length tag data. | |
void | mhdf_openSparseTagData (mhdf_FileHandle file_handle, const char *tag_name, long *num_entity_out, long *num_values_out, hid_t entities_and_values_out[3], mhdf_Status *status) |
Create file objects to read sparse tag data. | |
void | mhdf_writeSparseTagEntities (hid_t id_handle, long offset, long count, hid_t hdf_integer_type, const void *id_list, mhdf_Status *status) |
Write Global ID list for sparse tag data. | |
void | mhdf_writeSparseTagEntitiesWithOpt (hid_t id_handle, long offset, long count, hid_t hdf_integer_type, const void *id_list, hid_t write_prop, mhdf_Status *status) |
void | mhdf_writeTagValues (hid_t value_handle, long offset, long count, hid_t hdf_tag_data_type, const void *tag_data, mhdf_Status *status) |
Write tag values. | |
void | mhdf_writeTagValuesWithOpt (hid_t value_handle, long offset, long count, hid_t hdf_tag_data_type, const void *tag_data, hid_t write_prop, mhdf_Status *status) |
void | mhdf_writeSparseTagIndices (hid_t tag_handle, long offset, long count, hid_t hdf_integer_type, const void *end_indices, mhdf_Status *status) |
Write sparse tag end indices for variable-length tag data. | |
void | mhdf_writeSparseTagIndicesWithOpt (hid_t tag_handle, long offset, long count, hid_t hdf_integer_type, const void *end_indices, hid_t write_prop, mhdf_Status *status) |
void | mhdf_readSparseTagEntities (hid_t id_handle, long offset, long count, hid_t hdf_integer_type, void *id_list, mhdf_Status *status) |
Read Global ID list for sparse tag data. | |
void | mhdf_readSparseTagEntitiesWithOpt (hid_t id_handle, long offset, long count, hid_t hdf_integer_type, void *id_list, hid_t read_prop, mhdf_Status *status) |
void | mhdf_readTagValues (hid_t value_handle, long offset, long count, hid_t hdf_type, void *memory, mhdf_Status *status) |
Read tag values. | |
void | mhdf_readTagValuesWithOpt (hid_t value_handle, long offset, long count, hid_t hdf_type, void *memory, hid_t read_prop, mhdf_Status *status) |
void | mhdf_readSparseTagIndices (hid_t tag_handle, long offset, long count, hid_t hdf_integer_type, void *end_indices, mhdf_Status *status) |
Read sparse tag end indices for variable-length tag data. | |
void | mhdf_readSparseTagIndicesWithOpt (hid_t tag_handle, long offset, long count, hid_t hdf_integer_type, void *end_indices, hid_t read_prop, mhdf_Status *status) |
The data for each tag can be stored in two places/formats: sparse and/or dense. The data may be stored in both, but there should not be redundant values for the same entity.
Dense tag data is stored as multiple tables of tag values, one for each element group. (Note: special mhdf_ElemHandle values are available for accessing dense tag data on nodes or meshsets via the mhdf_node_type_handle and mhdf_set_type_handle functions.) Each dense tag table should contain the same number of entries as the element connectivity table. The tag values are associated with the corresponding element in the connectivity table.
Sparse tag data is stored as a global table pair for each tag type. The first if the pair of tables is a list of Global IDs. The second is the corresponding tag value for each entity in the ID list.
hid_t mhdf_createDenseTagData | ( | mhdf_FileHandle | file_handle, |
const char * | tag_name, | ||
const char * | elem_group, | ||
long | num_values, | ||
mhdf_Status * | status | ||
) |
Create an object to hold dense tag values for a given element group.
file_handle | The file. |
tag_name | The tag. |
elem_group | The element group handle, or the return value of mhdf_node_type_handle or mhdf_set_type_handle for nodes or sets respectively. |
num_values | The number of tag values to be written. Must be The same as the number of elements in the group. Specified here to allow tag values to be written before node coordinates, element connectivity or meshsets. |
status | Passed back status of API call. |
void mhdf_createSparseTagData | ( | mhdf_FileHandle | file_handle, |
const char * | tag_name, | ||
long | num_values, | ||
hid_t | entities_and_values_out[2], | ||
mhdf_Status * | status | ||
) |
Create file objects to store sparse tag data.
Create the file objects to store all sparse data for a given tag in. The sparse data is stored in a pair of objects. The first is a vector of global IDs. The second is a vector of tag values for each entity specified in the list of global IDs.
file_handle | The file. |
tag_name | The tag. |
num_values | The number of tag values to be written. |
entities_and_values_out | The handles to the file objects. The first is the vector of global IDs. The second is the list of corresponding tag values. |
status | Passed back status of API call. |
void mhdf_createTag | ( | mhdf_FileHandle | file_handle, |
const char * | tag_name, | ||
enum mhdf_TagDataType | tag_type, | ||
int | size, | ||
int | storage, | ||
const void * | default_value, | ||
const void * | global_value, | ||
hid_t | hdf_type, | ||
hid_t | mhdf_base_type, | ||
mhdf_Status * | status | ||
) |
Add a tag to the file.
Add a new tag to the file. This function must be called to define the tag characteristics before values for the tag can be written.
file_handle | The file |
tag_name | The tag name |
tag_type | The tag type. |
size | If tag_type == mhdf_BITFIELD, the number of bits. If tag_type == mhdf_OPAQUE, the size of the opaque type in bytes. Otherwise the length of the array of tag_type entities associated with each mesh entity, or 1 for a scalar value. |
storage | MOAB storage type (dense, sparse, etc.) |
default_value | Default value for tag, or NULL if none. |
global_value | Global value for tag, or NULL if none. |
hdf_type | If non-zero, assumed to be a user-specified type for opaque data. Ignored if tag_type is not mhdf_OPAQUE. |
hdf_base_type | Ignored if hdf_type is non-zero. If hdf_type is zero and this type is non-zero, it is used either as the type or as the base type for an array type for default_value and global_value, respectively. Typically used to specify the input data type for mhdf_ENTITY_ID tags. |
void mhdf_createVarLenTag | ( | mhdf_FileHandle | file_handle, |
const char * | tag_name, | ||
enum mhdf_TagDataType | tag_type, | ||
int | storage, | ||
const void * | default_value, | ||
int | default_value_length, | ||
const void * | global_value, | ||
int | global_value_length, | ||
hid_t | hdf_type, | ||
hid_t | hdf_base_type, | ||
mhdf_Status * | status | ||
) |
Add variable-length tag to file.
Add a new tag to the file. This function must be called to define the tag characteristics before values for the tag can be written. Use this function if the tag values are not fixed-length.
file_handle | The file |
tag_name | The tag name |
tag_type | The tag type. |
storage | MOAB storage type (dense, sparse, etc.) |
default_value | Default value for tag, or NULL if none. |
default_value_length | Length of default value. |
global_value | Global value for tag, or NULL if none. |
global_value_length | Length of global value. |
hdf_type | If non-zero, assumed to be a user-specified type for opaque data. Ignored if tag_type is not mhdf_OPAQUE. |
hdf_base_type | Ignored if hdf_type is non-zero. If hdf_type is zero and this type is non-zero, it is used either as the type or as the base type for an array type for default_value and global_value, respectively. Typically used to specify the input data type for mhdf_ENTITY_ID tags. |
void mhdf_createVarLenTagData | ( | mhdf_FileHandle | file_handle, |
const char * | tag_name, | ||
long | num_entities, | ||
long | num_values, | ||
hid_t | entities_and_values_out[3], | ||
mhdf_Status * | status | ||
) |
Create file objects to store (sparse) variable-length tag data.
Create the file objects to store all sparse data for a given tag in. The sparse data is stored in a pair of objects. The first is a vector of global IDs. The second is a vector of tag values for each entity specified in the list of global IDs.
file_handle | The file. |
tag_name | The tag. |
num_entities | The number of entities for which tag values are to be stored |
num_values | The total number of scalar values to be written (the total number of bytes of data for all tags for opaque data.) |
entities_and_values_out | The handles to the file objects. The first is the vector of global IDs. The second is the list of corresponding tag values. The third is the handle to the index table. |
status | Passed back status of API call. |
hid_t mhdf_getNativeType | ( | hid_t | input_type, |
int | size, | ||
mhdf_Status * | status | ||
) |
Make type native-endian.
Given an atomic HDF5 data type, return the built-in type that matches the class of the passed type and is the specified size.
This function is provided to allow converting the stored tag type in a file to the preferred type for it's representation in memory when reading tag values.
This function works only for atomic types. The returned type will be a pre-defined HDF5 object and does not need to be closed/released.
input_type | The type to convert. |
size | The desired size in bytes. |
status | Passed back status of API call. |
int mhdf_getNumberTags | ( | mhdf_FileHandle | file_handle, |
mhdf_Status * | status | ||
) |
Get the number of tags in the file.
file_handle | The file. |
status | Passed back status of API call. |
hid_t mhdf_getTagDataType | ( | mhdf_FileHandle | file_handle, |
const char * | tag_name, | ||
mhdf_Status * | status | ||
) |
Get handle to HDF5 type object for tag data.
void mhdf_getTagInfo | ( | mhdf_FileHandle | file_handle, |
const char * | tag_name, | ||
enum mhdf_TagDataType * | class_out, | ||
int * | size_out, | ||
int * | tstt_storage_out, | ||
int * | have_default_out, | ||
int * | have_global_out, | ||
int * | have_sparse_out, | ||
mhdf_Status * | status | ||
) |
Get the description of a specified tag.
Get everything about a tag except the actual values.
file_handle | The file. |
tag_name | The name of the tag to retrieve the data for. |
class_out | The TSTT class of the tag data. |
size_out | Depends on value of class_out:
|
tstt_storage_out | The value of the TSTT enum for storage (dense, sparse, etc.) |
have_default_out | Non-zero if file contains a default value for the tag. Length of default value if variable-lenth tag. |
have_global_out | Non-zero if the file contains a global/mesh value for the tag. |
have_sparse_out | Non-zero if the file contains a sparse data table for this tag. |
char** mhdf_getTagNames | ( | mhdf_FileHandle | file_handle, |
int * | num_names_out, | ||
mhdf_Status * | status | ||
) |
Get the name for each tag defined in the file.
file_handle | The file. |
num_names_out | The length of the returned array of strings. |
status | Passed back status of API call. |
malloc
. The caller should release this memory by calling free
for each string and the array. void mhdf_getTagValues | ( | mhdf_FileHandle | file_handle, |
const char * | tag_name, | ||
hid_t | output_data_type, | ||
void * | default_value, | ||
void * | global_value, | ||
mhdf_Status * | status | ||
) |
Get the default and global values of the tag.
file_handle | The file. |
tag_name | The tag name. |
output_data_type | The HDF5 type for the memory into which the tag data is to be written. If zero, then the value(s) will be read as opaque data. |
default_value | Memory location at which to write the default value of the tag. |
global_value | If the tag has a global value, the memory location at which to write that value. |
status | Passed back status of API call. |
int mhdf_haveDenseTag | ( | mhdf_FileHandle | file_handle, |
const char * | tag_name, | ||
const char * | elem_group, | ||
mhdf_Status * | status | ||
) |
Check if the file contains dense tag data for the specified tag and element group.
Check if there is dense tag data for a given element type for the specified tag.
file_handle | The file. |
tag_name | The tag. |
elem_group | The element group handle, or the return value of mhdf_node_type_handle or mhdf_set_type_handle for nodes or sets respectively. |
status | Passed back status of API call. |
hid_t mhdf_openDenseTagData | ( | mhdf_FileHandle | file_handle, |
const char * | tag_name, | ||
const char * | elem_group, | ||
long * | num_values_out, | ||
mhdf_Status * | status | ||
) |
Open the object containing dense tag values for a given element group.
file_handle | The file. |
tag_name | The tag. |
elem_group | The element group handle, or the return value of mhdf_node_type_handle or mhdf_set_type_handle for nodes or sets respectively. |
num_values_out | The number of tag values to be written. Must be The same as the number of elements in the group. |
status | Passed back status of API call. |
void mhdf_openSparseTagData | ( | mhdf_FileHandle | file_handle, |
const char * | tag_name, | ||
long * | num_entity_out, | ||
long * | num_values_out, | ||
hid_t | entities_and_values_out[3], | ||
mhdf_Status * | status | ||
) |
Create file objects to read sparse tag data.
Open the file objects containing all sparse data for a given tag in. The sparse data is stored in a pair of objects. The first is a vector of global IDs. The second is a vector of tag values for each entity specified in the list of global IDs. For variable-length tags, a third table containing end offsets for each tag value is returned in the third position of the output hid_t array (see mhdf_readSparseTagIndices.)
file_handle | The file. |
tag_name | The tag. |
num_entity_out | The number of entities for which there are tag values. |
num_values_out | The number of data values. For fixed-length tags, this is the same as num_entity_out. For variable-length tags, it is the total number of values in the data table. |
entities_and_values_out | The handles to the pair of file objects. The first is the vector of global IDs. The second is the list of corresponding tag values. The third is the handle to the index table, iff the tag is variable-length. If the tag is fixed-length, this value is not set. |
status | Passed back status of API call. |
void mhdf_readSparseTagEntities | ( | hid_t | id_handle, |
long | offset, | ||
long | count, | ||
hid_t | hdf_integer_type, | ||
void * | id_list, | ||
mhdf_Status * | status | ||
) |
Read Global ID list for sparse tag data.
id_handle | The first handle passed back from either mhdf_createSparseTagData or mhdf_openSparseTagData. |
offset | The offset at which to begin reading. |
count | The number of global IDs to read. |
hdf_integer_type | The type of the integer data in id_list . Typically H5T_NATIVE_INT or N5T_NATIVE_LONG as defined in H5Tpublic.h. The HDF class of this type object must be H5T_INTEGER |
id_list | The memory location at which to store the global IDs. |
status | Passed back status of API call. |
void mhdf_readSparseTagEntitiesWithOpt | ( | hid_t | id_handle, |
long | offset, | ||
long | count, | ||
hid_t | hdf_integer_type, | ||
void * | id_list, | ||
hid_t | read_prop, | ||
mhdf_Status * | status | ||
) |
void mhdf_readSparseTagIndices | ( | hid_t | tag_handle, |
long | offset, | ||
long | count, | ||
hid_t | hdf_integer_type, | ||
void * | end_indices, | ||
mhdf_Status * | status | ||
) |
Read sparse tag end indices for variable-length tag data.
Read sparse tag end indices for variable-length tag data. Each value in the list is the *last* index (zero-based) into the tag data for the corresponding entity.
tag_handle | handle to the data object to read from. |
offset | The offset into the table at which to begin reading |
count | The number of values to read. |
hdf_integer_type | The type of the values pointed to by end_indices (must be an integer type). |
end_indices | Memory in which to store the data read from the table. |
status | Output: API result. |
void mhdf_readSparseTagIndicesWithOpt | ( | hid_t | tag_handle, |
long | offset, | ||
long | count, | ||
hid_t | hdf_integer_type, | ||
void * | end_indices, | ||
hid_t | read_prop, | ||
mhdf_Status * | status | ||
) |
void mhdf_readTagValues | ( | hid_t | value_handle, |
long | offset, | ||
long | count, | ||
hid_t | hdf_type, | ||
void * | memory, | ||
mhdf_Status * | status | ||
) |
Read tag values.
value_handle | The second handle passed back from either mhdf_createSparseTagData or mhdf_openSparseTagData; or the handle returned by mhdf_createDenseTagData or mhdf_openDenseTagData. |
offset | The offset at which to begin reading. |
count | The number of tag values to read. |
hdf_type | The type of the data in memory. If this is specified, it must be possible for the HDF library to convert between this type and the type the tag data is stored as. If zero, the values will be read as opaque data. |
memory | Memory location at which to store tag values. |
status | Passed back status of API call. |
void mhdf_readTagValuesWithOpt | ( | hid_t | value_handle, |
long | offset, | ||
long | count, | ||
hid_t | hdf_type, | ||
void * | memory, | ||
hid_t | read_prop, | ||
mhdf_Status * | status | ||
) |
void mhdf_writeSparseTagEntities | ( | hid_t | id_handle, |
long | offset, | ||
long | count, | ||
hid_t | hdf_integer_type, | ||
const void * | id_list, | ||
mhdf_Status * | status | ||
) |
Write Global ID list for sparse tag data.
id_handle | The first handle passed back from either mhdf_createSparseTagData or mhdf_openSparseTagData. |
offset | The offset at which to begin writing. |
count | The number of global IDs to write. |
hdf_integer_type | The type of the integer data in id_list . Typically H5T_NATIVE_INT or N5T_NATIVE_LONG as defined in H5Tpublic.h. The HDF class of this type object must be H5T_INTEGER |
id_list | The list of global IDs to write. |
status | Passed back status of API call. |
void mhdf_writeSparseTagEntitiesWithOpt | ( | hid_t | id_handle, |
long | offset, | ||
long | count, | ||
hid_t | hdf_integer_type, | ||
const void * | id_list, | ||
hid_t | write_prop, | ||
mhdf_Status * | status | ||
) |
void mhdf_writeSparseTagIndices | ( | hid_t | tag_handle, |
long | offset, | ||
long | count, | ||
hid_t | hdf_integer_type, | ||
const void * | end_indices, | ||
mhdf_Status * | status | ||
) |
Write sparse tag end indices for variable-length tag data.
Write sparse tag end indices for variable-length tag data. Each value in the list is the *last* index (zero-based) into the tag data for the corresponding entity.
tag_handle | handle to the data object to write to. |
offset | The offset into the table at which to begin writting |
count | The number of values to write. |
hdf_integer_type | The type of the values pointed to by end_indices (must be an integer type). |
end_indices | The values to store in the table. |
status | Output: API result. |
void mhdf_writeSparseTagIndicesWithOpt | ( | hid_t | tag_handle, |
long | offset, | ||
long | count, | ||
hid_t | hdf_integer_type, | ||
const void * | end_indices, | ||
hid_t | write_prop, | ||
mhdf_Status * | status | ||
) |
void mhdf_writeTagValues | ( | hid_t | value_handle, |
long | offset, | ||
long | count, | ||
hid_t | hdf_tag_data_type, | ||
const void * | tag_data, | ||
mhdf_Status * | status | ||
) |
Write tag values.
value_handle | The second handle passed back from either mhdf_createSparseTagData or mhdf_openSparseTagData; or the handle returned by mhdf_createDenseTagData or mhdf_openDenseTagData. |
offset | The offset at which to begin writing. |
count | The number of tag values to write. |
hdf_tag_data_type | The type of the data in memory. It must be possible for the HDF library to convert between this type and the type the tag data is stored as. |
tag_data | The list of tag values to write. |
status | Passed back status of API call. |
void mhdf_writeTagValuesWithOpt | ( | hid_t | value_handle, |
long | offset, | ||
long | count, | ||
hid_t | hdf_tag_data_type, | ||
const void * | tag_data, | ||
hid_t | write_prop, | ||
mhdf_Status * | status | ||
) |