- neighbor information management added to elements

- prefix 'global' removed form global element struct
- global and local element data now have the same struct
- and several other changes
This commit is contained in:
2010-08-20 15:54:01 +00:00
parent 21ba443bcd
commit c47c0cfc6e
54 changed files with 1077 additions and 909 deletions
-11
View File
@@ -1,17 +1,6 @@
#ifndef __H5_READWRITE_H
#define __H5_READWRITE_H
h5_int64_t
h5_write_data (
h5_file_t *f,
const char *name,
const void *array,
const hid_t type_id,
const hid_t group_id,
const hid_t memspace_id,
const hid_t diskspace_id
) ;
h5_int64_t
h5_set_step (
h5_file_t * const f,
+6 -1
View File
@@ -39,6 +39,10 @@ typedef __int64 int64_t;
typedef int64_t h5_int64_t;
typedef int32_t h5_int32_t;
typedef int64_t h5_id_t;
typedef int64_t h5_glb_idx_t; // type for a global index
typedef int64_t h5_loc_idx_t; // type for a local index
typedef int64_t h5_glb_id_t; // type for a global ID
typedef int64_t h5_loc_id_t; // type for a local ID
typedef uint64_t h5_size_t; /* size in number of elements */
typedef int64_t h5_ssize_t; /* size in number of elements */
typedef int64_t h5_err_t;
@@ -60,12 +64,13 @@ struct h5_file;
typedef struct h5_file h5_file_t;
typedef h5_err_t (*h5_errorhandler_t)(
const struct h5_file * const,
const h5_file_t * const,
const char*,
va_list ap );
#ifndef PARALLEL_IO
typedef unsigned long MPI_Comm;
typedef unsigned long MPI_Datatype;
#endif
typedef struct h5_idlist {
+39 -37
View File
@@ -37,53 +37,54 @@ h5b_3d_has_view (
h5_err_t
h5b_3d_set_view (
h5_file_t *const f, /*!< IN: File handle */
const h5_int64_t i_start, /*!< IN: start index of \c i */
const h5_int64_t i_end, /*!< IN: end index of \c i */
const h5_int64_t j_start, /*!< IN: start index of \c j */
const h5_int64_t j_end, /*!< IN: end index of \c j */
const h5_int64_t k_start, /*!< IN: start index of \c k */
const h5_int64_t k_end /*!< IN: end index of \c k */
const h5_size_t i_start, /*!< IN: start index of \c i */
const h5_size_t i_end, /*!< IN: end index of \c i */
const h5_size_t j_start, /*!< IN: start index of \c j */
const h5_size_t j_end, /*!< IN: end index of \c j */
const h5_size_t k_start, /*!< IN: start index of \c k */
const h5_size_t k_end /*!< IN: end index of \c k */
);
h5_err_t
h5b_3d_get_view (
h5_file_t *const f, /*!< IN: File handle */
h5_int64_t *i_start, /*!< OUT: start index of \c i */
h5_int64_t *i_end, /*!< OUT: end index of \c i */
h5_int64_t *j_start, /*!< OUT: start index of \c j */
h5_int64_t *j_end, /*!< OUT: end index of \c j */
h5_int64_t *k_start, /*!< OUT: start index of \c k */
h5_int64_t *k_end /*!< OUT: end index of \c k */
h5_file_t *const f, /*!< IN: File handle */
h5_size_t *const i_start, /*!< OUT: start index of \c i */
h5_size_t *const i_end, /*!< OUT: end index of \c i */
h5_size_t *const j_start, /*!< OUT: start index of \c j */
h5_size_t *const j_end, /*!< OUT: end index of \c j */
h5_size_t *const k_start, /*!< OUT: start index of \c k */
h5_size_t *const k_end /*!< OUT: end index of \c k */
);
h5_err_t
h5b_3d_get_reduced_view (
h5_file_t *const f, /*!< IN: File handle */
h5_int64_t *i_start, /*!< OUT: start index of \c i */
h5_int64_t *i_end, /*!< OUT: end index of \c i */
h5_int64_t *j_start, /*!< OUT: start index of \c j */
h5_int64_t *j_end, /*!< OUT: end index of \c j */
h5_int64_t *k_start, /*!< OUT: start index of \c k */
h5_int64_t *k_end /*!< OUT: end index of \c k */
h5_file_t *const f, /*!< IN: File handle */
h5_size_t *const i_start, /*!< OUT: start index of \c i */
h5_size_t *const i_end, /*!< OUT: end index of \c i */
h5_size_t *const j_start, /*!< OUT: start index of \c j */
h5_size_t *const j_end, /*!< OUT: end index of \c j */
h5_size_t *const k_start, /*!< OUT: start index of \c k */
h5_size_t *const k_end /*!< OUT: end index of \c k */
);
h5_err_t
h5b_3d_set_chunk (
h5_file_t *const f, /*!< IN: File handle */
const h5_int64_t i, /*!< IN: size of \c i */
const h5_int64_t j, /*!< IN: size of \c j */
const h5_int64_t k /*!< IN: size of \c k */
const h5_size_t i, /*!< IN: size of \c i */
const h5_size_t j, /*!< IN: size of \c j */
const h5_size_t k /*!< IN: size of \c k */
);
h5_err_t
h5b_3d_get_chunk (
h5_file_t *const f, /*!< IN: File handle */
const char *field_name, /*!< IN: name of dataset */
h5_int64_t *i, /*!< OUT: size of \c i */
h5_int64_t *j, /*!< OUT: size of \c j */
h5_int64_t *k /*!< OUT: size of \c k */
h5_size_t *const i, /*!< OUT: size of \c i */
h5_size_t *const j, /*!< OUT: size of \c j */
h5_size_t *const k /*!< OUT: size of \c k */
);
#if defined(PARALLEL_IO)
h5_err_t
h5b_3d_set_grid (
h5_file_t *const f, /*!< IN: File handle */
@@ -96,9 +97,9 @@ h5_err_t
h5b_3d_get_grid_coords (
h5_file_t *const f, /*!< IN: File handle */
const int proc, /*!< IN: MPI processor */
h5_int64_t *i, /*!< OUT: index in \c i */
h5_int64_t *j, /*!< OUT: index in \c j */
h5_int64_t *k /*!< OUT: index in \c k */
h5_size_t *const i, /*!< OUT: index in \c i */
h5_size_t *const j, /*!< OUT: index in \c j */
h5_size_t *const k /*!< OUT: index in \c k */
);
h5_err_t
@@ -108,6 +109,7 @@ h5b_3d_set_dims (
const h5_size_t j, /*!< IN: dimension in \c j */
const h5_size_t k /*!< IN: dimension in \c k */
);
#endif
h5_err_t
h5b_3d_set_halo (
@@ -126,10 +128,10 @@ h5_err_t
h5b_get_field_info_by_name (
h5_file_t *const f, /*!< IN: file handle */
const char *name, /*!< OUT: field name */
h5_size_t *field_rank, /*!< OUT: field rank */
h5_size_t *field_dims, /*!< OUT: field dimensions */
h5_size_t *elem_rank, /*!< OUT: element rank */
h5_int64_t *type /*!< OUT: datatype */
h5_size_t *const field_rank, /*!< OUT: field rank */
h5_size_t *const field_dims, /*!< OUT: field dimensions */
h5_size_t *const elem_rank, /*!< OUT: element rank */
h5_int64_t *const type /*!< OUT: datatype */
);
h5_err_t
@@ -138,10 +140,10 @@ h5b_get_field_info (
const h5_size_t idx, /*!< IN: index of field */
char *name, /*!< OUT: field name */
const h5_size_t len_name, /*!< IN: buffer size */
h5_size_t *field_rank, /*!< OUT: field rank */
h5_size_t *field_dims, /*!< OUT: field dimensions */
h5_size_t *elem_rank, /*!< OUT: element rank */
h5_int64_t *type /*!< OUT: datatype */
h5_size_t *const field_rank, /*!< OUT: field rank */
h5_size_t *const field_dims, /*!< OUT: field dimensions */
h5_size_t *const elem_rank, /*!< OUT: element rank */
h5_int64_t *const type /*!< OUT: datatype */
);
+3 -79
View File
@@ -2,86 +2,10 @@
#define __H5T_ADJACENCIES_H
h5_err_t
h5t_get_edges_upadjacent_to_vertex (
h5t_get_adjacencies (
h5_file_t * const f,
const h5_id_t local_vid,
h5_idlist_t **list
);
h5_err_t
h5t_get_triangles_upadjacent_to_vertex (
h5_file_t * const f,
const h5_id_t local_vid,
h5_idlist_t **list
);
h5_err_t
h5t_get_tets_upadjacent_to_vertex (
h5_file_t * const f,
const h5_id_t local_vid,
h5_idlist_t **list
);
h5_err_t
h5t_get_triangles_upadjacent_to_edge (
h5_file_t * const f,
const h5_id_t local_kid,
h5_idlist_t **list
);
h5_err_t
h5t_get_tets_upadjacent_to_edge (
h5_file_t * const f,
const h5_id_t local_kid,
h5_idlist_t **list
);
h5_err_t
h5t_get_tets_upadjacent_to_triangle (
h5_file_t * const f,
const h5_id_t local_did,
h5_idlist_t **list
);
h5_err_t
h5t_get_vertices_downadjacent_to_edge (
h5_file_t * const f,
const h5_id_t local_kid,
h5_idlist_t **list
);
h5_err_t
h5t_get_vertices_downadjacent_to_triangle (
h5_file_t * const f,
const h5_id_t local_did,
h5_idlist_t **list
);
h5_err_t
h5t_get_vertices_downadjacent_to_tet (
h5_file_t * const f,
const h5_id_t local_tid,
h5_idlist_t **list
);
h5_err_t
h5t_get_edges_downadjacent_to_triangle (
h5_file_t * const f,
const h5_id_t local_did,
h5_idlist_t **list
);
h5_err_t
h5t_get_edges_downadjacent_to_tet (
h5_file_t * const f,
const h5_id_t local_tid,
h5_idlist_t **list
);
h5_err_t
h5t_get_triangles_downadjacent_to_tet (
h5_file_t * const f,
const h5_id_t local_tid,
const h5_id_t entity_id,
const h5_int32_t dim,
h5_idlist_t **list
);
+1 -1
View File
@@ -2,7 +2,7 @@
#define __H5T_MAP_H
h5_id_t
h5t_map_global_vertex_index2local (
h5t_map_global_vertex_idx2local (
h5_file_t * const f,
h5_id_t global_idx
);
+2
View File
@@ -7,6 +7,7 @@ h5_err_t h5t_open_mesh ( h5_file_t * const f, const h5_id_t id,
h5_err_t h5t_set_level ( h5_file_t * const f, const h5_id_t id );
h5_err_t h5t_close_mesh ( h5_file_t * const f );
#if 0
h5_err_t h5tpriv_open_file ( h5_file_t * const f );
h5_err_t h5tpriv_close_file ( h5_file_t * const f );
h5_err_t h5tpriv_open_topo_group ( h5_file_t * const f );
@@ -25,3 +26,4 @@ h5_err_t h5tpriv_alloc_tets ( h5_file_t * const f, const size_t cur,
const size_t new_size );
#endif
#endif
+1 -1
View File
@@ -53,7 +53,7 @@ h5t_get_vertex_coords_by_index (
);
h5_err_t
h5t_get_vertrex_coords_by_id (
h5t_get_vertex_coords_by_id (
h5_file_t* const f,
h5_id_t vertex_id,
h5_float64_t P[3]
+23 -3
View File
@@ -54,13 +54,33 @@ h5t_begin_refine_elems (
);
h5_id_t
h5t_refine_elem (
h5_file_t * const f,
const h5_id_t local_eid
h5t_refine_marked_elems (
h5_file_t * const f
);
h5_err_t
h5t_end_refine_elems (
h5_file_t * const f
);
h5_err_t
h5t_mark_entity (
h5_file_t* const f,
const h5_id_t entity_id
);
h5_err_t
h5t_pre_refine (
h5_file_t* const f
);
h5_err_t
h5t_refine (
h5_file_t* const f
);
h5_err_t
h5t_post_refine (
h5_file_t* const f
);
#endif
+31 -3
View File
@@ -1,4 +1,4 @@
#ifndef __H5T_TAGS_H
#ifndef __H5T_TAGS_H
#define __H5T_TAGS_H
typedef struct h5t_tagset H5T_Tagset;
@@ -19,7 +19,35 @@ h5_err_t h5t_set_mtag_by_name ( h5_file_t* const f, char name[], const h5_id_t i
h5_err_t h5t_get_mtag_by_name ( h5_file_t* const f, const char name[],
const h5_id_t id, size_t* dim, void* vals );
h5_err_t h5t_remove_mtag_by_name ( h5_file_t* const f, const char name[],
const h5_id_t id );
h5_err_t
h5t_remove_mtag_by_name (
h5_file_t* const f,
const char name[],
const h5_id_t id
);
h5_ssize_t
h5t_get_tag (
h5_file_t *const f,
const H5T_Tagset *tagset,
const h5_id_t entity_id,
size_t* const dim,
void* const vals
);
h5_err_t
h5t_remove_mtag (
h5_file_t* const f,
H5T_Tagset* tagset,
const h5_id_t id
);
h5_ssize_t
h5t_get_mtagset_names_of_entity (
h5_file_t* const f,
const h5_id_t entity_id,
char *names[],
const h5_size_t dim
);
#endif