Mesh Oriented datABase
(version 5.4.1)
Array-based unstructured mesh datastructure
|
Functions | |
hid_t | mhdf_createAdjacency (mhdf_FileHandle file_handle, const char *elem_handle, long adj_list_size, mhdf_Status *status) |
Create adjacency data table for nodes, elements, polys, etc. | |
int | mhdf_haveAdjacency (mhdf_FileHandle file, const char *elem_handle, mhdf_Status *status) |
Check if adjacency data is present in the file for the specified element group. | |
hid_t | mhdf_openAdjacency (mhdf_FileHandle file_handle, const char *elem_handle, long *adj_list_size, mhdf_Status *status) |
Open adjacency data table for nodes, elements, polys, etc. | |
void | mhdf_writeAdjacency (hid_t data_handle, long offset, long count, hid_t hdf_integer_type, const void *adj_list_data, mhdf_Status *status) |
Write node/element adjacency data. | |
void | mhdf_writeAdjacencyWithOpt (hid_t data_handle, long offset, long count, hid_t hdf_integer_type, const void *adj_list_data, hid_t write_prop, mhdf_Status *status) |
void | mhdf_readAdjacency (hid_t data_handle, long offset, long count, hid_t hdf_integer_type, void *adj_list_data_out, mhdf_Status *status) |
Read node/element adjacency data. | |
void | mhdf_readAdjacencyWithOpt (hid_t data_handle, long offset, long count, hid_t hdf_integer_type, void *adj_list_data_out, hid_t read_prop, mhdf_Status *status) |
Adjacency data is formated as a sequence of integer groups where the first entry in each group is the ID of the element for which adjacencies are being specified, the second value is the count of adjacent entities, and the remainder of the group is the list of IDs of the adjacent entities.
hid_t mhdf_createAdjacency | ( | mhdf_FileHandle | file_handle, |
const char * | elem_handle, | ||
long | adj_list_size, | ||
mhdf_Status * | status | ||
) |
Create adjacency data table for nodes, elements, polys, etc.
Create file object for adjacency data for a nodes or a specified element group.
Adjacency data is formated as a sequence of integer groups where the first entry in each group is the ID of the element for which adjacencies are being specified, the second value is the count of adjacent entities, and the remainder of the group is the list of IDs of the adjacent entities.
file_handle | The file. |
elem_handle | The element group (or the result of mhdf_node_type_handle for nodes) for which the adjacency data is to be specified. |
adj_list_size | The total number of integer values contained in the adjacency data for the specified element group. |
status | Passed back status of API call. |
Definition at line 61 of file adjacency.c.
References ADJACENCY_NAME, API_BEGIN, API_END_H, dim, struct_FileHandle::hdf_handle, struct_FileHandle::id_type, mhdf_check_valid_file(), mhdf_create_table(), mhdf_elem_group_from_handle(), mhdf_node_type_handle(), mhdf_setFail(), and NODE_ADJCY_PATH.
Referenced by moab::WriteHDF5Parallel::create_adjacency_tables(), and moab::WriteHDF5::serial_create_file().
{ FileHandle* file_ptr; hid_t elem_id, table_id; hsize_t dim = (hsize_t)adj_list_size; API_BEGIN; file_ptr = (FileHandle*)( file ); if( !mhdf_check_valid_file( file_ptr, status ) ) return -1; if( adj_list_size < 1 ) { mhdf_setFail( status, "Invalid argument.\n" ); return -1; } if( elem_handle == mhdf_node_type_handle() ) { table_id = mhdf_create_table( file_ptr->hdf_handle, NODE_ADJCY_PATH, file_ptr->id_type, 1, &dim, status ); } else { elem_id = mhdf_elem_group_from_handle( file_ptr, elem_handle, status ); if( elem_id < 0 ) return -1; table_id = mhdf_create_table( elem_id, ADJACENCY_NAME, file_ptr->id_type, 1, &dim, status ); H5Gclose( elem_id ); } API_END_H( 1 ); return table_id; }
int mhdf_haveAdjacency | ( | mhdf_FileHandle | file, |
const char * | elem_group, | ||
mhdf_Status * | status | ||
) |
Check if adjacency data is present in the file for the specified element group.
file | The file. |
elem_handle | A handle to an element group. |
status | Passed back status of API call. |
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 25 of file adjacency.c.
References ADJACENCY_NAME, API_BEGIN, API_END, struct_FileHandle::hdf_handle, mhdf_check_valid_file(), mhdf_elem_group_from_handle(), mhdf_is_in_group(), mhdf_node_type_handle(), mhdf_setFail(), mhdf_setOkay(), and NODE_GROUP.
Referenced by get_elem_desc().
{ FileHandle* file_ptr; hid_t elem_id; int result; API_BEGIN; file_ptr = (FileHandle*)( file ); if( !mhdf_check_valid_file( file_ptr, status ) ) return -1; if( elem_group == mhdf_node_type_handle() ) { #if defined( H5Gopen_vers ) && H5Gopen_vers > 1 elem_id = H5Gopen( file_ptr->hdf_handle, NODE_GROUP, H5P_DEFAULT ); #else elem_id = H5Gopen( file_ptr->hdf_handle, NODE_GROUP ); #endif if( elem_id < 0 ) { mhdf_setFail( status, "H5Gopen( \"%s\" ) failed.\n", NODE_GROUP ); return -1; } } else { elem_id = mhdf_elem_group_from_handle( file_ptr, elem_group, status ); if( elem_id < 0 ) return -1; } result = mhdf_is_in_group( elem_id, ADJACENCY_NAME, status ); H5Gclose( elem_id ); mhdf_setOkay( status ); API_END; return result; }
hid_t mhdf_openAdjacency | ( | mhdf_FileHandle | file_handle, |
const char * | elem_handle, | ||
long * | adj_list_size, | ||
mhdf_Status * | status | ||
) |
Open adjacency data table for nodes, elements, polys, etc.
Open the file object containing adjacency data for a nodes or a specified element group.
Adjacency data is formated as a sequence of integer groups where the first entry in each group is the ID of the element for which adjacencies are being specified, the second value is the count of adjacent entities, and the remainder of the group is the list of IDs of the adjacent entities.
file_handle | The file. |
elem_handle | The element group (or the result of mhdf_node_type_handle for nodes) for which the adjacency data is to be specified. |
adj_list_size | The total number of integer values contained in the adjacency data for the specified element group. |
status | Passed back status of API call. |
Definition at line 94 of file adjacency.c.
References ADJACENCY_NAME, API_BEGIN, API_END_H, dim, struct_FileHandle::hdf_handle, mhdf_check_valid_file(), mhdf_elem_group_from_handle(), mhdf_node_type_handle(), mhdf_open_table(), mhdf_setFail(), and NODE_ADJCY_PATH.
Referenced by check_valid_adjacencies(), moab::ReadHDF5::load_file_impl(), moab::ReadHDF5::load_file_partial(), and moab::WriteHDF5::write_adjacencies().
{ FileHandle* file_ptr; hid_t elem_id, table_id; hsize_t dim; API_BEGIN; file_ptr = (FileHandle*)( file ); if( !mhdf_check_valid_file( file_ptr, status ) ) return -1; if( !adj_list_size_out ) { mhdf_setFail( status, "Invalid argument.\n" ); return -1; } if( elem_handle == mhdf_node_type_handle() ) { table_id = mhdf_open_table( file_ptr->hdf_handle, NODE_ADJCY_PATH, 1, &dim, status ); } else { elem_id = mhdf_elem_group_from_handle( file_ptr, elem_handle, status ); if( elem_id < 0 ) return -1; table_id = mhdf_open_table( elem_id, ADJACENCY_NAME, 1, &dim, status ); H5Gclose( elem_id ); } *adj_list_size_out = (long)dim; API_END_H( 1 ); return table_id; }
void mhdf_readAdjacency | ( | hid_t | data_handle, |
long | offset, | ||
long | count, | ||
hid_t | hdf_integer_type, | ||
void * | adj_list_data_out, | ||
mhdf_Status * | status | ||
) |
Read node/element adjacency data.
Read adjacency data.
Adjacency data is formated as a sequence of integer groups where the first entry in each group is the ID of the element for which adjacencies are being specified, the second value is the count of adjacent entities, and the remainder of the group is the list of IDs of the adjacent entities.
data_handle | Handle returned from mhdf_createAdjacency or mhdf_openAdjacency . |
offset | List position at which to start reading. Offset is from the count if integer values written, NOT a count of the number of elements for which adjacency data is written. |
count | Number of integer values to reading. |
hdf_integer_type | The type of the integer data in adj_list_data_out . Typically H5T_NATIVE_INT or N5T_NATIVE_LONG as defined in H5Tpublic.h. The HDF class of this type object must be H5T_INTEGER |
adj_list_data_out | Pointer to memory at which to write adjacency data. |
status | Passed back status of API call. |
Definition at line 148 of file adjacency.c.
References API_BEGIN, API_END, and mhdf_read_data().
Referenced by check_valid_adjacencies().
{ API_BEGIN; mhdf_read_data( table_id, offset, count, type, data, H5P_DEFAULT, status ); API_END; }
void mhdf_readAdjacencyWithOpt | ( | hid_t | data_handle, |
long | offset, | ||
long | count, | ||
hid_t | hdf_integer_type, | ||
void * | adj_list_data_out, | ||
hid_t | read_prop, | ||
mhdf_Status * | status | ||
) |
Definition at line 154 of file adjacency.c.
References API_BEGIN, API_END, and mhdf_read_data().
Referenced by moab::ReadHDF5::read_adjacencies().
{ API_BEGIN; mhdf_read_data( table_id, offset, count, type, data, prop, status ); API_END; }
void mhdf_writeAdjacency | ( | hid_t | data_handle, |
long | offset, | ||
long | count, | ||
hid_t | hdf_integer_type, | ||
const void * | adj_list_data, | ||
mhdf_Status * | status | ||
) |
Write node/element adjacency data.
Write adjacency data.
Adjacency data is formated as a sequence of integer groups where the first entry in each group is the ID of the element for which adjacencies are being specified, the second value is the count of adjacent entities, and the remainder of the group is the list of IDs of the adjacent entities.
data_handle | Handle returned from mhdf_createAdjacency or mhdf_openAdjacency . |
offset | List position at which to start writing. Offset is from the count if integer values written, NOT a count of the number of elements for which adjacency data is written. |
count | Number of integer values to write. |
hdf_integer_type | The type of the integer data in adj_list_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 |
adj_list_data | Adjacency data to write. |
status | Passed back status of API call. |
Definition at line 128 of file adjacency.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_writeAdjacencyWithOpt | ( | hid_t | data_handle, |
long | offset, | ||
long | count, | ||
hid_t | hdf_integer_type, | ||
const void * | adj_list_data, | ||
hid_t | write_prop, | ||
mhdf_Status * | status | ||
) |
Definition at line 135 of file adjacency.c.
References API_BEGIN, API_END, and mhdf_write_data().
Referenced by moab::WriteHDF5::write_adjacencies().
{ API_BEGIN; mhdf_write_data( table_id, offset, count, type, data, prop, status ); API_END; }