Mesh Oriented datABase  (version 5.4.1)
Array-based unstructured mesh datastructure
Meshset data.
+ Collaboration diagram for Meshset data.:

Modules

 Set flag bits

Functions

hid_t mhdf_createSetMeta (mhdf_FileHandle file_handle, long num_sets, long *first_set_id_out, mhdf_Status *status)
 Create table holding list of meshsets and their properties.
int mhdf_haveSets (mhdf_FileHandle file, int *have_set_data_out, int *have_set_child_out, int *have_set_parents_out, mhdf_Status *status)
 Check if file contains any sets.
hid_t mhdf_openSetMeta (mhdf_FileHandle file_handle, long *num_sets_out, long *first_set_id_out, mhdf_Status *status)
 Open table holding list of meshsets and their properties.
hid_t mhdf_openSetMetaSimple (mhdf_FileHandle file_handle, mhdf_Status *status)
void mhdf_readSetMeta (hid_t data_handle, long offset, long count, hid_t hdf_integer_type, void *set_desc_data, mhdf_Status *status)
 Read list of sets and meta-information about sets.
void mhdf_readSetMetaWithOpt (hid_t data_handle, long offset, long count, hid_t hdf_integer_type, void *set_desc_data, hid_t read_prop, mhdf_Status *status)
void mhdf_readSetFlags (hid_t data_handle, long offset, long count, hid_t hdf_integer_type, void *set_flag_data, mhdf_Status *status)
 Read only the flags portion of the set description table.
void mhdf_readSetFlagsWithOpt (hid_t data_handle, long offset, long count, hid_t hdf_integer_type, void *set_flag_data, hid_t read_prop, mhdf_Status *status)
void mhdf_readSetContentEndIndices (hid_t data_handle, long offset, long count, hid_t hdf_integer_type, void *end_indices_out, mhdf_Status *status)
 Read only the content end indices portion of the set description table.
void mhdf_readSetContentEndIndicesWithOpt (hid_t data_handle, long offset, long count, hid_t hdf_integer_type, void *end_indices_out, hid_t read_prop, mhdf_Status *status)
void mhdf_readSetChildEndIndices (hid_t data_handle, long offset, long count, hid_t hdf_integer_type, void *end_indices_out, mhdf_Status *status)
 Read only the child end indices portion of the set description table.
void mhdf_readSetChildEndIndicesWithOpt (hid_t data_handle, long offset, long count, hid_t hdf_integer_type, void *end_indices_out, hid_t read_prop, mhdf_Status *status)
void mhdf_readSetParentEndIndices (hid_t data_handle, long offset, long count, hid_t hdf_integer_type, void *end_indices_out, mhdf_Status *status)
 Read only the parent end indices portion of the set description table.
void mhdf_readSetParentEndIndicesWithOpt (hid_t data_handle, long offset, long count, hid_t hdf_integer_type, void *end_indices_out, hid_t read_prop, mhdf_Status *status)
void mhdf_writeSetMeta (hid_t data_handle, long offset, long count, hid_t hdf_integer_type, const void *set_desc_data, mhdf_Status *status)
 Write list of sets and meta-information about sets.
void mhdf_writeSetMetaWithOpt (hid_t data_handle, long offset, long count, hid_t hdf_integer_type, const void *set_desc_data, hid_t write_prop, mhdf_Status *status)
hid_t mhdf_createSetData (mhdf_FileHandle file_handle, long data_list_size, mhdf_Status *status)
 Create file object to hold list of meshset contents.
hid_t mhdf_openSetData (mhdf_FileHandle file_handle, long *data_list_size_out, mhdf_Status *status)
 Open the file object for the meshset contents.
void mhdf_writeSetData (hid_t set_handle, long offset, long count, hid_t hdf_integer_type, const void *set_data, mhdf_Status *status)
 Write set contents.
void mhdf_writeSetDataWithOpt (hid_t set_handle, long offset, long count, hid_t hdf_integer_type, const void *set_data, hid_t write_prop, mhdf_Status *status)
void mhdf_readSetData (hid_t set_handle, long offset, long count, hid_t hdf_integer_type, void *set_data, mhdf_Status *status)
 Read set contents.
void mhdf_readSetDataWithOpt (hid_t set_handle, long offset, long count, hid_t hdf_integer_type, void *set_data, hid_t read_prop, mhdf_Status *status)
hid_t mhdf_createSetChildren (mhdf_FileHandle file_handle, long child_list_size, mhdf_Status *status)
 Create file object for storing the set child list.
hid_t mhdf_openSetChildren (mhdf_FileHandle file_handle, long *child_list_size, mhdf_Status *status)
 Open the file object containing the set child list.
hid_t mhdf_createSetParents (mhdf_FileHandle file_handle, long parent_list_size, mhdf_Status *status)
 Create file object for storing the set parent list.
hid_t mhdf_openSetParents (mhdf_FileHandle file_handle, long *parent_list_size, mhdf_Status *status)
 Open the file object containing the set parent list.
void mhdf_writeSetParentsChildren (hid_t data_handle, long offset, long count, hid_t hdf_integer_type, const void *id_list, mhdf_Status *status)
 Write set parent/child list.
