diff --git a/src/H5.h b/src/H5.h index 123be85..6f6685f 100644 --- a/src/H5.h +++ b/src/H5.h @@ -31,7 +31,7 @@ H5CloseFile ( ); h5_err_t -H5DefineStepNameFormat ( +H5SetStepNameFormat ( h5_file_t *f, const char *name, const h5_int64_t width @@ -61,11 +61,16 @@ H5StartTraverseSteps ( h5_file_t *f ); -h5_err_t +h5_id_t H5TraverseSteps ( h5_file_t *f ); +h5_err_t +H5EndTraverseSteps ( + h5_file_t *f + ); + h5_err_t H5SetVerbosityLevel ( const h5_id_t level diff --git a/src/H5Fed.c b/src/H5Fed.c index eebc81e..1d5d491 100644 --- a/src/H5Fed.c +++ b/src/H5Fed.c @@ -29,6 +29,13 @@ H5FedOpenMesh ( return h5t_open_mesh ( f, mesh_id, mesh_type_id ); } +h5_err_t +H5FedCloseMesh ( + h5_file_t * const f + ) { + return -1; +} + h5_err_t H5FedSetLevel ( h5_file_t * const f, @@ -37,3 +44,11 @@ H5FedSetLevel ( SET_FNAME ( f, __func__ ); return h5t_open_level ( f, level_id ); } + +h5_err_t +H5FedLinkMeshToStep ( + h5_file_t * f, + const h5_id_t mesh_id + ) { + return -1; +} diff --git a/src/H5Fed.h b/src/H5Fed.h index b47f122..6375dca 100644 --- a/src/H5Fed.h +++ b/src/H5Fed.h @@ -20,18 +20,15 @@ #define __H5FED_H #include "H5.h" +#include "H5Fed_adjacency.h" #include "H5Fed_boundaries.h" +#include "H5Fed_inquiry.h" #include "H5Fed_map.h" +#include "H5Fed_retrieve.h" #include "H5Fed_store.h" /****** General routines *****************************************************/ -h5_size_t -H5FedGetNumMeshes ( - h5_file_t * const f, - const h5_oid_t mesh_type_id - ); - h5_err_t H5FedOpenMesh ( h5_file_t * const f, @@ -39,90 +36,24 @@ H5FedOpenMesh ( const h5_oid_t mesh_type_id ); -h5_size_t -H5FedGetNumLevels ( - h5_file_t * f +h5_err_t +H5FedCloseMesh ( + h5_file_t * const f ); h5_err_t H5FedSetLevel ( h5_file_t * f, - const h5_id_t id - ); - -h5_id_t -H5FedGetLevel ( - h5_file_t * f - ); - -h5_size_t -H5FedGetNumVertices ( - h5_file_t * f - ); - -h5_size_t -H5FedGetNumVerticesTotal( - h5_file_t * f - ); - -h5_size_t -H5FedGetNumVerticesCnode ( - h5_file_t * f, - const h5_id_t cnode - ); - -h5_size_t -H5FedGetNumElements ( - h5_file_t * f - ); - -h5_size_t -H5FedGetNumElementsTotal ( - h5_file_t * f - ); - -h5_size_t -H5FedGetNumElementsCnode ( - h5_file_t * f, - const h5_id_t cnode - ); - -/****** STORE / RETRIEVAL routines ********************************************/ - -h5_err_t -H5FedStartTraverseVertices ( - h5_file_t * f - ); - -h5_id_t -H5FedTraverseVertices ( - h5_file_t * f, - h5_id_t * const id, - h5_float64_t P[3] + const h5_id_t level_id ); h5_err_t -H5FedEndTraverseVertices ( - h5_file_t * f - ); - -h5_err_t -H5FedStartTraverseElements ( - h5_file_t * f - ); - -h5_id_t -H5FedTraverseElements ( +H5FedLinkMeshToStep ( h5_file_t * f, - h5_id_t * const id, - h5_id_t * const parent_id, - h5_id_t * const vertex_ids + const h5_id_t mesh_id ); -h5_err_t -H5FedEndTraverseElements ( - h5_file_t * f - ); + #endif diff --git a/src/H5Fed_adjacency.c b/src/H5Fed_adjacency.c index de80c27..23e7f37 100644 --- a/src/H5Fed_adjacency.c +++ b/src/H5Fed_adjacency.c @@ -15,250 +15,45 @@ #include #include "h5_core/h5_types.h" +#include "h5_core/h5_core.h" #include "H5Fed.h" /****** UPWARD ADJACENCY routines *********************************************/ /*! - \ingroup h5fed_c_api - - Returns a vector, that contains the id's of all the edges that are - adjacent to the vertex with id \c vertex_id and in \c num_adj_edges - the number of edges to which this vertex is adjacent, i.e. the size - of the returned vector. - - \return n-tuple of upward adjacent edges - \return NULL-pointer on error. -*/ -h5_id_t * H5FedGetEdgesUAdjacentToVertex ( - h5_file_t * fh, /*!< file handle */ - const h5_id_t level, /*!< mesh level to query */ - const h5_id_t vertex_id, /*!< global vertex id */ - h5_size_t * const num_adj_edges /*!< OUT: size of returned vector */ + \return number of upward adjacent edges + */ +h5_err_t +H5FedGetEdgesUpAdjacentToVertex ( + h5_file_t * const f, + const h5_id_t local_vid, + h5_idlist_t **list ) { - return NULL; + return h5t_get_edges_upadjacent_to_vertex ( f, local_vid, list ); } -/*! - \ingroup h5fed_c_api - - Returns a vector, that contains the id's of all the triangles that are - adjacent to the vertex with id \c vertexid and \c num_adj_triangles - the number of triangle to which this vertex is adjacent, i.e. the size - of the returned vector. - - \return n-tuple of upward adjacent triangles. - \return NULL-pointer on error. -*/ -h5_id_t * H5FedGetTrianglesUAdjacentToVertex ( - h5_file_t * fh, /*!< file handle */ - const h5_id_t level, /*!< mesh level to query */ - const h5_id_t vertex_id, /*!< global vertex id */ - h5_size_t * const num_adj_triangles - /*!< OUT: size of returned vector */ +h5_err_t +H5FedGetTrianglesUpAdjacentToVertex ( + h5_file_t * const f, + const h5_id_t local_vid, + h5_idlist_t **list ) { - return NULL; + return h5t_get_triangles_upadjacent_to_vertex ( f, local_vid, list ); } -/*! - \ingroup h5fed_c_api - - Returns a vector, that contains the id's of all the tetrahedra that are - adjacent to the vertex with id \c vertex_id and in - \c num_adj_tetrahedra the number of tetrahera to which this vertex is - adjacent, i.e. the size of the returned vector. - - \return n-tuple of upward adjacent tetrahedra. - \return NULL-pointer on error. -*/ -h5_id_t * H5FedGetTetrahedrasUAdjacentToVertex ( - h5_file_t * fh, /*!< file handle */ - const h5_id_t level, /*!< mesh level to query */ - const h5_id_t vertex_id, /*!< global vertex id */ - h5_size_t * const num_adj_tetrahedra - /*!< OUT: size of returned vector */ +h5_err_t +H5FedGetTetsUpAdjacentToVertex ( + h5_file_t * const f, + const h5_id_t local_vid, + h5_idlist_t **list ) { - return NULL; + return h5t_get_tets_upadjacent_to_vertex ( f, local_vid, list ); } -/*! - \ingroup h5fed_c_api - - Returns a vector, that contains the id's of all the triangles that are - adjacent to the edge with id \c vertex_id and in - \c num_adj_triangles the number of triangles adjacent to the edge, i.e. - the size of the return vector. - - \return n-tuple of upward adjacent triangles. - \return NULL-pointer on error. -*/ -h5_id_t * H5FedGetTrianglesUAdjacentToEdge ( - h5_file_t * fh, /*!< file handle */ - const h5_id_t level, /*!< mesh level to query */ - const h5_id_t edge_id, /*!< global edge id */ - h5_size_t * const num_adj_triangles - /*!< OUT: size of returned vector */ +h5_err_t +H5FedReleaseListOfAdjacencies ( + h5_file_t * const f, + h5_idlist_t **list ) { - return NULL; -} - -/*! - \ingroup h5fed_c_api - - Returns a vector, that contains the id's of all the tetrahedra that - are adjacent to the edge with id \c edge_id and in - \c num_adj_tetrahedra the number of tetrahedra that are adjacent to - the edge, i.e. the size of the returned vector. - - \return n-tuple of upward adjacent tetrahedra. - \return NULL-pointer on error. -*/ -h5_id_t * H5FedGetTetrahedraUAdjacentToEdge ( - h5_file_t * fh, /*!< file handle */ - const h5_id_t level, /*!< mesh level to query */ - const h5_id_t edge_id, /*!< global edge id */ - h5_size_t * const num_adj_tets /*!< OUT: size of returned vector */ - ) { - return NULL; -} - -/*! - \ingroup h5fed_c_api - - Returns a vector, that contains the id's of all the tetrahedra that - are adjacent to the triangle with id \c triangle_id and in - \c num_adj_tetrahedra the number of tetrahedra that are adjacent to - this triangle. - - There are only two different cases: either the triangle is an internal, - including interprocessor boundaries, triangle or an external triangle, - i.e. a part of the mesh boundary; in the first case, there are \c 2 - adjacent tetrahedra, in the second case the triangle has exactly one - sinle adjacent tetrahedron. - - \return n-tuple of upward adjacent tetrahedra. - \return NULL-pointer on error. -*/ -h5_id_t * H5FedGetTetrahedraUAdjacentToTriangle ( - h5_file_t * fh, /*!< file handle */ - const h5_id_t level, /*!< mesh level to query */ - const h5_id_t triangle_id, /*!< global triangle id */ - h5_size_t * const num_adj_tets /*!< OUT: size of returned vector */ - ) { - return NULL; -} - -/****** DOWNWARD ADJACENCY routines *********************************************/ - -/*! - \ingroup h5fed_c_api - - Returns a vector, that contains the id's of all the vertices that are - adjacent to the edge with id \c vertex_id. - - \return n-tuple of downward adjacent vertices. - \return NULL-pointer on error. -*/ -h5_id_t * H5FedGetVerticesDAdjacentToEdge ( - h5_file_t * fh, /*!< file handle */ - const h5_id_t level, /*!< mesh level to query */ - const h5_id_t edge_id, /*!< global edge id */ - h5_size_t * const num_adj_vertices - /*!< OUT: size of returned vector */ - ) { - return NULL; -} - -/*! - \ingroup h5fed_c_api - - Returns a vector, that contains the id's of all the edges that are - adjacent to the triangle with id \c triangle_id. - - \return n-tuple of downward adjacent edges. - \return NULL-pointer on error. -*/ -h5_id_t * H5FedGetEdjesDAdjacentToTriangle ( - h5_file_t * fh, /*!< file handle */ - const h5_id_t level, /*!< mesh level to query */ - const h5_id_t triangle_id, /*!< global triangle id */ - h5_size_t * const num_adj_triangles - /*!< OUT: size of returned vector */ - ) { - return NULL; -} - -/*! - \ingroup h5fed_c_api - - Returns a vector, that contains the id's of all the vertices that are - adjacent to the triangle with id \c triangle_id. - - \return n-tuple of downward adjacent vertices. - \return NULL-pointer on error. -*/ -h5_id_t * H5FedGetVerticesDAdjacentToTriangle ( - h5_file_t * fh, /*!< file handle */ - const h5_id_t level, /*!< mesh level to query */ - const h5_id_t triangle_id, /*!< global triangle id */ - h5_size_t * const num_adj_vertices - /*!< OUT: size of returned vector */ - ) { - return NULL; -} - -/*! - \ingroup h5fed_c_api - - Returns a vector, that contains the id's of all the triangles that are - adjacent to the tetrahedron with id \c tet_id - - \return n-tuple of downward adjacent triangles. - \return NULL-pointer on error. -*/ -h5_id_t * H5FedGetTrianglesDAdjacentToTetrahedron ( - h5_file_t * fh, /*!< file handle */ - const h5_id_t level, /*!< mesh level to query */ - const h5_id_t tet_id, /*!< global tetrahedron id */ - h5_size_t * const num_adj_triangles - /*!< OUT: size of returned vector */ - ) { - return NULL; -} - -/*! - \ingroup h5fed_c_api - - Returns a vector, that contains the id's of all the edges that are - adjacent to the tetrahedron with id \c tet_id. - - \return n-tuple of downward adjacent edges. - \return NULL-pointer on error. -*/ -h5_id_t * H5FedGetEdjesDAdjacentToTetrahedron ( - h5_file_t * fh, /*!< file handle */ - const h5_id_t level, /*!< mesh level to query */ - const h5_id_t tet_id, /*!< global tetrahedron id */ - h5_size_t * const num_adj_edges /*!< OUT: size of returned vector */ - ) { - return NULL; -} - -/*! - \ingroup h5fed_c_api - - Returns a vector, that contains the id's of all the vertices that are - adjacent to the tetrahedron with id \c tet_id. - - \return n-tuple of downward adjacent vertices. - \return NULL-pointer on error. -*/ -h5_id_t * H5FedGetVerticesDAdjacentToTetrahedron ( - h5_file_t * fh, /*!< file handle */ - const h5_id_t level, /*!< mesh level to query */ - const h5_id_t tet_id, /*!< global tetrahedron id */ - h5_size_t * const num_adj_vertices - /*!< OUT: size of returned vector */ - ) { - return NULL; + return _h5_free_idlist ( f, list ); } diff --git a/src/H5Fed_map.c b/src/H5Fed_map.c index d5f4b9a..b194075 100644 --- a/src/H5Fed_map.c +++ b/src/H5Fed_map.c @@ -1,5 +1,5 @@ /* - Copyright 2007-2008 + Copyright 2007-2009 Paul Scherrer Institut, Villigen, Switzerland; Benedikt Oswald; Achim Gsell @@ -40,3 +40,13 @@ H5FedMapTriangle2GlobalID ( SET_FNAME ( f, __func__ ); return h5t_get_global_triangle_id ( f, global_vids ); } + +h5_err_t +H5FedMapEntityID2LocalVids ( + h5_file_t * const f, + h5_id_t local_id, + h5_id_t *local_vids + ) { + SET_FNAME ( f, __func__ ); + return h5t_get_local_vids_of_entity ( f, local_id, local_vids ); +} diff --git a/src/H5Fed_map.h b/src/H5Fed_map.h index 4ccc0aa..92896a5 100644 --- a/src/H5Fed_map.h +++ b/src/H5Fed_map.h @@ -31,5 +31,11 @@ H5FedMapTriangle2GlobalID ( h5_id_t * const global_vids ); +h5_err_t +H5FedMapEntityID2LocalVids ( + h5_file_t * const f, + h5_id_t local_id, + h5_id_t *localvids + ); #endif diff --git a/src/H5Fed_retrieve.c b/src/H5Fed_retrieve.c index 85baad3..88b9bc3 100644 --- a/src/H5Fed_retrieve.c +++ b/src/H5Fed_retrieve.c @@ -20,7 +20,7 @@ #include "H5Fed.h" h5_err_t -H5FedStartTraverseVertices ( +H5FedBeginTraverseVertices ( h5_file_t * const f /*!< file handle */ ) { SET_FNAME ( f, __func__ ); @@ -56,7 +56,7 @@ H5FedEndTraverseVertices ( h5_err_t -H5FedStartTraverseElements ( +H5FedBeginTraverseElements ( h5_file_t * const f /*!< file handle */ ) { SET_FNAME ( f, __func__ ); diff --git a/src/Makefile.am b/src/Makefile.am index 3016957..6f9028b 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -62,7 +62,6 @@ libH5_a_SOURCES = \ H5Fed.c \ H5Fed_adjacency.c \ H5Fed_boundaries.c \ - H5Fed_dof.c \ H5Fed_inquiry.c \ H5Fed_map.c \ H5Fed_retrieve.c \