Mesh Oriented datABase  (version 5.5.1)
An array-based unstructured mesh library
connectivity.c File Reference
#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"
+ Include dependency graph for connectivity.c:

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)
 

Function Documentation

◆ mhdf_createConnectivity()

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.

32 {
33  FileHandle* file_ptr;
34  hid_t elem_id, table_id;
35  hsize_t dims[2];
36  long first_id;
37  API_BEGIN;
38 
39  file_ptr = (FileHandle*)( file_handle );
40  if( !mhdf_check_valid_file( file_ptr, status ) ) return -1;
41 
42  if( nodes_per_elem <= 0 || count < 0 || !first_id_out )
43  {
44  mhdf_setFail( status, "Invalid argument." );
45  return -1;
46  }
47 
48  elem_id = mhdf_elem_group_from_handle( file_ptr, elem_handle, status );
49  if( elem_id < 0 ) return -1;
50 
51  dims[0] = (hsize_t)count;
52  dims[1] = (hsize_t)nodes_per_elem;
53  table_id = mhdf_create_table( elem_id, CONNECTIVITY_NAME, file_ptr->id_type, 2, dims, status );
54  H5Gclose( elem_id );
55  if( table_id < 0 ) return -1;
56 
57  first_id = file_ptr->max_id + 1;
58  if( !mhdf_create_scalar_attrib( table_id, START_ID_ATTRIB, H5T_NATIVE_LONG, &first_id, status ) )
59  {
60  H5Dclose( table_id );
61  return -1;
62  }
63 
64  *first_id_out = first_id;
65  file_ptr->max_id += count;
66  if( !mhdf_write_max_id( file_ptr, status ) )
67  {
68  H5Dclose( table_id );
69  return -1;
70  }
71  file_ptr->open_handle_count++;
72  mhdf_setOkay( status );
73 
74  API_END_H( 1 );
75  return table_id;
76 }

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().

◆ mhdf_createPolyConnectivity()

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.)

Parameters
file_handleThe file to write.
elem_handleThe element group.
num_polyThe total number number of polygons or polyhedra to be written in the table.
data_list_lengthThe 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_outElements 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_outThe handles for the index list and connectivity list, respectively.
statusPassed back status of API call.

Definition at line 187 of file connectivity.c.

194 {
195  FileHandle* file_ptr;
196  hid_t elem_id, index_id, conn_id;
197  hsize_t dim;
198  long first_id;
199  API_BEGIN;
200 
201  file_ptr = (FileHandle*)( file_handle );
202  if( !mhdf_check_valid_file( file_ptr, status ) ) return;
203 
204  if( num_poly <= 0 || data_list_length <= 0 || !first_id_out )
205  {
206  mhdf_setFail( status, "Invalid argument." );
207  return;
208  }
209 
210  if( data_list_length < 3 * num_poly )
211  {
212  /* Could check agains 4*num_poly, but allow degenerate polys
213  (1 for count plus 2 dim-1 defining entities, where > 2
214  defining entities is a normal poly, 2 defining entities
215  is a degenerate poly and 1 defning entity is not valid.)
216  */
217 
218  mhdf_setFail( status,
219  "Invalid polygon data: data length of %ld is "
220  "insufficient for %ld poly(gons/hedra).\n",
221  data_list_length, num_poly );
222  return;
223  }
224 
225  elem_id = mhdf_elem_group_from_handle( file_ptr, elem_type, status );
226  if( elem_id < 0 ) return;
227 
228  dim = (hsize_t)num_poly;
229  index_id = mhdf_create_table( elem_id, POLY_INDEX_NAME, MHDF_INDEX_TYPE, 1, &dim, status );
230  if( index_id < 0 )
231  {
232  H5Gclose( elem_id );
233  return;
234  }
235 
236  dim = (hsize_t)data_list_length;
237  conn_id = mhdf_create_table( elem_id, CONNECTIVITY_NAME, file_ptr->id_type, 1, &dim, status );
238  H5Gclose( elem_id );
239  if( conn_id < 0 )
240  {
241  H5Dclose( index_id );
242  return;
243  }
244 
245  first_id = file_ptr->max_id + 1;
246  if( !mhdf_create_scalar_attrib( conn_id, START_ID_ATTRIB, H5T_NATIVE_LONG, &first_id, status ) )
247  {
248  H5Dclose( index_id );
249  H5Dclose( conn_id );
250  return;
251  }
252 
253  *first_id_out = first_id;
254  file_ptr->max_id += num_poly;
255  if( !mhdf_write_max_id( file_ptr, status ) )
256  {
257  H5Dclose( index_id );
258  H5Dclose( conn_id );
259  return;
260  }
261  file_ptr->open_handle_count++;
262  mhdf_setOkay( status );
263  handles_out[0] = index_id;
264  handles_out[1] = conn_id;
265  API_END_H( 2 );
266 }

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.

◆ mhdf_openConnectivity()

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.

Parameters
file_handleThe file.
elem_handleThe element group.
num_nodes_per_elem_outUsed to pass back the number of nodes in each element.
num_elements_outPass back the number of elements in the table.
first_elem_id_outElements 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.
statusPassed back status of API call.
Returns
The HDF5 handle to the connectivity data.