void mhdf_writeSetParentsChildrenWithOpt (hid_t data_handle, long offset, long count, hid_t hdf_integer_type, const void *id_list, hid_t write_prop, mhdf_Status *status)
void mhdf_readSetParentsChildren (hid_t data_handle, long offset, long count, hid_t hdf_integer_type, void *id_list, mhdf_Status *status)
 Read set parent/child list.
void mhdf_readSetParentsChildrenWithOpt (hid_t data_handle, long offset, long count, hid_t hdf_integer_type, void *id_list, hid_t read_prop, mhdf_Status *status)

Detailed Description

Meshset data is divided into three groups of data. The set-list/meta-information table, the set contents table and the set children table. Each is written and read independently.

The set list table contains one row for each set. Each row contains four values: {content list end index, child list end index, parent list end index, and flags}. The flags value is a collection of bits with values defined in Set flag bits . The all the flags except mhdf_SET_RANGE_BIT are saved properties of the mesh data and are not relevant to the actual file in any way. The mhdf_SET_RANGE_BIT flag is a toggle for how the meshset contents (not children) are saved. It is an internal property of the file format and should not be passed on to the mesh database. The content list end index and child list end index are the indices of the last entry for the set in the contents and children tables respectively. In the case where a set has either no children or no contents, the last index of should be the same as the last index of the previous set in the table, or -1 for the first set in the table. Thus the first index is always one greater than the last index of the previous set. If the first index, calculated as one greater that the last index of the previous set is greater than the last index of the current set, then there are no values in the corresponding contents or children table for that set.

The set contents table is a vector of integer global IDs that is the concatenation of the contents data for all of the mesh sets. The values are stored corresponding to the order of the sets in the set list table. Depending on the value of mhdf_SET_RANGE_BIT in the flags field of the set list table, the contents for a specific set may be stored in one of two formats. If the flag is set, the contents list is a list of pairs where each pair is a starting global Id and a count. For each pair, the set contains the range of global Ids beginning at the start value. If the mhdf_SET_RANGE_BIT flag is not set, the meshset contents are a simple list of global Ids.

The meshset child table is a vector of integer global IDs. It is a concatenation of the child lists for all the mesh sets, in the order the sets occur in the meshset list table. The values are always simple lists. The child table may never contain ranges of IDs.


Function Documentation

hid_t mhdf_createSetChildren ( mhdf_FileHandle  file_handle,
long  child_list_size,
mhdf_Status status 
)

Create file object for storing the set child list.

Create a data group for the list of set children. The format of this data is the concatenation of the lists of global IDs of child sets for each set. The order of the sets and the number of children for each set is contained in the set meta table. (See mhdf_createSetMeta ).

Parameters:
file_handleThe file
child_list_sizeThe total length of the data (the sum of the number of children for each set.)
statusPassed back status of API call.
Returns:
A handle to the data object in the file.

Definition at line 718 of file sets.c.

References API_BEGIN, API_END_H, dim, struct_FileHandle::hdf_handle, struct_FileHandle::id_type, mhdf_check_valid_file(), mhdf_create_table(), mhdf_setFail(), and SET_CHILD_PATH.

Referenced by moab::WriteHDF5::create_set_tables().

{
    FileHandle* file_ptr;
    hid_t table_id;
    hsize_t dim = (hsize_t)child_list_size;
    API_BEGIN;

    file_ptr = (FileHandle*)( file_handle );
    if( !mhdf_check_valid_file( file_ptr, status ) ) return -1;

    if( child_list_size < 1 )
    {
        mhdf_setFail( status, "Invalid argument.\n" );
        return -1;
    }

    table_id = mhdf_create_table( file_ptr->hdf_handle, SET_CHILD_PATH, file_ptr->id_type, 1, &dim, status );

    API_END_H( 1 );
    return table_id;
}
hid_t mhdf_createSetData ( mhdf_FileHandle  file_handle,
long  data_list_size,
mhdf_Status status 
)

Create file object to hold list of meshset contents.

Create set contents data object. The format of this data is a vector of integer values which is the concatenation of the contents list for all the meshsets. The length and format of the data for each set is stored in the set meta table. See mhdf_createSetMeta and mhdf_SET_RANGE_BIT for a description of that data.

Parameters:
file_handleThe file.
data_list_sizeThe total length (number of integer values) to be written for all the sets.
statusPassed back status of API call.
Returns:
A handle to the table.

Definition at line 635 of file sets.c.

References API_BEGIN, API_END_H, dim, struct_FileHandle::hdf_handle, struct_FileHandle::id_type, mhdf_check_valid_file(), mhdf_create_table(), mhdf_setFail(), and SET_DATA_PATH.

Referenced by moab::WriteHDF5::create_set_tables().

{
    FileHandle* file_ptr;
    hid_t table_id;
    hsize_t dim = (hsize_t)data_list_size;
    API_BEGIN;

    file_ptr = (FileHandle*)( file_handle );
    if( !mhdf_check_valid_file( file_ptr, status ) ) return -1;

    if( data_list_size < 1 )
    {
        mhdf_setFail( status, "Invalid argument.\n" );
        return -1;
    }

    table_id = mhdf_create_table( file_ptr->hdf_handle, SET_DATA_PATH, file_ptr->id_type, 1, &dim, status );

    API_END_H( 1 );
    return table_id;
}
hid_t mhdf_createSetMeta ( mhdf_FileHandle  file_handle,
long  num_sets,
long *  first_set_id_out,
mhdf_Status status 
)

