Add link argument to h5md_create_box.

This commit is contained in:
Pierre de Buyl
2014-08-22 10:46:32 +02:00
committed by Pierre de Buyl
parent cc4adb535a
commit ec7fd1327d
2 changed files with 3 additions and 3 deletions

View File

@ -61,7 +61,7 @@ int h5md_close_time_data(h5md_element e);
h5md_element h5md_create_fixed_data_simple(hid_t loc, const char *name, int rank, int int_dims[], hid_t datatype, void *data);
h5md_element h5md_create_fixed_data_scalar(hid_t loc, const char *name, hid_t datatype, void *data);
int h5md_append(h5md_element e, void *data, int step, double time);
int h5md_create_box(h5md_particles_group *group, int dim, char *boundary[], bool is_time, double value[]);
int h5md_create_box(h5md_particles_group *group, int dim, char *boundary[], bool is_time, double value[], h5md_element *link);
#ifdef __cplusplus
}

View File

@ -358,7 +358,7 @@ int h5md_append(h5md_element e, void *data, int step, double time) {
return 0;
}
int h5md_create_box(h5md_particles_group *group, int dim, char *boundary[], bool is_time, double value[])
int h5md_create_box(h5md_particles_group *group, int dim, char *boundary[], bool is_time, double value[], h5md_element *link)
{
hid_t spc, att, t;
hsize_t dims[1];
@ -406,7 +406,7 @@ int h5md_create_box(h5md_particles_group *group, int dim, char *boundary[], bool
// Check if the box is time-dependent or not
int_dims[0]=dim;
if (is_time) {
group->box_edges = h5md_create_time_data(group->box, "edges", 1, int_dims, H5T_NATIVE_DOUBLE, &group->position);
group->box_edges = h5md_create_time_data(group->box, "edges", 1, int_dims, H5T_NATIVE_DOUBLE, link);
} else {
if (NULL!=value) {
group->box_edges = h5md_create_fixed_data_simple(group->box, "edges", 1, int_dims, H5T_NATIVE_DOUBLE, value);