Definition at line 78 of file connectivity.c.

84 {
85  FileHandle* file_ptr;
86  hid_t elem_id, table_id;
87  hsize_t dims[2];
88  API_BEGIN;
89 
90  file_ptr = (FileHandle*)( file_handle );
91  if( !mhdf_check_valid_file( file_ptr, status ) ) return -1;
92 
93  if( !num_nodes_per_elem_out || !num_elements_out || !first_elem_id_out )
94  {
95  mhdf_setFail( status, "Invalid argument." );
96  return -1;
97  }
98 
99  elem_id = mhdf_elem_group_from_handle( file_ptr, elem_handle, status );
100  if( elem_id < 0 ) return -1;
101 
102  table_id = mhdf_open_table2( elem_id, CONNECTIVITY_NAME, 2, dims, first_elem_id_out, status );
103 
104  H5Gclose( elem_id );
105  if( table_id < 0 ) return -1;
106 
107  *num_elements_out = dims[0];
108  *num_nodes_per_elem_out = dims[1];
109 
110  file_ptr->open_handle_count++;
111  mhdf_setOkay( status );
112  API_END_H( 1 );
113  return table_id;
114 }

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().

◆ mhdf_openConnectivitySimple()

hid_t mhdf_openConnectivitySimple ( mhdf_FileHandle  file_handle,
const char *  elem_handle,
mhdf_Status status 
)

Definition at line 116 of file connectivity.c.

117 {
118  FileHandle* file_ptr;
119  hid_t elem_id, table_id;
120  API_BEGIN;
121 
122  file_ptr = (FileHandle*)( file_handle );
123  if( !mhdf_check_valid_file( file_ptr, status ) ) return -1;
124 
125  elem_id = mhdf_elem_group_from_handle( file_ptr, elem_handle, status );
126  if( elem_id < 0 ) return -1;
127 
128  table_id = mhdf_open_table_simple( elem_id, CONNECTIVITY_NAME, status );
129 
130  H5Gclose( elem_id );
131  if( table_id < 0 ) return -1;
132 
133  file_ptr->open_handle_count++;
134  mhdf_setOkay( status );
135  API_END_H( 1 );
136  return table_id;
137 }

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().

◆ mhdf_openPolyConnectivity()

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.)

Parameters
file_handleThe file to write.
elem_handleThe element group.
num_poly_outThe total number number of polygons or polyhedra to be written in the table.
data_list_length_outThe 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_outElements 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_outThe handles for the index list and connectivity list, respectively.
statusPassed back status of API call.

Definition at line 268 of file connectivity.c.

275 {
276  FileHandle* file_ptr;
277  hid_t elem_id, table_id, index_id;
278  hsize_t row_count;
279  API_BEGIN;
280 
281  file_ptr = (FileHandle*)( file_handle );
282  if( !mhdf_check_valid_file( file_ptr, status ) ) return;
283 
284  if( !num_poly_out || !data_list_length_out || !first_poly_id_out )
285  {
286  mhdf_setFail( status, "Invalid argument." );
287  return;
288  }
289 
290  elem_id = mhdf_elem_group_from_handle( file_ptr, element_handle, status );
291  if( elem_id < 0 ) return;
292 
293  index_id = mhdf_open_table( elem_id, POLY_INDEX_NAME, 1, &row_count, status );
294  if( index_id < 0 )
295  {
296  H5Gclose( elem_id );
297  return;
298  }
299  *num_poly_out = (int)row_count;
300 
301  table_id = mhdf_open_table( elem_id, CONNECTIVITY_NAME, 1, &row_count, status );
302 
303  H5Gclose( elem_id );
304  if( table_id < 0 )
305  {
306  H5Dclose( index_id );
307  return;
308  }
309  *data_list_length_out = (long)row_count;
310 
311  if( !mhdf_read_scalar_attrib( table_id, START_ID_ATTRIB, H5T_NATIVE_LONG, first_poly_id_out, status ) )
312  {
313  H5Dclose( table_id );
314  H5Dclose( index_id );
315  return;
316  }
317 
318  file_ptr->open_handle_count++;
319  handles_out[0] = index_id;
320  handles_out[1] = table_id;
321  mhdf_setOkay( status );
322  API_END_H( 2 );
323 }

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().

◆ mhdf_readConnectivity()

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.

Parameters
data_handleHandle returned from mhdf_createConnectivity or mhdf_openConnectivity.
offsetTable row (element index) at which to start read.
countNumber of rows (number of elements) to read.
hdf_integer_typeThe 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_listPointer to memory at which to write interleaved connectivity data specified as global node IDs.
statusPassed back status of API call.

Definition at line 163 of file connectivity.c.

169 {
170  API_BEGIN;
171  mhdf_read_data( table_id, offset, count, hdf_integer_type, nodes, H5P_DEFAULT, status );
172  API_END;
173 }

References API_BEGIN, API_END, and mhdf_read_data().

Referenced by check_valid_elem_conn(), and main().