Create table holding list of meshsets and their properties.

The set table contains description of sets, but not contents or children. The table is a n x 4 matrix of values. One row for each of n sets. Each row contains the end index for the set in the contents table, the end index for the set in the children table, the end index for the set in the parents table, and the set flags, respectively. The mhdf_SET_RANGE_BIT bit in the flags specifies the format of the contents list for each set. See a description of the mhdf_SET_RANGE_BIT flag for a description of the two possible data formats. The index values in the first two columns of the table are the index of the last value for the set in the corresponding contents and children lists. The first index is always one greater than the last index for the previous set in the table. The first index of the first set in the table is implicitly zero. A special value of -1 in the appropriate column should be used to indicate that the first set contains no contents or has no children. For any other set, if the last index for the set is the same as that of the previous set, it has no data in the corresponding list.

Parameters:
file_handleThe file.
num_setsThe number of sets in the table.
first_set_id_outThe global ID that will be assigned to the first set in the table. All subsequent sets in the table will be assigned sequential global IDs.
statusPassed back status of API call.
Returns:
The handle to the set meta-data table.

Definition at line 109 of file sets.c.

References API_BEGIN, API_END_H, struct_FileHandle::hdf_handle, struct_FileHandle::max_id, mhdf_check_valid_file(), mhdf_create_scalar_attrib(), mhdf_create_table(), MHDF_INDEX_TYPE, mhdf_setOkay(), mhdf_write_max_id(), struct_FileHandle::open_handle_count, SET_META_PATH, and START_ID_ATTRIB.

Referenced by moab::WriteHDF5::create_set_meta().

{
    FileHandle* file_ptr = (FileHandle*)file;
    hid_t table_id;
    hsize_t dims[2];
    long first_id;
    API_BEGIN;

    if( !mhdf_check_valid_file( file_ptr, status ) ) return -1;

    dims[0]  = (hsize_t)num_sets;
    dims[1]  = (hsize_t)4;
    table_id = mhdf_create_table( file_ptr->hdf_handle, SET_META_PATH, MHDF_INDEX_TYPE, 2, dims, status );
    if( table_id < 0 ) return -1;

    first_id = file_ptr->max_id + 1;
    if( !mhdf_create_scalar_attrib( table_id, START_ID_ATTRIB, H5T_NATIVE_LONG, &first_id, status ) )
    {
        H5Dclose( table_id );
        return -1;
    }

    *first_id_out = first_id;
    file_ptr->max_id += num_sets;
    if( !mhdf_write_max_id( file_ptr, status ) )
    {
        H5Dclose( table_id );
        return -1;
    }
    file_ptr->open_handle_count++;
    mhdf_setOkay( status );

    API_END_H( 1 );
    return table_id;
}
hid_t mhdf_createSetParents ( mhdf_FileHandle  file_handle,
long  parent_list_size,
mhdf_Status status 
)

Create file object for storing the set parent list.

Create a data group for the list of set parents. The format of this data is the concatenation of the lists of global IDs of parent sets for each set. The order of the sets and the number of parents for each set is contained in the set meta table. (See mhdf_createSetMeta ).

Parameters:
file_handleThe file
parent_list_sizeThe total length of the data (the sum of the number of parents for each set.)
statusPassed back status of API call.
Returns:
A handle to the data object in the file.

Definition at line 763 of file sets.c.

References API_BEGIN, API_END_H, dim, struct_FileHandle::hdf_handle, struct_FileHandle::id_type, mhdf_check_valid_file(), mhdf_create_table(), mhdf_setFail(), and SET_PARENT_PATH.

Referenced by moab::WriteHDF5::create_set_tables().

{
    FileHandle* file_ptr;
    hid_t table_id;
    hsize_t dim = (hsize_t)parent_list_size;
    API_BEGIN;

    file_ptr = (FileHandle*)( file_handle );
    if( !mhdf_check_valid_file( file_ptr, status ) ) return -1;

    if( parent_list_size < 1 )
    {
        mhdf_setFail( status, "Invalid argument.\n" );
        return -1;
    }

    table_id = mhdf_create_table( file_ptr->hdf_handle, SET_PARENT_PATH, file_ptr->id_type, 1, &dim, status );

    API_END_H( 1 );
    return table_id;
}
int mhdf_haveSets ( mhdf_FileHandle  file,
int *  have_data,
int *  have_child,
int *  have_parent,
mhdf_Status status 
)

Check if file contains any sets.

Parameters:
fileThe file.
have_set_data_outIf non-null set to 1 if file contains table of set contents, zero otherwise.
have_set_child_outIf non-null set to 1 if file contains table of set children, zero otherwise.
have_set_parents_outIf non-null set to 1 if file contains table of set parents, zero otherwise.
statusPassed back status of API call.
Returns:
Zero if the file does not contain any sets, one if it does.

MOAB, a Mesh-Oriented datABase, is a software component for creating, storing and accessing finite element mesh data.

