core iterator API refactored
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
#ifndef __H5_CORE_H
|
||||
#define __H5_CORE_H
|
||||
|
||||
#define UNUSED_ARGUMENT(x) (void)x
|
||||
|
||||
#include "h5_types.h"
|
||||
#include "h5_errno.h"
|
||||
|
||||
|
||||
@@ -66,13 +66,6 @@ h5t_get_vertex_indices_of_triangle (
|
||||
h5_loc_idx_t* vertex_indices
|
||||
);
|
||||
|
||||
h5_err_t
|
||||
h5t_get_vertex_indices_of_triangle_cclockwise (
|
||||
h5_file_t* const f,
|
||||
const h5_loc_id_t entity_id,
|
||||
h5_loc_idx_t* vertex_indices
|
||||
);
|
||||
|
||||
h5_err_t
|
||||
h5t_get_vertex_indices_of_triangle2 (
|
||||
h5_file_t* const f,
|
||||
|
||||
@@ -1,17 +1,60 @@
|
||||
#ifndef __H5T_RETRIEVE_H
|
||||
#define __H5T_RETRIEVE_H
|
||||
|
||||
typedef struct h5t_iterator h5t_iterator_t;
|
||||
struct h5t_tagset;
|
||||
union h5t_iterator;
|
||||
|
||||
typedef struct {
|
||||
h5_loc_id_t (*iter)(h5_file_t *const f, union h5t_iterator* iter);
|
||||
h5t_lvl_idx_t leaf_level;
|
||||
const h5t_ref_elem_t* ref_elem;
|
||||
h5_loc_idx_t elem_idx;
|
||||
h5_loc_idx_t face_idx; // face according reference element
|
||||
int codim; // dimension of entities to traverse
|
||||
h5_err_t (*find)(h5_file_t *const f, h5_id_t face_idx,
|
||||
h5_id_t elem_idx, h5_idlist_t **retval);
|
||||
} h5t_leaf_iterator_t;
|
||||
|
||||
typedef struct {
|
||||
h5_loc_id_t (*iter)(h5_file_t *const f, union h5t_iterator* iter);
|
||||
h5t_lvl_idx_t refinement_level;
|
||||
const h5t_ref_elem_t* ref_elem;
|
||||
h5_loc_idx_t elem_idx;
|
||||
h5_loc_idx_t face_idx; // face according reference element
|
||||
int codim; // dimension of entities to traverse
|
||||
h5_err_t (*find)(h5_file_t *const f, h5_id_t face_idx,
|
||||
h5_id_t elem_idx, h5_idlist_t **retval);
|
||||
} h5t_level_iterator_t;
|
||||
|
||||
typedef struct {
|
||||
h5_loc_id_t (*iter)(h5_file_t *const f, union h5t_iterator* iter);
|
||||
h5t_lvl_idx_t level_idx;
|
||||
struct h5t_tagset* tagset;
|
||||
h5_loc_idx_t elem_idx;
|
||||
int subentity_idx;
|
||||
} h5t_tag_iterator_t;
|
||||
|
||||
typedef struct h5t_generic_iterator {
|
||||
h5_loc_id_t (*iter)(h5_file_t *const f, union h5t_iterator* iter);
|
||||
} h5t_generic_iterator_t;
|
||||
|
||||
typedef union h5t_iterator {
|
||||
h5t_leaf_iterator_t leaf;
|
||||
h5t_level_iterator_t level;
|
||||
h5t_tag_iterator_t tag;
|
||||
h5t_generic_iterator_t generic;
|
||||
} h5t_iterator_t;
|
||||
|
||||
|
||||
h5_err_t
|
||||
h5t_init_mesh_iterator (
|
||||
h5t_init_leaf_iterator (
|
||||
h5_file_t* f,
|
||||
h5t_iterator_t* iter,
|
||||
const int codim
|
||||
);
|
||||
|
||||
h5_err_t
|
||||
h5t_create_mesh_iterator (
|
||||
h5t_create_leaf_iterator (
|
||||
h5_file_t* f,
|
||||
h5t_iterator_t** iter,
|
||||
const int codim
|
||||
|
||||
Reference in New Issue
Block a user