◆ mhdf_readConnectivityWithOpt()

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.

181 {
182  API_BEGIN;
183  mhdf_read_data( table_id, offset, count, hdf_integer_type, nodes, prop, status );
184  API_END;
185 }

References API_BEGIN, API_END, and mhdf_read_data().

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

◆ mhdf_readPolyConnIDs()

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.)

Parameters
poly_handleThe handle returned from mhdf_createPolyConnectivity or mhdf_openPolyConnectivity.
offsetThe 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.
countThe size of the integer list to read.
hdf_integer_typeThe 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_listThe memory location at which to write the connectivity data.
statusPassed back status of API call.

Definition at line 397 of file connectivity.c.

403 {
404  API_BEGIN;
405  mhdf_read_data( table_id, offset, count, hdf_integer_type, id_list, H5P_DEFAULT, status );
406  API_END;
407 }

References API_BEGIN, API_END, and mhdf_read_data().

Referenced by check_valid_poly_conn().

◆ mhdf_readPolyConnIDsWithOpt()

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 
)

Definition at line 408 of file connectivity.c.

415 {
416  API_BEGIN;
417  mhdf_read_data( table_id, offset, count, hdf_integer_type, id_list, prop, status );
418  API_END;
419 }

References API_BEGIN, API_END, and mhdf_read_data().

◆ mhdf_readPolyConnIndices()

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.)

Parameters
poly_handleThe handle returned from mhdf_createPolyConnectivity or mhdf_openPolyConnectivity.
offsetThe 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.
countThe size of the integer list to read.
hdf_integer_typeThe 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_listThe memory location at which to write the indices.
statusPassed back status of API call.

Definition at line 349 of file connectivity.c.

355 {
356  API_BEGIN;
357  mhdf_read_data( table_id, offset, count, hdf_integer_type, index_list, H5P_DEFAULT, status );
358  API_END;
359 }

References API_BEGIN, API_END, and mhdf_read_data().

Referenced by check_valid_poly_conn().

◆ mhdf_readPolyConnIndicesWithOpt()

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 
)

Definition at line 360 of file connectivity.c.

367 {
368  API_BEGIN;
369  mhdf_read_data( table_id, offset, count, hdf_integer_type, index_list, prop, status );
370  API_END;
371 }

References API_BEGIN, API_END, and mhdf_read_data().

◆ mhdf_writeConnectivity()

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.

Parameters
data_handleHandle returned from mhdf_createConnectivity or mhdf_openConnectivity.
offsetTable row (element index) at which to start writing.
countNumber of rows (number of elements) to write.
hdf_integer_typeThe 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_listInterleaved connectivity data specified as global node IDs.
statusPassed back status of API call.

Definition at line 139 of file connectivity.c.

145 {
146  API_BEGIN;
147  mhdf_write_data( table_id, offset, count, hdf_integer_type, nodes, H5P_DEFAULT, status );
148  API_END;
149 }

References API_BEGIN, API_END, and mhdf_write_data().

◆ mhdf_writeConnectivityWithOpt()

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.

157 {
158  API_BEGIN;
159  mhdf_write_data( table_id, offset, count, hdf_integer_type, nodes, prop, status );
160  API_END;
161 }

References API_BEGIN, API_END, and mhdf_write_data().

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

◆ mhdf_writePolyConnIDs()

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.

Parameters
poly_handleThe handle returned from mhdf_createPolyConnectivity or mhdf_openPolyConnectivity.
offsetThe 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.
countThe size of the integer list to write.
hdf_integer_typeThe 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_listThe count/global ID list specifying the connectivity of the polys.
statusPassed back status of API call.

Definition at line 373 of file connectivity.c.

379 {
380  API_BEGIN;
381  mhdf_write_data( table_id, offset, count, hdf_integer_type, id_list, H5P_DEFAULT, status );
382  API_END;
383 }

References API_BEGIN, API_END, and mhdf_write_data().

◆ mhdf_writePolyConnIDsWithOpt()

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.

391 {
392  API_BEGIN;
393  mhdf_write_data( table_id, offset, count, hdf_integer_type, id_list, prop, status );
394  API_END;
395 }

References API_BEGIN, API_END, and mhdf_write_data().

◆ mhdf_writePolyConnIndices()

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.

Parameters
poly_handleThe handle returned from mhdf_createPolyConnectivity or mhdf_openPolyConnectivity.
offsetThe 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.
countThe size of the integer list to write.
hdf_integer_typeThe 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_listThe index list for the polys.
statusPassed back status of API call.

Definition at line 325 of file connectivity.c.

331 {
332  API_BEGIN;
333  mhdf_write_data( table_id, offset, count, hdf_integer_type, index_list, H5P_DEFAULT, status );
334  API_END;
335 }

References API_BEGIN, API_END, and mhdf_write_data().

◆ mhdf_writePolyConnIndicesWithOpt()

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.

343 {
344  API_BEGIN;
345  mhdf_write_data( table_id, offset, count, hdf_integer_type, index_list, prop, status );
346  API_END;
347 }

References API_BEGIN, API_END, and mhdf_write_data().