Copyright 2004 Sandia Corporation. Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains certain rights in this software.

This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.

Definition at line 27 of file sets.c.

References API_BEGIN, API_END, struct_FileHandle::hdf_handle, mhdf_check_valid_file(), mhdf_is_in_group(), mhdf_setFail(), mhdf_setOkay(), ROOT_GROUP, SET_CHILD_NAME, SET_DATA_NAME, SET_GROUP, SET_GROUP_NAME, SET_META_NAME, and SET_PARENT_NAME.

Referenced by mhdf_getFileSummary().

{
    FileHandle* file_ptr = (FileHandle*)file;
    hid_t root_id, set_id;
    int result;
    API_BEGIN;

    if( !mhdf_check_valid_file( file_ptr, status ) ) return -1;

#if defined( H5Gopen_vers ) && H5Gopen_vers > 1
    root_id = H5Gopen2( file_ptr->hdf_handle, ROOT_GROUP, H5P_DEFAULT );
#else
    root_id = H5Gopen( file_ptr->hdf_handle, ROOT_GROUP );
#endif
    if( root_id < 0 )
    {
        mhdf_setFail( status, "H5Gopen( \"%s\" ) failed.", ROOT_GROUP );
        return -1;
    }

    result = mhdf_is_in_group( root_id, SET_GROUP_NAME, status );
    if( result < 1 )
    {
        H5Gclose( root_id );
        return result;
    }

#if defined( H5Gopen_vers ) && H5Gopen_vers > 1
    set_id = H5Gopen2( root_id, SET_GROUP_NAME, H5P_DEFAULT );
#else
    set_id  = H5Gopen( root_id, SET_GROUP_NAME );
#endif
    H5Gclose( root_id );
    if( set_id < 0 )
    {
        mhdf_setFail( status, "H5Gopen( \"%s\" ) failed.", SET_GROUP );
        return -1;
    }

    result = mhdf_is_in_group( set_id, SET_META_NAME, status );
    if( result < 0 )
    {
        H5Gclose( set_id );
        return result;
    }

    if( have_data )
    {
        *have_data = mhdf_is_in_group( set_id, SET_DATA_NAME, status );
        if( *have_data < 0 )
        {
            H5Gclose( set_id );
            return *have_data;
        }
    }

    if( have_child )
    {
        *have_child = mhdf_is_in_group( set_id, SET_CHILD_NAME, status );
        if( *have_child < 0 )
        {
            H5Gclose( set_id );
            return *have_child;
        }
    }

    if( have_parent )
    {
        *have_parent = mhdf_is_in_group( set_id, SET_PARENT_NAME, status );
        if( *have_parent < 0 )
        {
            H5Gclose( set_id );
            return *have_parent;
        }
    }

    mhdf_setOkay( status );
    H5Gclose( set_id );
    API_END;
    return result;
}
hid_t mhdf_openSetChildren ( mhdf_FileHandle  file_handle,
long *  child_list_size,
mhdf_Status status 
)

Open the file object containing the set child list.

Open the data group containing the list of set children. See mhdf_createSetChildren and mhdf_createSetMeta for a description of this data.

Parameters:
file_handleThe file
child_list_sizeThe total length of the data (the sum of the number of children for each set.)
statusPassed back status of API call.
Returns:
A handle to the data object in the file.

Definition at line 740 of file sets.c.

References API_BEGIN, API_END_H, dim, struct_FileHandle::hdf_handle, mhdf_check_valid_file(), mhdf_open_table(), mhdf_setFail(), and SET_CHILD_PATH.

Referenced by check_valid_sets(), moab::ReadHDF5::read_set_ids_recursive(), moab::ReadHDF5::read_sets(), and moab::WriteHDF5::write_sets().

{
    FileHandle* file_ptr;
    hid_t table_id;
    hsize_t dim;
    API_BEGIN;

    file_ptr = (FileHandle*)( file_handle );
    if( !mhdf_check_valid_file( file_ptr, status ) ) return -1;

    if( !child_list_size )
    {
        mhdf_setFail( status, "Invalid argument.\n" );
        return -1;
    }

    table_id = mhdf_open_table( file_ptr->hdf_handle, SET_CHILD_PATH, 1, &dim, status );

    *child_list_size = (long)dim;
    API_END_H( 1 );
    return table_id;
}
hid_t mhdf_openSetData ( mhdf_FileHandle  file_handle,
long *  data_list_size_out,
mhdf_Status status 
)

Open the file object for the meshset contents.

Open set contents data object. The format of this data is a vector of integer values which is the concatenation of the contents list for all the meshsets. The length and format of the data for each set is stored in the set meta table. See mhdf_createSetMeta and mhdf_SET_RANGE_BIT for a description of that data.

Parameters:
file_handleThe file.
data_list_size_outThe length of the table.
statusPassed back status of API call.
Returns:
A handle to the table.

Definition at line 657 of file sets.c.

References API_BEGIN, API_END_H, dim, struct_FileHandle::hdf_handle, mhdf_check_valid_file(), mhdf_open_table(), mhdf_setFail(), and SET_DATA_PATH.

