adapted to coding style

This commit is contained in:
2010-05-21 11:59:11 +00:00
parent 7e6e819ad9
commit 5d94a6ccd8
9 changed files with 283 additions and 288 deletions
+37 -39
View File
@@ -52,13 +52,13 @@
\return File handle.
\return NULL on error.
*/
h5_file_t *
h5_file_t*
H5OpenFile (
const char * filename, /*!< file name */
const char* filename, /*!< file name */
const h5_int32_t oflag, /*!< file open flags */
const MPI_Comm comm /*!< MPI communicator */
) {
return h5_open_file( filename, H5_O_RDWR, comm, __func__ );
return h5_open_file (filename, H5_O_RDWR, comm, __func__);
}
/*!
@@ -70,10 +70,10 @@ H5OpenFile (
*/
h5_err_t
H5CloseFile (
h5_file_t * const f /*!< file handle */
h5_file_t* const f /*!< file handle */
) {
SET_FNAME ( f, __func__ );
return h5_close_file ( f );
SET_FNAME (f, __func__);
return h5_close_file (f);
}
/*!
@@ -88,13 +88,13 @@ H5CloseFile (
*/
h5_err_t
H5DefineStepNameFormat (
h5_file_t *f, /*!< Handle to file */
const char *name, /*!< Prefix */
h5_file_t* const f, /*!< Handle to file */
const char* name, /*!< Prefix */
const h5_int64_t width /*!< Width of the number */
) {
SET_FNAME ( f, __func__ );
SET_FNAME (f, __func__);
return h5_set_stepname_fmt( f, name, width );
return h5_set_stepname_fmt (f, name, width);
}
/*!
@@ -107,14 +107,14 @@ H5DefineStepNameFormat (
*/
h5_err_t
H5GetStepNameFormat (
h5_file_t *f, /*!< Handle to file */
char *name, /*!< OUT: Prefix */
h5_file_t* const f, /*!< Handle to file */
char* name, /*!< OUT: Prefix */
const h5_size_t l_name, /*!< length of buffer name */
h5_size_t *width /*!< OUT: Width of the number */
h5_size_t* width /*!< OUT: Width of the number */
) {
SET_FNAME ( f, __func__ );
SET_FNAME (f, __func__);
return h5_get_stepname_fmt( f, name, l_name, width );
return h5_get_stepname_fmt (f, name, l_name, width);
}
/*!
@@ -126,12 +126,12 @@ H5GetStepNameFormat (
*/
h5_err_t
H5SetStep (
h5_file_t *f, /*!< [in] Handle to open file */
h5_file_t* const f, /*!< [in] Handle to open file */
const h5_int64_t step /*!< [in] Step to set. */
) {
SET_FNAME ( f, __func__ );
return h5_set_step ( f, step );
SET_FNAME (f, __func__);
return h5_set_step (f, step);
}
/*!
@@ -143,11 +143,11 @@ H5SetStep (
*/
h5_id_t
H5GetStep (
h5_file_t *f /*!< Handle to open file */
h5_file_t* const f /*!< Handle to open file */
) {
SET_FNAME ( f, __func__ );
return h5_get_step ( f );
SET_FNAME (f, __func__);
return h5_get_step (f);
}
/*!
@@ -159,12 +159,12 @@ H5GetStep (
*/
h5_err_t
H5StartTraverseSteps (
h5_file_t *f /*!< Handle to open file */
h5_file_t* const f /*!< Handle to open file */
) {
SET_FNAME ( f, __func__ );
SET_FNAME (f, __func__);
return h5_start_traverse_steps( f );
return h5_start_traverse_steps (f);
}
/*!
@@ -176,12 +176,12 @@ H5StartTraverseSteps (
*/
h5_err_t
H5TraverseSteps (
h5_file_t * f /*!< Handle to open file */
h5_file_t* const f /*!< Handle to open file */
) {
SET_FNAME ( f, __func__ );
SET_FNAME (f, __func__);
return h5_traverse_steps( f );
return h5_traverse_steps (f);
}
/*!
@@ -200,8 +200,7 @@ h5_err_t
H5SetVerbosityLevel (
const h5_id_t level
) {
return h5_set_debuglevel ( level );
return h5_set_debuglevel (level);
}
/*!
@@ -215,8 +214,7 @@ h5_err_t
H5SetErrorHandler (
h5_errorhandler_t handler
) {
return h5_set_errorhandler( handler );
return h5_set_errorhandler (handler);
}
/*!
@@ -235,20 +233,20 @@ H5GetErrorHandler (
h5_err_t
H5ReportErrorhandler (
h5_file_t * const f,
const char *fmt,
h5_file_t* const f,
const char* fmt,
va_list ap
) {
return h5_report_errorhandler ( f, fmt, ap );
return h5_report_errorhandler (f, fmt, ap);
}
h5_err_t
H5AbortErrorhandler (
h5_file_t * const f,
const char *fmt,
h5_file_t* const f,
const char* fmt,
va_list ap
) {
return h5_abort_errorhandler ( f, fmt, ap );
return h5_abort_errorhandler (f, fmt, ap);
}
/*!
@@ -260,8 +258,8 @@ H5AbortErrorhandler (
*/
h5_err_t
H5GetErrno (
h5_file_t * const f
h5_file_t* const f
) {
return h5_get_errno( f );
return h5_get_errno (f);
}
/*! @} */
+9 -9
View File
@@ -20,34 +20,34 @@
h5_err_t
H5FedOpenMesh (
h5_file_t * const f,
h5_file_t* const f,
const h5_id_t mesh_id,
const h5_oid_t mesh_type_id
) {
SET_FNAME ( f, __func__ );
return h5t_open_mesh ( f, mesh_id, mesh_type_id );
SET_FNAME (f, __func__);
return h5t_open_mesh (f, mesh_id, mesh_type_id);
}
h5_err_t
H5FedCloseMesh (
h5_file_t * const f
h5_file_t* const f
) {
return h5t_close_mesh (f);
}
h5_err_t
H5FedSetLevel (
h5_file_t * const f,
h5_file_t* const f,
const h5_id_t level_id
) {
SET_FNAME ( f, __func__ );
return h5t_open_level ( f, level_id );
SET_FNAME (f, __func__);
return h5t_open_level (f, level_id);
}
h5_err_t
H5FedLinkMeshToStep (
h5_file_t * f,
h5_file_t* const f,
const h5_id_t mesh_id
) {
return h5_error_not_implemented ( f, __FILE__, __func__, __LINE__ );
return h5_error_not_implemented (f, __FILE__, __func__, __LINE__);
}
+52 -52
View File
@@ -24,129 +24,129 @@
*/
h5_err_t
H5FedGetEdgesUpAdjacentToVertex (
h5_file_t * const f,
h5_file_t* const f,
const h5_id_t local_vid,
h5_idlist_t **list
h5_idlist_t** list
) {
SET_FNAME ( f, __func__ );
return h5t_get_edges_upadjacent_to_vertex ( f, local_vid, list );
SET_FNAME (f, __func__);
return h5t_get_edges_upadjacent_to_vertex (f, local_vid, list);
}
h5_err_t
H5FedGetTrianglesUpAdjacentToVertex (
h5_file_t * const f,
h5_file_t* const f,
const h5_id_t local_vid,
h5_idlist_t **list
h5_idlist_t** list
) {
SET_FNAME ( f, __func__ );
return h5t_get_triangles_upadjacent_to_vertex ( f, local_vid, list );
SET_FNAME( f, __func__);
return h5t_get_triangles_upadjacent_to_vertex (f, local_vid, list);
}
h5_err_t
H5FedGetTetsUpAdjacentToVertex (
h5_file_t * const f,
h5_file_t* const f,
const h5_id_t local_vid,
h5_idlist_t **list
h5_idlist_t** list
) {
SET_FNAME ( f, __func__ );
return h5t_get_tets_upadjacent_to_vertex ( f, local_vid, list );
SET_FNAME (f, __func__);
return h5t_get_tets_upadjacent_to_vertex (f, local_vid, list);
}
h5_err_t
H5FedGetTrianglesUpAdjacentToEdge (
h5_file_t * const f,
h5_file_t* const f,
const h5_id_t local_kid,
h5_idlist_t **list
h5_idlist_t** list
) {
SET_FNAME ( f, __func__ );
return h5t_get_triangles_upadjacent_to_edge ( f, local_kid, list );
SET_FNAME (f, __func__);
return h5t_get_triangles_upadjacent_to_edge (f, local_kid, list);
}
h5_err_t
H5FedGetTetsUpAdjacentToEdge (
h5_file_t * const f,
h5_file_t* const f,
const h5_id_t local_kid,
h5_idlist_t **list
h5_idlist_t** list
) {
SET_FNAME ( f, __func__ );
return h5t_get_tets_upadjacent_to_edge ( f, local_kid, list );
SET_FNAME (f, __func__);
return h5t_get_tets_upadjacent_to_edge (f, local_kid, list);
}
h5_err_t
H5FedGetTetsUpAdjacentToTriangle (
h5_file_t * const f,
h5_file_t* const f,
const h5_id_t local_did,
h5_idlist_t **list
h5_idlist_t** list
) {
SET_FNAME ( f, __func__ );
return h5t_get_tets_upadjacent_to_triangle ( f, local_did, list );
SET_FNAME (f, __func__);
return h5t_get_tets_upadjacent_to_triangle (f, local_did, list);
}
h5_err_t
H5FedGetVerticesDownAdjacentToEdge (
h5_file_t * const f,
h5_file_t* const f,
const h5_id_t local_kid,
h5_idlist_t **list
h5_idlist_t** list
) {
SET_FNAME ( f, __func__ );
return h5t_get_vertices_downadjacent_to_edge ( f, local_kid, list );
SET_FNAME (f, __func__);
return h5t_get_vertices_downadjacent_to_edge (f, local_kid, list);
}
h5_err_t
H5FedGetVerticesDownAdjacentToTriangle (
h5_file_t * const f,
h5_file_t* const f,
const h5_id_t local_did,
h5_idlist_t **list
h5_idlist_t** list
) {
SET_FNAME ( f, __func__ );
return h5t_get_vertices_downadjacent_to_triangle ( f, local_did, list );
SET_FNAME (f, __func__);
return h5t_get_vertices_downadjacent_to_triangle (f, local_did, list);
}
h5_err_t
H5FedGetVerticesDownAdjacentToTet (
h5_file_t * const f,
h5_file_t* const f,
const h5_id_t local_tid,
h5_idlist_t **list
h5_idlist_t** list
) {
SET_FNAME ( f, __func__ );
return h5t_get_vertices_downadjacent_to_tet ( f, local_tid, list );
SET_FNAME (f, __func__);
return h5t_get_vertices_downadjacent_to_tet (f, local_tid, list);
}
h5_err_t
H5FedGetEdgesDownAdjacentToTriangle (
h5_file_t * const f,
h5_file_t* const f,
const h5_id_t local_did,
h5_idlist_t **list
h5_idlist_t** list
) {
SET_FNAME ( f, __func__ );
return h5t_get_edges_downadjacent_to_triangle ( f, local_did, list );
SET_FNAME (f, __func__);
return h5t_get_edges_downadjacent_to_triangle (f, local_did, list);
}
h5_err_t
H5FedGetEdgesDownAdjacentToTet (
h5_file_t * const f,
h5_file_t* const f,
const h5_id_t local_tid,
h5_idlist_t **list
h5_idlist_t** list
) {
SET_FNAME ( f, __func__ );
return h5t_get_edges_downadjacent_to_tet ( f, local_tid, list );
SET_FNAME (f, __func__);
return h5t_get_edges_downadjacent_to_tet (f, local_tid, list);
}
h5_err_t
H5FedGetTrianglesDownAdjacentToTet (
h5_file_t * const f,
h5_file_t* const f,
const h5_id_t local_tid,
h5_idlist_t **list
h5_idlist_t** list
) {
SET_FNAME ( f, __func__ );
return h5t_get_triangles_downadjacent_to_tet ( f, local_tid, list );
SET_FNAME (f, __func__);
return h5t_get_triangles_downadjacent_to_tet (f, local_tid, list);
}
h5_err_t
H5FedReleaseListOfAdjacencies (
h5_file_t * const f,
h5_idlist_t **list
h5_file_t* const f,
h5_idlist_t** list
) {
SET_FNAME ( f, __func__ );
return h5priv_free_idlist ( f, list );
SET_FNAME (f, __func__);
return h5priv_free_idlist (f, list);
}
+27 -27
View File
@@ -32,11 +32,11 @@
*/
h5_size_t
H5FedGetNumMeshes (
h5_file_t * const f,
h5_file_t* const f,
const h5_oid_t type_id
) {
SET_FNAME ( f, __func__ );
return h5t_get_num_meshes ( f, type_id );
SET_FNAME (f, __func__);
return h5t_get_num_meshes (f, type_id);
}
/*!
@@ -48,10 +48,10 @@ H5FedGetNumMeshes (
*/
h5_size_t
H5FedGetNumLevels (
h5_file_t * const f
h5_file_t* const f
) {
SET_FNAME ( f, __func__ );
return h5t_get_num_levels ( f );
SET_FNAME (f, __func__);
return h5t_get_num_levels (f);
}
/*!
@@ -63,10 +63,10 @@ H5FedGetNumLevels (
*/
h5_id_t
H5FedGetLevel (
h5_file_t * const f
h5_file_t* const f
) {
SET_FNAME ( f, __func__ );
return h5t_get_level ( f );
SET_FNAME (f, __func__);
return h5t_get_level (f);
}
/*!
@@ -79,10 +79,10 @@ H5FedGetLevel (
*/
h5_size_t
H5FedGetNumVertices (
h5_file_t * const f /*!< file handle */
h5_file_t* const f /*!< file handle */
) {
SET_FNAME ( f, __func__ );
return h5t_get_num_vertices ( f, f->myproc );
SET_FNAME (f, __func__);
return h5t_get_num_vertices (f, f->myproc);
}
/*!
@@ -96,11 +96,11 @@ H5FedGetNumVertices (
*/
h5_size_t
H5FedGetNumVerticesCnode (
h5_file_t * const f,
h5_file_t* const f,
const h5_id_t cnode
) {
SET_FNAME ( f, __func__ );
return h5t_get_num_vertices ( f, cnode );
SET_FNAME (f, __func__);
return h5t_get_num_vertices (f, cnode);
}
/*!
@@ -113,10 +113,10 @@ H5FedGetNumVerticesCnode (
*/
h5_size_t
H5FedGetNumVerticesTotal (
h5_file_t * const f
h5_file_t* const f
) {
SET_FNAME ( f, __func__ );
return h5t_get_num_vertices ( f, -1 );
SET_FNAME (f, __func__);
return h5t_get_num_vertices (f, -1);
}
/*!
@@ -129,10 +129,10 @@ H5FedGetNumVerticesTotal (
*/
h5_size_t
H5FedGetNumElements (
h5_file_t * const f
h5_file_t* const f
) {
SET_FNAME ( f, __func__ );
return h5t_get_num_elems ( f, f->myproc );
SET_FNAME (f, __func__);
return h5t_get_num_elems (f, f->myproc);
}
/*!
@@ -146,11 +146,11 @@ H5FedGetNumElements (
*/
h5_size_t
H5FedGetNumElementsCnode (
h5_file_t * const f,
h5_file_t* const f,
const h5_id_t cnode
) {
SET_FNAME ( f, __func__ );
return h5t_get_num_elems ( f, cnode );
SET_FNAME (f, __func__);
return h5t_get_num_elems (f, cnode);
}
/*!
Returns the number of elements present in the mesh
@@ -162,8 +162,8 @@ H5FedGetNumElementsCnode (
*/
h5_size_t
H5FedGetNumElementsTotal (
h5_file_t * const f
h5_file_t* const f
) {
SET_FNAME ( f, __func__ );
return h5t_get_num_elems ( f, -1 );
SET_FNAME (f, __func__);
return h5t_get_num_elems (f, -1);
}
+5 -5
View File
@@ -39,7 +39,7 @@ H5FedBeginTraverseEntities (
int codim
) {
h5t_entity_iterator_t* iter;
SET_FNAME ( f, __func__ );
SET_FNAME (f, __func__);
if (h5t_alloc_entity_iterator (f, &iter, codim) < 0) {
return (void*)H5_ERR;
}
@@ -61,7 +61,7 @@ H5FedTraverseEntities (
h5_file_t* const f,
h5t_entity_iterator_t* iter
) {
SET_FNAME ( f, __func__ );
SET_FNAME (f, __func__);
return h5t_iterate_entities (f, iter);
}
@@ -78,7 +78,7 @@ H5FedEndTraverseEntities (
h5_file_t* const f,
h5t_entity_iterator_t* iter
) {
SET_FNAME ( f, __func__ );
SET_FNAME (f, __func__);
return h5t_release_entity_iterator (f, iter);
}
@@ -98,7 +98,7 @@ H5FedGetVertexCoordsByIndex (
h5_id_t vertex_index,
h5_float64_t P[3]
) {
SET_FNAME ( f, __func__ );
SET_FNAME (f, __func__);
return h5t_get_vertex_coords_by_index (f, vertex_index, P);
}
@@ -108,7 +108,7 @@ H5FedGetVertexCoordByID (
h5_id_t vertex_id,
h5_float64_t P[3]
) {
SET_FNAME ( f, __func__ );
SET_FNAME (f, __func__);
return h5t_get_vertrex_coords_by_id (f, vertex_id, P);
}
+36 -35
View File
@@ -21,11 +21,11 @@
h5_id_t
H5FedAddMesh (
h5_file_t * const f,
h5_file_t* const f,
const h5_oid_t mesh_type_id
) {
SET_FNAME ( f, __func__ );
return h5t_add_mesh ( f, mesh_type_id );
SET_FNAME (f, __func__);
return h5t_add_mesh (f, mesh_type_id);
}
/*!
@@ -50,19 +50,19 @@ H5FedAddMesh (
*/
h5_id_t
H5FedAddLevel (
h5_file_t * const f
h5_file_t* const f
) {
SET_FNAME ( f, __func__ );
return h5t_add_level ( f );
SET_FNAME (f, __func__);
return h5t_add_level (f);
}
h5_err_t
H5FedBeginStoreVertices (
h5_file_t * const f,
h5_file_t* const f,
const h5_size_t num
) {
SET_FNAME ( f, __func__ );
return h5t_begin_store_vertices ( f, num );
SET_FNAME (f, __func__);
return h5t_begin_store_vertices (f, num);
}
/*!
@@ -76,35 +76,36 @@ H5FedBeginStoreVertices (
*/
h5_id_t
H5FedStoreVertex (
h5_file_t * const f, /*!< file handle */
h5_file_t* const f, /*!< file handle */
const h5_id_t vertex_id, /*!< id from mesher or -1 */
const h5_float64_t P[3] /*!< coordinates */
) {
SET_FNAME ( f, __func__ );
if ( h5t_get_level ( f ) != 0 ) {
SET_FNAME (f, __func__);
if (h5t_get_level (f) != 0) {
return h5_error (
f,
H5_ERR_INVAL,
"Vertices can be added to level 0 only!" );
"Vertices can be added to level 0 only!");
}
return h5t_store_vertex ( f, vertex_id, P );
return h5t_store_vertex (f, vertex_id, P);
}
h5_err_t
H5FedEndStoreVertices (
h5_file_t * const f
h5_file_t* const f
) {
return h5t_end_store_vertices ( f );
SET_FNAME (f, __func__);
return h5t_end_store_vertices (f);
}
h5_err_t
H5FedBeginStoreElements (
h5_file_t * f,
h5_file_t* const f,
const h5_size_t num
) {
SET_FNAME ( f, __func__ );
return h5t_begin_store_elems ( f, num );
SET_FNAME (f, __func__);
return h5t_begin_store_elems (f, num);
}
/*!
@@ -123,48 +124,48 @@ H5FedBeginStoreElements (
*/
h5_id_t
H5FedStoreElement (
h5_file_t * const f, /*!< file handle */
h5_file_t* const f, /*!< file handle */
const h5_id_t local_vids[] /*!< tuple with vertex id's */
) {
SET_FNAME ( f, __func__ );
if ( h5t_get_level ( f ) != 0 ) {
SET_FNAME (f, __func__);
if (h5t_get_level (f) != 0) {
return h5_error (
f,
H5_ERR_INVAL,
"Elements can be added to level 0 only!" );
"Elements can be added to level 0 only!");
}
return h5t_store_elem ( f, -1, local_vids );
}
h5_err_t
H5FedEndStoreElements (
h5_file_t * const f
h5_file_t* const f
) {
SET_FNAME ( f, __func__ );
return h5t_end_store_elems ( f );
SET_FNAME (f, __func__);
return h5t_end_store_elems (f);
}
h5_err_t
H5FedBeginRefineElements (
h5_file_t * const f
h5_file_t* const f
) {
SET_FNAME ( f, __func__ );
return h5t_begin_refine_elems ( f );
SET_FNAME (f, __func__);
return h5t_begin_refine_elems (f);
}
h5_id_t
H5FedRefineElement (
h5_file_t * const f, /*!< file handle */
h5_file_t* const f, /*!< file handle */
const h5_id_t local_eid /*!< local element id */
) {
SET_FNAME ( f, __func__ );
return h5t_refine_elem ( f, local_eid );
SET_FNAME (f, __func__);
return h5t_refine_elem (f, local_eid);
}
h5_err_t
H5FedEndRefineElements (
h5_file_t * const f
h5_file_t* const f
) {
SET_FNAME ( f, __func__ );
return h5t_end_refine_elems ( f );
SET_FNAME (f, __func__);
return h5t_end_refine_elems (f);
}
+42 -42
View File
@@ -26,12 +26,12 @@
*/
h5_err_t
H5FedAddMTagset (
h5_file_t * const f,
char * name,
h5_file_t* const f,
char* name,
h5_id_t type
) {
SET_FNAME ( f, __func__ );
return h5t_add_mtagset ( f, name, type );
SET_FNAME (f, __func__);
return h5t_add_mtagset (f, name, type);
}
/*!
@@ -44,10 +44,10 @@ H5FedAddMTagset (
*/
h5_err_t
H5FedRemoveMTagset (
h5_file_t *const f,
h5_file_t* const f,
char name[]
) {
SET_FNAME ( f, __func__ );
SET_FNAME (f, __func__);
return h5t_remove_mtagset (f, name );
}
@@ -61,11 +61,11 @@ H5FedRemoveMTagset (
*/
h5_size_t
H5FedGetMTagsets (
h5_file_t *const f,
char **names[]
h5_file_t* const f,
char** names[]
) {
SET_FNAME ( f, __func__ );
return h5t_get_mtagsets ( f, names );
SET_FNAME (f, __func__);
return h5t_get_mtagsets (f, names);
}
/*!
@@ -78,11 +78,11 @@ H5FedGetMTagsets (
*/
h5_id_t
H5FedGetTypeOfMTagset (
h5_file_t *const f,
h5_file_t* const f,
char name[]
) {
SET_FNAME ( f, __func__ );
return h5t_get_mtagset_type_by_name ( f, name );
SET_FNAME (f, __func__);
return h5t_get_mtagset_type_by_name (f, name);
}
/*!
@@ -98,66 +98,66 @@ H5FedGetTypeOfMTagset (
*/
h5_err_t
H5FedSetMTag (
h5_file_t *const f,
h5_file_t* const f,
char name[],
h5_id_t id,
const size_t dims,
void *val
void* val
) {
SET_FNAME ( f, __func__ );
return h5t_set_mtag_by_name ( f, name, id, dims, val );
SET_FNAME (f, __func__);
return h5t_set_mtag_by_name (f, name, id, dims, val);
}
h5_err_t
H5FedSetMTagToVertex (
h5_file_t *const f,
h5_file_t* const f,
char name[],
h5_id_t id,
const size_t dims,
void *val
void* val
) {
SET_FNAME ( f, __func__ );
id = h5tpriv_set_entity_type ( H5T_ETYPE_VERTEX, id );
return h5t_set_mtag_by_name ( f, name, id, dims, val );
SET_FNAME (f, __func__);
id = h5tpriv_set_entity_type (H5T_ETYPE_VERTEX, id);
return h5t_set_mtag_by_name (f, name, id, dims, val);
}
h5_err_t
H5FedSetMTagToEdge (
h5_file_t *const f,
h5_file_t* const f,
char name[],
h5_id_t id,
const size_t dims,
void *val
void* val
) {
SET_FNAME ( f, __func__ );
id = h5tpriv_set_entity_type ( H5T_ETYPE_EDGE, id );
return h5t_set_mtag_by_name ( f, name, id, dims, val );
SET_FNAME (f, __func__);
id = h5tpriv_set_entity_type (H5T_ETYPE_EDGE, id);
return h5t_set_mtag_by_name (f, name, id, dims, val);
}
h5_err_t
H5FedSetMTagToTriangle (
h5_file_t *const f,
h5_file_t* const f,
char name[],
h5_id_t id,
const size_t dims,
void *val
void* val
) {
SET_FNAME ( f, __func__ );
id = h5tpriv_set_entity_type ( H5T_ETYPE_TRIANGLE, id );
return h5t_set_mtag_by_name ( f, name, id, dims, val );
SET_FNAME (f, __func__);
id = h5tpriv_set_entity_type (H5T_ETYPE_TRIANGLE, id);
return h5t_set_mtag_by_name (f, name, id, dims, val);
}
h5_err_t
H5FedSetMTagToTet (
h5_file_t *const f,
h5_file_t* const f,
char name[],
h5_id_t id,
const size_t dims,
void *val
void* val
) {
SET_FNAME ( f, __func__ );
id = h5tpriv_set_entity_type ( H5T_ETYPE_TET, id );
return h5t_set_mtag_by_name ( f, name, id, dims, val );
SET_FNAME (f, __func__);
id = h5tpriv_set_entity_type (H5T_ETYPE_TET, id);
return h5t_set_mtag_by_name (f, name, id, dims, val);
}
/*!
@@ -179,8 +179,8 @@ H5FedGetMTag (
size_t* dim,
void* vals
) {
SET_FNAME ( f, __func__ );
return h5t_get_mtag_by_name ( f, name, id, dim, vals );
SET_FNAME (f, __func__);
return h5t_get_mtag_by_name (f, name, id, dim, vals);
}
/*!
@@ -192,10 +192,10 @@ H5FedGetMTag (
*/
h5_err_t
H5FedRemoveMTag (
h5_file_t *const f,
h5_file_t* const f,
const char name[],
const h5_id_t id
) {
SET_FNAME ( f, __func__ );
return h5t_remove_mtag_by_name ( f, name, id );
SET_FNAME (f, __func__);
return h5t_remove_mtag_by_name (f, name, id);
}
+11 -11
View File
@@ -34,10 +34,10 @@
*/
h5_size_t
H5GetNumNodes (
h5_file_t * const f
h5_file_t* const f
) {
SET_FNAME ( f, __func__ );
CHECK_FILEHANDLE ( f );
SET_FNAME (f, __func__);
CHECK_FILEHANDLE (f);
return (h5_size_t)f->nprocs;
}
@@ -56,17 +56,17 @@ H5GetNumNodes (
*/
h5_size_t
H5GetNumSteps (
h5_file_t * const f
h5_file_t* const f
) {
SET_FNAME ( f, __func__ );
CHECK_FILEHANDLE ( f );
SET_FNAME (f, __func__);
CHECK_FILEHANDLE (f);
return hdf5_get_num_objects_matching_pattern (
f->file,
"/",
H5G_UNKNOWN,
f->prefix_step_name );
f->prefix_step_name);
}
/*!
@@ -81,14 +81,14 @@ H5GetNumSteps (
*/
h5_err_t
H5HasStep (
h5_file_t *f,
h5_file_t* const f,
h5_id_t stepno
) {
SET_FNAME ( f, __func__ );
CHECK_FILEHANDLE ( f );
SET_FNAME (f, __func__);
CHECK_FILEHANDLE (f);
return h5_has_step( f, stepno );
return h5_has_step (f, stepno);
}
+64 -68
View File
@@ -12,13 +12,13 @@
*/
h5_id_t
h5t_add_mesh (
h5_file_t * const f,
h5_file_t* const f,
const h5_oid_t mesh_type
) {
h5_id_t mesh_id = 0;
TRY ( (mesh_id = h5t_open_mesh ( f, -1, mesh_type )) );
TRY ( h5t_add_level ( f ) );
TRY( (mesh_id = h5t_open_mesh (f, -1, mesh_type)) );
TRY( h5t_add_level (f) );
f->t->mesh_changed = 1;
@@ -34,19 +34,19 @@ h5t_add_mesh (
*/
static h5_err_t
assign_global_vertex_ids (
h5_file_t * const f
h5_file_t* const f
) {
h5t_fdata_t *t = f->t;
h5t_fdata_t* const t = f->t;
h5_id_t local_id;
if ( t->cur_level < 0 ) return H5_SUCCESS; /* no level defined */
if (t->cur_level < 0) return H5_SUCCESS; /* no level defined */
/*
simple in serial runs: global_id = local_id
*/
for ( local_id = 0;
local_id < t->num_vertices[t->num_levels-1];
local_id++ ) {
for (local_id = 0;
local_id < t->num_vertices[t->num_levels-1];
local_id++) {
t->vertices[local_id].global_vid = local_id;
}
@@ -58,9 +58,9 @@ assign_global_vertex_ids (
*/
static h5_err_t
assign_global_elem_ids (
h5_file_t * const f
h5_file_t* const f
) {
h5t_fdata_t *t = f->t;
h5t_fdata_t* const t = f->t;
h5_id_t local_eid;
if ( t->cur_level < 0 ) return H5_SUCCESS; /* no level defined */
@@ -81,15 +81,14 @@ assign_global_elem_ids (
elem = (h5_elem_t*)&t->elems.tris[local_eid];
break;
default:
return h5_error_internal (
f, __FILE__, __func__, __LINE__ );
return h5_error_internal (f,__FILE__,__func__,__LINE__);
}
elem->global_eid = local_eid;
elem->global_parent_eid = elem_ldta->local_parent_eid;
elem->global_child_eid = elem_ldta->local_child_eid;
int i;
int num_vertices = t->ref_element->num_faces[0];
for ( i = 0; i < num_vertices; i++ ) {
for (i = 0; i < num_vertices; i++) {
elem->global_vids[i] = elem_ldta->local_vids[i];
}
}
@@ -99,38 +98,35 @@ assign_global_elem_ids (
h5_id_t
h5t_add_level (
h5_file_t * const f
h5_file_t* const f
) {
h5t_fdata_t *t = f->t;
h5t_fdata_t* const t = f->t;
if ( f->mode == H5_O_RDONLY ) {
if (f->mode == H5_O_RDONLY) {
return H5_ERR_INVAL;
}
/* t->num_levels will be set to zero on file creation(!) */
if ( t->num_levels == -1 ) { /* unknown number of levels */
/* determine number of levels */
return h5_error_not_implemented (
f, __FILE__, __func__, __LINE__ );
if ((t->cur_mesh < 0) || (t->num_levels == -1)) {
return h5tpriv_error_undef_mesh ( f );
}
t->cur_level = t->num_levels++;
t->dsinfo_num_vertices.dims[0] = t->num_levels;
t->dsinfo_num_elems.dims[0] = t->num_levels;
t->dsinfo_num_elems_on_level.dims[0] = t->num_levels;
ssize_t num_bytes = t->num_levels*sizeof ( h5_size_t );
TRY ( t->num_vertices = h5priv_alloc ( f, t->num_vertices, num_bytes ) );
ssize_t num_bytes = t->num_levels*sizeof (h5_size_t);
TRY( t->num_vertices = h5priv_alloc (f, t->num_vertices, num_bytes) );
t->num_vertices[t->cur_level] = -1;
TRY ( t->num_elems = h5priv_alloc ( f, t->num_elems, num_bytes ) );
TRY( t->num_elems = h5priv_alloc (f, t->num_elems, num_bytes) );
t->num_elems[t->cur_level] = -1;
TRY ( t->num_elems_on_level = h5priv_alloc (
f, t->num_elems_on_level, num_bytes ) );
TRY( t->num_elems_on_level = h5priv_alloc (
f, t->num_elems_on_level, num_bytes) );
t->num_elems_on_level[t->cur_level] = -1;
t->new_level = t->cur_level;
if ( t->cur_level == 0 ) {
if (t->cur_level == 0) {
/* nothing stored yet */
t->last_stored_vid = -1;
t->last_stored_eid = -1;
@@ -144,62 +140,62 @@ h5t_add_level (
*/
h5_err_t
h5t_begin_store_vertices (
h5_file_t * const f,
h5_file_t* const f,
const h5_size_t num
) {
h5t_fdata_t *t = f->t;
h5t_fdata_t* const t = f->t;
if ( t->cur_level < 0 ) {
return h5tpriv_error_undef_level( f );
if (t->cur_level < 0) {
return h5tpriv_error_undef_level(f);
}
t->storing_data = 1;
h5_size_t cur_num_vertices = ( t->cur_level > 0 ?
t->num_vertices[t->cur_level-1] : 0 );
h5_size_t cur_num_vertices = (t->cur_level > 0 ?
t->num_vertices[t->cur_level-1] : 0);
t->num_vertices[t->cur_level] = cur_num_vertices+num;
t->dsinfo_vertices.dims[0] = cur_num_vertices+num;
return h5tpriv_alloc_num_vertices ( f, cur_num_vertices+num );
return h5tpriv_alloc_num_vertices (f, cur_num_vertices+num);
}
h5_id_t
h5t_store_vertex (
h5_file_t * const f, /*!< file handle */
h5_file_t* const f, /*!< file handle */
const h5_id_t global_vid, /*!< global vertex id or -1 */
const h5_float64_t P[3] /*!< coordinates */
) {
struct h5t_fdata *t = f->t;
h5t_fdata_t* const t = f->t;
/*
more than allocated
*/
if ( t->last_stored_vid+1 >= t->num_vertices[t->cur_level] )
if (t->last_stored_vid+1 >= t->num_vertices[t->cur_level])
return HANDLE_H5_OVERFLOW_ERR(
f, "vertex", t->num_vertices[t->cur_level] );
f, "vertex", t->num_vertices[t->cur_level]);
/*
missing call to add the first level
*/
if ( t->cur_level < 0 )
return h5tpriv_error_undef_level( f );
if (t->cur_level < 0)
return h5tpriv_error_undef_level(f);
t->level_changed = 1;
h5_id_t local_id = ++t->last_stored_vid;
h5_vertex_t *vertex = &t->vertices[local_id];
vertex->global_vid = global_vid; /* ID from mesher, replaced later!*/
memcpy ( &vertex->P, P, sizeof ( vertex->P ) );
memcpy (&vertex->P, P, sizeof (vertex->P));
return local_id;
}
h5_err_t
h5t_end_store_vertices (
h5_file_t * const f
h5_file_t* const f
) {
h5t_fdata_t *t = f->t;
h5t_fdata_t* const t = f->t;
t->storing_data = 0;
t->num_vertices[t->cur_level] = t->last_stored_vid+1;
TRY ( assign_global_vertex_ids ( f ) );
TRY ( h5tpriv_sort_vertices ( f ) );
TRY ( h5tpriv_rebuild_global_2_local_map_of_vertices ( f ) );
TRY( assign_global_vertex_ids (f) );
TRY( h5tpriv_sort_vertices (f) );
TRY( h5tpriv_rebuild_global_2_local_map_of_vertices (f) );
return H5_SUCCESS;
}
@@ -211,10 +207,10 @@ h5t_end_store_vertices (
*/
h5_err_t
h5t_begin_store_elems (
h5_file_t * const f,
h5_file_t* const f,
const h5_size_t num
) {
h5t_fdata_t *t = f->t;
h5t_fdata_t* const t = f->t;
t->storing_data = 1;
size_t cur = t->cur_level > 0 ? t->num_elems[t->cur_level-1] : 0;
@@ -229,8 +225,8 @@ h5t_begin_store_elems (
prevent resizing.
*/
size_t nel = 2097152 > 5*new ? 2097152 : 5*new;
TRY ( h5tpriv_resize_te_htab ( f, nel ) );
return (*t->methods.store->alloc_elems) ( f, cur, new );
TRY( h5tpriv_resize_te_htab (f, nel) );
return (*t->methods.store->alloc_elems) (f, cur, new);
}
@@ -252,8 +248,8 @@ h5t_store_elem (
h5t_fdata_t *t = f->t;
/* level set? */
if ( t->cur_level < 0 )
return h5tpriv_error_undef_level( f );
if (t->cur_level < 0)
return h5tpriv_error_undef_level(f);
/* more than allocated? */
if ( t->last_stored_eid+1 >= t->num_elems[t->cur_level] )
@@ -263,15 +259,15 @@ h5t_store_elem (
/* check parent id */
if (
( t->cur_level == 0 && elem_idx_of_parent != -1 ) ||
( t->cur_level > 0 && elem_idx_of_parent < 0 ) ||
( t->cur_level > 0
&& elem_idx_of_parent >= t->num_elems[t->cur_level-1] )
(t->cur_level == 0 && elem_idx_of_parent != -1) ||
(t->cur_level > 0 && elem_idx_of_parent < 0) ||
(t->cur_level > 0
&& elem_idx_of_parent >= t->num_elems[t->cur_level-1])
) {
return HANDLE_H5_PARENT_ID_ERR (
f,
h5tpriv_map_oid2str(t->mesh_type),
elem_idx_of_parent );
h5tpriv_map_oid2str (t->mesh_type),
elem_idx_of_parent);
}
t->level_changed = 1;
h5_id_t elem_idx = ++t->last_stored_eid;
@@ -300,16 +296,16 @@ h5t_store_elem (
h5_err_t
h5t_end_store_elems (
h5_file_t * const f
h5_file_t* const f
) {
h5t_fdata_t *t = f->t;
h5t_fdata_t* const t = f->t;
t->storing_data = 0;
t->num_elems[t->cur_level] = t->last_stored_eid+1;
TRY ( assign_global_elem_ids ( f ) );
TRY( assign_global_elem_ids (f) );
TRY ( h5tpriv_sort_elems ( f ) );
TRY ( h5tpriv_rebuild_global_2_local_map_of_elems ( f ) );
TRY( h5tpriv_sort_elems (f) );
TRY( h5tpriv_rebuild_global_2_local_map_of_elems (f) );
return H5_SUCCESS;
}
@@ -322,7 +318,7 @@ h5t_mark_entity (
h5_file_t* const f,
const h5_id_t entity_id
) {
h5t_fdata_t* t = f->t;
h5t_fdata_t* const t = f->t;
return h5priv_append_to_idlist (f, &t->marked_entities, entity_id);
}
@@ -351,7 +347,7 @@ h5_err_t
h5t_pre_refine (
h5_file_t* const f
) {
h5t_fdata_t* t = f->t;
h5t_fdata_t* const t = f->t;
unsigned int num_elems_to_refine = t->marked_entities.num_items;
unsigned int num_elems_to_add = 0;
unsigned int num_vertices_to_add = 0;
@@ -382,7 +378,7 @@ h5_err_t
h5t_refine (
h5_file_t* const f
) {
h5t_fdata_t* t = f->t;
h5t_fdata_t* const t = f->t;
t->storing_data = 1;
int i;
for (i = 0; i < t->marked_entities.num_items; i++) {
@@ -395,7 +391,7 @@ h5_err_t
h5t_post_refine (
h5_file_t* const f
) {
h5t_fdata_t* t = f->t;
h5t_fdata_t* const t = f->t;
return h5priv_free_idlist_items (f, &t->marked_entities);
}