#include <H5Tpublic.h>
#include <H5Dpublic.h>
#include <H5Gpublic.h>
#include <H5Ppublic.h>
#include "mhdf.h"
#include "util.h"
#include "file-handle.h"
#include "status.h"
#include "names-and-paths.h"
Go to the source code of this file.
Functions | |
hid_t | mhdf_createConnectivity (mhdf_FileHandle file_handle, const char *elem_handle, int nodes_per_elem, long count, long *first_id_out, mhdf_Status *status) |
Create connectivity table for an element group. More... | |
hid_t | mhdf_openConnectivity (mhdf_FileHandle file_handle, const char *elem_handle, int *num_nodes_per_elem_out, long *num_elements_out, long *first_elem_id_out, mhdf_Status *status) |
Open connectivity table for an element group. More... | |
hid_t | mhdf_openConnectivitySimple (mhdf_FileHandle file_handle, const char *elem_handle, mhdf_Status *status) |
void | mhdf_writeConnectivity (hid_t table_id, long offset, long count, hid_t hdf_integer_type, const void *nodes, mhdf_Status *status) |
Write element coordinate data. More... | |
void | mhdf_writeConnectivityWithOpt (hid_t table_id, long offset, long count, hid_t hdf_integer_type, const void *nodes, hid_t prop, mhdf_Status *status) |
void | mhdf_readConnectivity (hid_t table_id, long offset, long count, hid_t hdf_integer_type, void *nodes, mhdf_Status *status) |
Read element coordinate data. More... | |
void | mhdf_readConnectivityWithOpt (hid_t table_id, long offset, long count, hid_t hdf_integer_type, void *nodes, hid_t prop, mhdf_Status *status) |
void | mhdf_createPolyConnectivity (mhdf_FileHandle file_handle, const char *elem_type, long num_poly, long data_list_length, long *first_id_out, hid_t handles_out[2], mhdf_Status *status) |
Create a new table for polygon or polyhedron connectivity data. More... | |
void | mhdf_openPolyConnectivity (mhdf_FileHandle file_handle, const char *element_handle, long *num_poly_out, long *data_list_length_out, long *first_poly_id_out, hid_t handles_out[2], mhdf_Status *status) |
Open a table of polygon or polyhedron connectivity data. More... | |
void | mhdf_writePolyConnIndices (hid_t table_id, long offset, long count, hid_t hdf_integer_type, const void *index_list, mhdf_Status *status) |
Write polygon or polyhedron index data. More... | |
void | mhdf_writePolyConnIndicesWithOpt (hid_t table_id, long offset, long count, hid_t hdf_integer_type, const void *index_list, hid_t prop, mhdf_Status *status) |
void | mhdf_readPolyConnIndices (hid_t table_id, long offset, long count, hid_t hdf_integer_type, void *index_list, mhdf_Status *status) |
Read polygon or polyhedron index data. More... | |
void | mhdf_readPolyConnIndicesWithOpt (hid_t table_id, long offset, long count, hid_t hdf_integer_type, void *index_list, hid_t prop, mhdf_Status *status) |
void | mhdf_writePolyConnIDs (hid_t table_id, long offset, long count, hid_t hdf_integer_type, const void *id_list, mhdf_Status *status) |
Write polygon or polyhedron connectivity data. More... | |
void | mhdf_writePolyConnIDsWithOpt (hid_t table_id, long offset, long count, hid_t hdf_integer_type, const void *id_list, hid_t prop, mhdf_Status *status) |
void | mhdf_readPolyConnIDs (hid_t table_id, long offset, long count, hid_t hdf_integer_type, void *id_list, mhdf_Status *status) |
Read polygon or polyhedron connectivity data. More... | |
void | mhdf_readPolyConnIDsWithOpt (hid_t table_id, long offset, long count, hid_t hdf_integer_type, void *id_list, hid_t prop, mhdf_Status *status) |
hid_t mhdf_createConnectivity | ( | mhdf_FileHandle | file_handle, |
const char * | elem_handle, | ||
int | nodes_per_elem, | ||
long | count, | ||
long * | first_id_out, | ||
mhdf_Status * | status | ||
) |
Create connectivity table for an element group.
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 26 of file connectivity.c.
References API_BEGIN, API_END_H, CONNECTIVITY_NAME, struct_FileHandle::id_type, struct_FileHandle::max_id, mhdf_check_valid_file(), mhdf_create_scalar_attrib(), mhdf_create_table(), mhdf_elem_group_from_handle(), mhdf_setFail(), mhdf_setOkay(), mhdf_write_max_id(), struct_FileHandle::open_handle_count, and START_ID_ATTRIB.
Referenced by moab::WriteHDF5::create_elem_table().
void mhdf_createPolyConnectivity | ( | mhdf_FileHandle | file_handle, |
const char * | elem_handle, | ||
long | num_poly, | ||
long | data_list_length, | ||
long * | first_id_out, | ||
hid_t | idx_and_id_handles_out[2], | ||
mhdf_Status * | status | ||
) |
Create a new table for polygon or polyhedron connectivity data.
Poly (polygon or polyhedron) connectivity is stored as two lists. One list is the concatenation of the the connectivity data for all the polys in the group. The other contains one value per poly where that value is the index of the last entry in the connectivity of the corresponding poly. The ID list for polygons contains global node IDs. The ID list for polyhedra contains the global IDs of faces (either polygons or 2D fixed-connectivity elements.)
file_handle | The file to write. |
elem_handle | The element group. |
num_poly | The total number number of polygons or polyhedra to be written in the table. |
data_list_length | The total number of values to be written to the table (the number of polys plus the sum of the number of entities in each poly's connectivity data.) |
first_id_out | Elements are assigned global IDs in sequential blocks where the block is the table in which their connectivity data is written and the sequence is the sequence in which they are written in that table. The global ID for the first element in this group is passed back at this address. The global IDs for all other elements in the table are assigned in the sequence in which they are written in the table. |
idx_and_id_handles_out | The handles for the index list and connectivity list, respectively. |
status | Passed back status of API call. |
Definition at line 187 of file connectivity.c.
References API_BEGIN, API_END_H, CONNECTIVITY_NAME, dim, struct_FileHandle::id_type, struct_FileHandle::max_id, mhdf_check_valid_file(), mhdf_create_scalar_attrib(), mhdf_create_table(), mhdf_elem_group_from_handle(), MHDF_INDEX_TYPE, mhdf_setFail(), mhdf_setOkay(), mhdf_write_max_id(), struct_FileHandle::open_handle_count, POLY_INDEX_NAME, and START_ID_ATTRIB.
hid_t mhdf_openConnectivity | ( | mhdf_FileHandle | file_handle, |
const char * | elem_handle, | ||
int * | num_nodes_per_elem_out, | ||
long * | num_elements_out, | ||
long * | first_elem_id_out, | ||
mhdf_Status * | status | ||
) |
Open connectivity table for an element group.
Open fixed-connectivity data for an element group. Do NOT use this function for poly(gon/hedron) data. Use mhdf_isPolyElement
or mhdf_getTsttElemType
to check if the data is poly(gon|hedron) data before calling this function to open the data.
file_handle | The file. |
elem_handle | The element group. |
num_nodes_per_elem_out | Used to pass back the number of nodes in each element. |
num_elements_out | Pass back the number of elements in the table. |
first_elem_id_out | Elements are assigned global IDs in sequential blocks where the block is the table in which their connectivity data is written and the sequence is the sequence in which they are written in that table. The global ID for the first element in this group is passed back at this address. The global IDs for all other elements in the table are assigned in the sequence in which they are written in the table. |
status | Passed back status of API call. |
Definition at line 78 of file connectivity.c.
References API_BEGIN, API_END_H, CONNECTIVITY_NAME, mhdf_check_valid_file(), mhdf_elem_group_from_handle(), mhdf_open_table2(), mhdf_setFail(), mhdf_setOkay(), and struct_FileHandle::open_handle_count.
Referenced by get_elem_desc(), main(), and moab::WriteHDF5::write_elems().
hid_t mhdf_openConnectivitySimple | ( | mhdf_FileHandle | file_handle, |
const char * | elem_handle, | ||
mhdf_Status * | status | ||
) |
Definition at line 116 of file connectivity.c.
References API_BEGIN, API_END_H, CONNECTIVITY_NAME, mhdf_check_valid_file(), mhdf_elem_group_from_handle(), mhdf_open_table_simple(), mhdf_setOkay(), and struct_FileHandle::open_handle_count.
Referenced by check_valid_elem_conn(), moab::ReadHDF5::read_elems(), and moab::ReadHDF5::read_node_adj_elems().
void mhdf_openPolyConnectivity | ( | mhdf_FileHandle | file_handle, |
const char * | elem_handle, | ||
long * | num_poly_out, | ||
long * | data_list_length_out, | ||
long * | first_id_out, | ||
hid_t | idx_and_id_handles_out[2], | ||
mhdf_Status * | status | ||
) |
Open a table of polygon or polyhedron connectivity data.
Poly (polygon or polyhedron) connectivity is stored as two lists. One list is the concatenation of the the connectivity data for all the polys in the group. The other contains one value per poly where that value is the index of the last entry in the connectivity of the corresponding poly. The ID list for polygons contains global node IDs. The ID list for polyhedra contains the global IDs of faces (either polygons or 2D fixed-connectivity elements.)
file_handle | The file to write. |
elem_handle | The element group. |
num_poly_out | The total number number of polygons or polyhedra to be written in the table. |
data_list_length_out | The total number of values to be written to the table (the number of polys plus the sum of the number of entities in each poly's connectivity data.) |
first_id_out | Elements are assigned global IDs in sequential blocks where the block is the table in which their connectivity data is written and the sequence is the sequence in which they are written in that table. The global ID for the first element in this group is passed back at this address. The global IDs for all other elements in the table are assigned in the sequence in which they are written in the table. |
idx_and_id_handles_out | The handles for the index list and connectivity list, respectively. |
status | Passed back status of API call. |
Definition at line 268 of file connectivity.c.
References API_BEGIN, API_END_H, CONNECTIVITY_NAME, mhdf_check_valid_file(), mhdf_elem_group_from_handle(), mhdf_open_table(), mhdf_read_scalar_attrib(), mhdf_setFail(), mhdf_setOkay(), struct_FileHandle::open_handle_count, POLY_INDEX_NAME, and START_ID_ATTRIB.
Referenced by check_valid_poly_conn(), get_elem_desc(), and moab::ReadHDF5::read_poly().
void mhdf_readConnectivity | ( | hid_t | data_handle, |
long | offset, | ||
long | count, | ||
hid_t | hdf_integer_type, | ||
void * | node_id_list, | ||
mhdf_Status * | status | ||
) |
Read element coordinate data.
Read interleaved fixed-connectivity element data for a block of elements. Note: Do not use this for polygon or polyhedron data.
data_handle | Handle returned from mhdf_createConnectivity or mhdf_openConnectivity . |
offset | Table row (element index) at which to start read. |
count | Number of rows (number of elements) to read. |
hdf_integer_type | The type of the integer data in node_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 |
node_id_list | Pointer to memory at which to write interleaved connectivity data specified as global node IDs. |
status | Passed back status of API call. |
Definition at line 163 of file connectivity.c.
References API_BEGIN, API_END, and mhdf_read_data().
Referenced by check_valid_elem_conn(), and main().
void mhdf_readConnectivityWithOpt | ( | hid_t | table_id, |
long | offset, | ||
long | count, | ||
hid_t | hdf_integer_type, | ||
void * | nodes, | ||
hid_t | prop, | ||
mhdf_Status * | status | ||
) |
Definition at line 174 of file connectivity.c.
References API_BEGIN, API_END, and mhdf_read_data().
Referenced by moab::ReadHDF5::read_node_adj_elems().
void mhdf_readPolyConnIDs | ( | hid_t | poly_handle, |
long | offset, | ||
long | count, | ||
hid_t | hdf_integer_type, | ||
void * | id_list, | ||
mhdf_Status * | status | ||
) |
Read polygon or polyhedron connectivity data.
Poly (polygon or polyhedron) connectivity is stored as two lists. One list is the concatenation of the the connectivity data for all the polys in the group. The other contains one value per poly where that value is the index of the last entry in the connectivity of the corresponding poly. The ID list for polygons contains global node IDs. The ID list for polyhedra contains the global IDs of faces (either polygons or 2D fixed-connectivity elements.)
poly_handle | The handle returned from mhdf_createPolyConnectivity or mhdf_openPolyConnectivity . |
offset | The offset in the table at which to read. The offset is in terms of the integer values in the table, not the count of polys. |
count | The size of the integer list to read. |
hdf_integer_type | The type of the integer data as written into memory. 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 write the connectivity data. |
status | Passed back status of API call. |
Definition at line 397 of file connectivity.c.
References API_BEGIN, API_END, and mhdf_read_data().
Referenced by check_valid_poly_conn().
void mhdf_readPolyConnIDsWithOpt | ( | hid_t | table_id, |
long | offset, | ||
long | count, | ||
hid_t | hdf_integer_type, | ||
void * | id_list, | ||
hid_t | prop, | ||
mhdf_Status * | status | ||
) |
void mhdf_readPolyConnIndices | ( | hid_t | poly_handle, |
long | offset, | ||
long | count, | ||
hid_t | hdf_integer_type, | ||
void * | index_list, | ||
mhdf_Status * | status | ||
) |
Read polygon or polyhedron index data.
Poly (polygon or polyhedron) connectivity is stored as two lists. One list is the concatenation of the the connectivity data for all the polys in the group. The other contains one value per poly where that value is the index of the last entry in the connectivity of the corresponding poly. The ID list for polygons contains global node IDs. The ID list for polyhedra contains the global IDs of faces (either polygons or 2D fixed-connectivity elements.)
poly_handle | The handle returned from mhdf_createPolyConnectivity or mhdf_openPolyConnectivity . |
offset | The offset in the table at which to read. The offset is in terms of the integer values in the table, not the count of polys. |
count | The size of the integer list to read. |
hdf_integer_type | The type of the integer data as written into memory. Typically H5T_NATIVE_INT or N5T_NATIVE_LONG as defined in H5Tpublic.h. The HDF class of this type object must be H5T_INTEGER |
index_list | The memory location at which to write the indices. |
status | Passed back status of API call. |
Definition at line 349 of file connectivity.c.
References API_BEGIN, API_END, and mhdf_read_data().
Referenced by check_valid_poly_conn().
void mhdf_readPolyConnIndicesWithOpt | ( | hid_t | table_id, |
long | offset, | ||
long | count, | ||
hid_t | hdf_integer_type, | ||
void * | index_list, | ||
hid_t | prop, | ||
mhdf_Status * | status | ||
) |
void mhdf_writeConnectivity | ( | hid_t | data_handle, |
long | offset, | ||
long | count, | ||
hid_t | hdf_integer_type, | ||
const void * | node_id_list, | ||
mhdf_Status * | status | ||
) |
Write element coordinate data.
Write interleaved fixed-connectivity element data for a block of elements. Note: Do not use this for polygon or polyhedron data.
data_handle | Handle returned from mhdf_createConnectivity or mhdf_openConnectivity . |
offset | Table row (element index) at which to start writing. |
count | Number of rows (number of elements) to write. |
hdf_integer_type | The type of the integer data in node_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 |
node_id_list | Interleaved connectivity data specified as global node IDs. |
status | Passed back status of API call. |
Definition at line 139 of file connectivity.c.
References API_BEGIN, API_END, and mhdf_write_data().
void mhdf_writeConnectivityWithOpt | ( | hid_t | table_id, |
long | offset, | ||
long | count, | ||
hid_t | hdf_integer_type, | ||
const void * | nodes, | ||
hid_t | prop, | ||
mhdf_Status * | status | ||
) |
Definition at line 150 of file connectivity.c.
References API_BEGIN, API_END, and mhdf_write_data().
Referenced by moab::WriteHDF5::write_elems().
void mhdf_writePolyConnIDs | ( | hid_t | poly_handle, |
long | offset, | ||
long | count, | ||
hid_t | hdf_integer_type, | ||
const void * | id_list, | ||
mhdf_Status * | status | ||
) |
Write polygon or polyhedron connectivity data.
Poly (polygon or polyhedron) connectivity is stored as two lists. One list is the concatenation of the the connectivity data for all the polys in the group. The other contains one value per poly where that value is the index of the last entry in the connectivity of the corresponding poly. The ID list for polygons contains global node IDs. The ID list for polyhedra contains the global IDs of faces (either polygons or 2D fixed-connectivity elements.)
This function writes the connectivity/ID list.
poly_handle | The handle returned from mhdf_createPolyConnectivity or mhdf_openPolyConnectivity . |
offset | The offset in the table at which to write. The offset is in terms of the integer values in the table, not the count of polys. |
count | The size of the integer list 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 count/global ID list specifying the connectivity of the polys. |
status | Passed back status of API call. |
Definition at line 373 of file connectivity.c.
References API_BEGIN, API_END, and mhdf_write_data().
void mhdf_writePolyConnIDsWithOpt | ( | hid_t | table_id, |
long | offset, | ||
long | count, | ||
hid_t | hdf_integer_type, | ||
const void * | id_list, | ||
hid_t | prop, | ||
mhdf_Status * | status | ||
) |
Definition at line 384 of file connectivity.c.
References API_BEGIN, API_END, and mhdf_write_data().
void mhdf_writePolyConnIndices | ( | hid_t | poly_handle, |
long | offset, | ||
long | count, | ||
hid_t | hdf_integer_type, | ||
const void * | index_list, | ||
mhdf_Status * | status | ||
) |
Write polygon or polyhedron index data.
Poly (polygon or polyhedron) connectivity is stored as two lists. One list is the concatenation of the the connectivity data for all the polys in the group. The other contains one value per poly where that value is the index of the last entry in the connectivity of the corresponding poly. The ID list for polygons contains global node IDs. The ID list for polyhedra contains the global IDs of faces (either polygons or 2D fixed-connectivity elements.)
This function writes the index list.
poly_handle | The handle returned from mhdf_createPolyConnectivity or mhdf_openPolyConnectivity . |
offset | The offset in the table at which to write. The offset is in terms of the integer values in the table, not the count of polys. |
count | The size of the integer list 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 |
index_list | The index list for the polys. |
status | Passed back status of API call. |
Definition at line 325 of file connectivity.c.
References API_BEGIN, API_END, and mhdf_write_data().
void mhdf_writePolyConnIndicesWithOpt | ( | hid_t | table_id, |
long | offset, | ||
long | count, | ||
hid_t | hdf_integer_type, | ||
const void * | index_list, | ||
hid_t | prop, | ||
mhdf_Status * | status | ||
) |
Definition at line 336 of file connectivity.c.
References API_BEGIN, API_END, and mhdf_write_data().