Referenced by check_valid_sets(), moab::ReadHDF5::find_sets_containing(), moab::ReadHDF5::get_set_contents(), moab::ReadHDF5::read_set_ids_recursive(), moab::ReadHDF5::read_sets(), and moab::WriteHDF5::write_sets().

{
    FileHandle* file_ptr;
    hid_t table_id;
    hsize_t dim;
    API_BEGIN;

    file_ptr = (FileHandle*)( file_handle );
    if( !mhdf_check_valid_file( file_ptr, status ) ) return -1;

    if( !data_list_size_out )
    {
        mhdf_setFail( status, "Invalid argument.\n" );
        return -1;
    }

    table_id = mhdf_open_table( file_ptr->hdf_handle, SET_DATA_PATH, 1, &dim, status );

    *data_list_size_out = (long)dim;
    API_END_H( 1 );
    return table_id;
}
hid_t mhdf_openSetMeta ( mhdf_FileHandle  file_handle,
long *  num_sets_out,
long *  first_set_id_out,
mhdf_Status status 
)

Open table holding list of meshsets and their properties.

Open set list. See mhdf_createSetMeta or Meshset data. for a description of this data.

Parameters:
file_handleThe file.
num_sets_outThe number of sets in the table.
first_set_id_outThe global ID that will of the first set in the table. All subsequent sets in the table have sequential global IDs.
statusPassed back status of API call.
Returns:
The handle to the set meta-data table.

Definition at line 145 of file sets.c.

References API_BEGIN, API_END_H, struct_FileHandle::hdf_handle, mhdf_check_valid_file(), mhdf_open_table2(), mhdf_setFail(), mhdf_setOkay(), struct_FileHandle::open_handle_count, and SET_META_PATH.

Referenced by check_valid_sets(), mhdf_getFileSummary(), and moab::WriteHDF5::write_sets().

{
    FileHandle* file_ptr = (FileHandle*)file;
    hid_t table_id;
    hsize_t dims[2];
    API_BEGIN;

    if( !mhdf_check_valid_file( file_ptr, status ) ) return -1;

    table_id = mhdf_open_table2( file_ptr->hdf_handle, SET_META_PATH, 2, dims, first_id_out, status );
    if( table_id < 0 ) return -1;

    /* If dims[1] == 3, then old format of table.
     * Deal with it in mhdf_readSetMeta and mhdf_writeSetMeta
     */
    if( dims[1] != 4 && dims[1] != 3 )
    {
        mhdf_setFail( status, "Invalid format for meshset table.\n" );
        H5Dclose( table_id );
        return -1;
    }

    *num_sets = dims[0];
    file_ptr->open_handle_count++;
    mhdf_setOkay( status );
    API_END_H( 1 );
    return table_id;
}
hid_t mhdf_openSetMetaSimple ( mhdf_FileHandle  file_handle,
mhdf_Status status 
)

Definition at line 174 of file sets.c.

References API_BEGIN, API_END_H, struct_FileHandle::hdf_handle, mhdf_check_valid_file(), mhdf_open_table_simple(), mhdf_setOkay(), struct_FileHandle::open_handle_count, and SET_META_PATH.

Referenced by moab::ReadHDF5::read_all_set_meta().

{
    FileHandle* file_ptr = (FileHandle*)file;
    hid_t table_id;
    API_BEGIN;

    if( !mhdf_check_valid_file( file_ptr, status ) ) return -1;

    table_id = mhdf_open_table_simple( file_ptr->hdf_handle, SET_META_PATH, status );
    if( table_id < 0 ) return -1;

    file_ptr->open_handle_count++;
    mhdf_setOkay( status );
    API_END_H( 1 );
    return table_id;
}
hid_t mhdf_openSetParents ( mhdf_FileHandle  file_handle,
long *  parent_list_size,
mhdf_Status status 
)

Open the file object containing the set parent list.

Open the data group containing the list of set parents. See mhdf_createSetParents and mhdf_createSetMeta for a description of this data.

Parameters:
file_handleThe file
parent_list_sizeThe total length of the data (the sum of the number of parents for each set.)
statusPassed back status of API call.
Returns:
A handle to the data object in the file.

Definition at line 785 of file sets.c.

References API_BEGIN, API_END_H, dim, struct_FileHandle::hdf_handle, mhdf_check_valid_file(), mhdf_open_table(), mhdf_setFail(), and SET_PARENT_PATH.

Referenced by check_valid_sets(), moab::ReadHDF5::read_sets(), and moab::WriteHDF5::write_sets().

{
    FileHandle* file_ptr;
    hid_t table_id;
    hsize_t dim;
    API_BEGIN;

    file_ptr = (FileHandle*)( file_handle );
    if( !mhdf_check_valid_file( file_ptr, status ) ) return -1;

    if( !parent_list_size )
    {
        mhdf_setFail( status, "Invalid argument.\n" );
        return -1;
    }

    table_id = mhdf_open_table( file_ptr->hdf_handle, SET_PARENT_PATH, 1, &dim, status );

    *parent_list_size = (long)dim;
    API_END_H( 1 );
    return table_id;
}
void mhdf_readSetChildEndIndices ( hid_t  data_handle,
long  offset,
long  count,
hid_t  hdf_integer_type,
void *  end_indices_out,
mhdf_Status status 
)

Read only the child end indices portion of the set description table.

For each set, read the last index of that set's data in the set children table.

NOTE: This is a signed value. Any sets w/out contents that occur first in the list will have an end index of -1.

Parameters:
data_handleThe handle returned from mdhf_createSetMeta or mhdf_openSetMeta
offsetThe offset (set index) at which to begin reading.
countThe number of values (number of sets) to read.
hdf_integer_typeThe integer type of the input array 'set_flag_data'.
end_indices_outArray of indices.
statusLocation at which to store status of API call.

Definition at line 592 of file sets.c.

References API_BEGIN, API_END, CHILDREN, and mhdf_readSetMetaColumn().

Referenced by check_valid_parents_children().

{
    API_BEGIN;
    mhdf_readSetMetaColumn( table_id, CHILDREN, offset, count, type, data, H5P_DEFAULT, status );
    API_END;
}
void mhdf_readSetChildEndIndicesWithOpt ( hid_t  data_handle,
long  offset,
long  count,
hid_t  hdf_integer_type,
void *  end_indices_out,
hid_t  read_prop,
mhdf_Status status 
)

Definition at line 598 of file sets.c.

References API_BEGIN, API_END, CHILDREN, and mhdf_readSetMetaColumn().

{
    API_BEGIN;
    mhdf_readSetMetaColumn( table_id, CHILDREN, offset, count, type, data, prop, status );
    API_END;
}
void mhdf_readSetContentEndIndices ( hid_t  data_handle,
long  offset,
long  count,
hid_t  hdf_integer_type,
void *  end_indices_out,
mhdf_Status status 
)

Read only the content end indices portion of the set description table.

For each set, read the last index of that set's data in the set contents table.

NOTE: This is a signed value. Any sets w/out contents that occur first in the list will have an end index of -1.

Parameters:
data_handleThe handle returned from mdhf_createSetMeta or mhdf_openSetMeta
offsetThe offset (set index) at which to begin reading.
countThe number of values (number of sets) to read.
hdf_integer_typeThe integer type of the input array 'set_flag_data'.
end_indices_outArray of indices.
statusLocation at which to store status of API call.

Definition at line 568 of file sets.c.

References API_BEGIN, API_END, CONTENT, and mhdf_readSetMetaColumn().

Referenced by check_valid_set_contents().

{
    API_BEGIN;
    mhdf_readSetMetaColumn( table_id, CONTENT, offset, count, type, data, H5P_DEFAULT, status );
    API_END;
}
void mhdf_readSetContentEndIndicesWithOpt ( hid_t  data_handle,
long  offset,
long  count,
hid_t  hdf_integer_type,
void *  end_indices_out,
hid_t  read_prop,
mhdf_Status status 
)

Definition at line 579 of file sets.c.

References API_BEGIN, API_END, CONTENT, and mhdf_readSetMetaColumn().

{
    API_BEGIN;
    mhdf_readSetMetaColumn( table_id, CONTENT, offset, count, type, data, prop, status );
    API_END;
}
void mhdf_readSetData ( hid_t  set_handle,
long  offset,
long  count,
hid_t  hdf_integer_type,
void *  set_data,
mhdf_Status status 
)

Read set contents.

Read data specifying entities contained in sets. The format of this data is a vector of integer values which is the concatenation of the contents list for all the meshsets. The length and format of the data for each set is stored in the set meta table. See mhdf_createSetMeta and mhdf_SET_RANGE_BIT for a description of that data.

Parameters:
set_handleThe handle returned from mhdf_createSetData or mhdf_openSetData .
offsetThe position at which to read from the integer vector.
countThe number of values to read from the data vector.
hdf_integer_typeThe type of the integer data in set_data. Typically H5T_NATIVE_INT or N5T_NATIVE_LONG as defined in H5Tpublic.h. The HDF class of this type object must be H5T_INTEGER
set_dataA pointer to memory at which to store the read data.
statusPassed back status of API call.

Definition at line 699 of file sets.c.

References API_BEGIN, API_END, and mhdf_read_data().

Referenced by check_valid_set_contents(), and moab::ReadHDF5::find_sets_containing().

{
    API_BEGIN;
    mhdf_read_data( table_id, offset, count, type, data, H5P_DEFAULT, status );
    API_END;
}
void mhdf_readSetDataWithOpt ( hid_t  set_handle,
long  offset,
long  count,
hid_t  hdf_integer_type,
void *  set_data,
hid_t  read_prop,
mhdf_Status status 
)

Definition at line 705 of file sets.c.

References API_BEGIN, API_END, and mhdf_read_data().

Referenced by moab::ReadHDF5::find_sets_containing().

{
    API_BEGIN;
    mhdf_read_data( table_id, offset, count, type, data, prop, status );
    API_END;
}
void mhdf_readSetFlags ( hid_t  data_handle,
long  offset,
long  count,
hid_t  hdf_integer_type,
void *  set_flag_data,
mhdf_Status status 
)

Read only the flags portion of the set description table.

Read flags for each set from the set description table. See mhdf_createSetMeta for a description of this data.

Parameters:
data_handleThe handle returned from mdhf_createSetMeta or mhdf_openSetMeta
offsetThe offset (set index) at which to begin reading.
countThe number of values (number of sets) to read.
hdf_integer_typeThe integer type of the input array 'set_flag_data'.
set_flag_dataArray of integers.
statusLocation at which to store status of API call.

Definition at line 549 of file sets.c.

References API_BEGIN, API_END, FLAGS, and mhdf_readSetMetaColumn().

Referenced by check_valid_set_contents().

{
    API_BEGIN;
    mhdf_readSetMetaColumn( table_id, FLAGS, offset, count, type, data, H5P_DEFAULT, status );
    API_END;
}
void mhdf_readSetFlagsWithOpt ( hid_t  data_handle,
long  offset,
long  count,
hid_t  hdf_integer_type,
void *  set_flag_data,
hid_t  read_prop,
mhdf_Status status 
)

Definition at line 555 of file sets.c.

References API_BEGIN, API_END, FLAGS, and mhdf_readSetMetaColumn().

{
    API_BEGIN;
    mhdf_readSetMetaColumn( table_id, FLAGS, offset, count, type, data, prop, status );
    API_END;
}
void mhdf_readSetMeta ( hid_t  data_handle,
long  offset,
long  count,
hid_t  hdf_integer_type,
void *  set_desc_data,
mhdf_Status status 
)

Read list of sets and meta-information about sets.

Read set descriptions. See mhdf_createSetMeta or Meshset data. for a description of this data.

Parameters:
data_handleThe handle returned from mhdf_createSetMeta or mhdf_openSetMeta.
offsetThe offset (set index) to begin reading at.
countThe number of rows (sets, integer triples) to read.
hdf_integer_typeThe type of the integer data in set_desc_data. Typically H5T_NATIVE_INT or N5T_NATIVE_LONG as defined in H5Tpublic.h. The HDF class of this type object must be H5T_INTEGER
statusPassed back status of API call.
set_desc_dataThe memory location at which to write the data.

Definition at line 367 of file sets.c.

References API_BEGIN, API_END, and mhdf_readwriteSetMeta().

{
    API_BEGIN;
    mhdf_readwriteSetMeta( table_id, 1, offset, count, type, data, H5P_DEFAULT, status );
    API_END;
}
void mhdf_readSetMetaWithOpt ( hid_t  data_handle,
long  offset,
long  count,
hid_t  hdf_integer_type,
void *  set_desc_data,
hid_t  read_prop,
mhdf_Status status 
)

Definition at line 373 of file sets.c.

References API_BEGIN, API_END, and mhdf_readwriteSetMeta().

Referenced by moab::ReadHDF5::read_all_set_meta().

{
    API_BEGIN;
    mhdf_readwriteSetMeta( table_id, 1, offset, count, type, data, prop, status );
    API_END;
}
void mhdf_readSetParentEndIndices ( hid_t  data_handle,
long  offset,
long  count,
hid_t  hdf_integer_type,
void *  end_indices_out,
mhdf_Status status 
)

Read only the parent end indices portion of the set description table.

For each set, read the last index of that set's data in the set parents table.

NOTE: This is a signed value. Any sets w/out contents that occur first in the list will have an end index of -1.

Parameters:
data_handleThe handle returned from mdhf_createSetMeta or mhdf_openSetMeta
offsetThe offset (set index) at which to begin reading.
countThe number of values (number of sets) to read.
hdf_integer_typeThe integer type of the input array 'set_flag_data'.
end_indices_outArray of indices.
statusLocation at which to store status of API call.

Definition at line 611 of file sets.c.

References API_BEGIN, API_END, mhdf_readSetMetaColumn(), and PARENTS.

Referenced by check_valid_parents_children().

{
    API_BEGIN;
    mhdf_readSetMetaColumn( table_id, PARENTS, offset, count, type, data, H5P_DEFAULT, status );
    API_END;
}
void mhdf_readSetParentEndIndicesWithOpt ( hid_t  data_handle,
long  offset,
long  count,
hid_t  hdf_integer_type,
void *  end_indices_out,
hid_t  read_prop,
mhdf_Status status 
)

Definition at line 622 of file sets.c.

References API_BEGIN, API_END, mhdf_readSetMetaColumn(), and PARENTS.

{
    API_BEGIN;
    mhdf_readSetMetaColumn( table_id, PARENTS, offset, count, type, data, prop, status );
    API_END;
}
void mhdf_readSetParentsChildren ( hid_t  data_handle,
long  offset,
long  count,
hid_t  hdf_integer_type,
void *  id_list,
mhdf_Status status 
)

Read set parent/child list.

Read from the list of parent or child IDs for sets. See mhdf_createSetChildren and mhdf_createSetMeta for a description of this data.

Parameters:
data_handleThe value returned from mhdf_createSetChildren or mhdf_openSetChildren.
offsetThe offset into the list of global IDs.
countThe number of global IDs to read.
hdf_integer_typeThe type of the integer data in child_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_listPointer to memory in which to the read data.
statusPassed back status of API call.

Definition at line 832 of file sets.c.

References API_BEGIN, API_END, and mhdf_read_data().

Referenced by check_valid_parents_children().

{
    API_BEGIN;
    mhdf_read_data( table_id, offset, count, type, data, H5P_DEFAULT, status );
    API_END;
}
void mhdf_readSetParentsChildrenWithOpt ( hid_t  data_handle,
long  offset,
long  count,
hid_t  hdf_integer_type,
void *  id_list,
hid_t  read_prop,
mhdf_Status status 
)

Definition at line 838 of file sets.c.

References API_BEGIN, API_END, and mhdf_read_data().

{
    API_BEGIN;
    mhdf_read_data( table_id, offset, count, type, data, prop, status );
    API_END;
}
void mhdf_writeSetData ( hid_t  set_handle,
long  offset,
long  count,
hid_t  hdf_integer_type,
const void *  set_data,
mhdf_Status status 
)

Write set contents.

Write data specifying entities contained in sets. The format of this data is a vector of integer values which is the concatenation of the contents list for all the meshsets. The length and format of the data for each set is stored in the set meta table. See mhdf_createSetMeta and mhdf_SET_RANGE_BIT for a description of that data.

Parameters:
set_handleThe handle returned from mhdf_createSetData or mhdf_openSetData .
offsetThe position at which to write into the integer vector.
countThe number of values to write into the data vector.
hdf_integer_typeThe type of the integer data in set_data. Typically H5T_NATIVE_INT or N5T_NATIVE_LONG as defined in H5Tpublic.h. The HDF class of this type object must be H5T_INTEGER
set_dataThe data to write.
statusPassed back status of API call.

Definition at line 680 of file sets.c.

References API_BEGIN, API_END, and mhdf_write_data().

{
    API_BEGIN;
    mhdf_write_data( table_id, offset, count, type, data, H5P_DEFAULT, status );
    API_END;
}
void mhdf_writeSetDataWithOpt ( hid_t  set_handle,
long  offset,
long  count,
hid_t  hdf_integer_type,
const void *  set_data,
hid_t  write_prop,
mhdf_Status status 
)

Definition at line 686 of file sets.c.

References API_BEGIN, API_END, and mhdf_write_data().

Referenced by moab::WriteHDF5::write_set_data().

{
    API_BEGIN;
    mhdf_write_data( table_id, offset, count, type, data, prop, status );
    API_END;
}
void mhdf_writeSetMeta ( hid_t  data_handle,
long  offset,
long  count,
hid_t  hdf_integer_type,
const void *  set_desc_data,
mhdf_Status status 
)

Write list of sets and meta-information about sets.

Write set descriptions. See mhdf_createSetMeta or Meshset data. for a description of the data format.

Parameters:
data_handleThe handle returned from mhdf_createSetMeta or mhdf_openSetMeta.
offsetThe offset (set index) to begin writing at.
countThe number of rows (sets, integer triples) to write.
hdf_integer_typeThe type of the integer data in set_desc_data. Typically H5T_NATIVE_INT or N5T_NATIVE_LONG as defined in H5Tpublic.h. The HDF class of this type object must be H5T_INTEGER
set_desc_dataThe data to write.
statusPassed back status of API call.

Definition at line 386 of file sets.c.

References API_BEGIN, API_END, and mhdf_readwriteSetMeta().

{
    API_BEGIN;
    mhdf_readwriteSetMeta( table_id, 0, offset, count, type, (void*)data, H5P_DEFAULT, status );
    API_END;
}
void mhdf_writeSetMetaWithOpt ( hid_t  data_handle,
long  offset,
long  count,
hid_t  hdf_integer_type,
const void *  set_desc_data,
hid_t  write_prop,
mhdf_Status status 
)

Definition at line 392 of file sets.c.

References API_BEGIN, API_END, and mhdf_readwriteSetMeta().

Referenced by moab::WriteHDF5::write_sets().

{
    API_BEGIN;
    mhdf_readwriteSetMeta( table_id, 0, offset, count, type, (void*)data, prop, status );
    API_END;
}
void mhdf_writeSetParentsChildren ( hid_t  data_handle,
long  offset,
long  count,
hid_t  hdf_integer_type,
const void *  id_list,
mhdf_Status status 
)

Write set parent/child list.

Write the list of parent or child IDs for sets. See mhdf_createSetChildren and mhdf_createSetMeta for a description of this data.

Parameters:
data_handleThe value returned from mhdf_createSetChildren or mhdf_openSetChildren.
offsetThe offset into the list of global IDs.
countThe number of global IDs to write.
hdf_integer_typeThe type of the integer data in child_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_listThe data to write.
statusPassed back status of API call.

Definition at line 808 of file sets.c.

References API_BEGIN, API_END, and mhdf_write_data().

{
    API_BEGIN;
    mhdf_write_data( table_id, offset, count, type, data, H5P_DEFAULT, status );
    API_END;
}
void mhdf_writeSetParentsChildrenWithOpt ( hid_t  data_handle,
long  offset,
long  count,
hid_t  hdf_integer_type,
const void *  id_list,
hid_t  write_prop,
mhdf_Status status 
)

Definition at line 819 of file sets.c.

References API_BEGIN, API_END, and mhdf_write_data().

Referenced by moab::WriteHDF5::write_set_data().

{
    API_BEGIN;
    mhdf_write_data( table_id, offset, count, type, data, prop, status );
    API_END;
}
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines