Skip to content
Snippets Groups Projects
Commit 90c83959 authored by Matthieu Schaller's avatar Matthieu Schaller
Browse files

Do not assume the box is cubic when writing the box size to the snapshots.

parent 4b3072b4
Branches
Tags
1 merge request!710Snapshot offsets
...@@ -994,8 +994,8 @@ void prepare_file(struct engine* e, const char* baseName, long long N_total[6], ...@@ -994,8 +994,8 @@ void prepare_file(struct engine* e, const char* baseName, long long N_total[6],
units_conversion_factor(internal_units, snapshot_units, UNIT_CONV_LENGTH); units_conversion_factor(internal_units, snapshot_units, UNIT_CONV_LENGTH);
const double dblTime = e->time * factor_time; const double dblTime = e->time * factor_time;
const double dim[3] = {e->s->dim[0] * factor_length, const double dim[3] = {e->s->dim[0] * factor_length,
e->s->dim[0] * factor_length, e->s->dim[1] * factor_length,
e->s->dim[0] * factor_length}; e->s->dim[2] * factor_length};
/* Print the relevant information and print status */ /* Print the relevant information and print status */
io_write_attribute(h_grp, "BoxSize", DOUBLE, dim, 3); io_write_attribute(h_grp, "BoxSize", DOUBLE, dim, 3);
......
...@@ -856,8 +856,8 @@ void write_output_serial(struct engine* e, const char* baseName, ...@@ -856,8 +856,8 @@ void write_output_serial(struct engine* e, const char* baseName,
internal_units, snapshot_units, UNIT_CONV_LENGTH); internal_units, snapshot_units, UNIT_CONV_LENGTH);
const double dblTime = e->time * factor_time; const double dblTime = e->time * factor_time;
const double dim[3] = {e->s->dim[0] * factor_length, const double dim[3] = {e->s->dim[0] * factor_length,
e->s->dim[0] * factor_length, e->s->dim[1] * factor_length,
e->s->dim[0] * factor_length}; e->s->dim[2] * factor_length};
/* Print the relevant information and print status */ /* Print the relevant information and print status */
io_write_attribute(h_grp, "BoxSize", DOUBLE, dim, 3); io_write_attribute(h_grp, "BoxSize", DOUBLE, dim, 3);
......
...@@ -709,8 +709,8 @@ void write_output_single(struct engine* e, const char* baseName, ...@@ -709,8 +709,8 @@ void write_output_single(struct engine* e, const char* baseName,
units_conversion_factor(internal_units, snapshot_units, UNIT_CONV_LENGTH); units_conversion_factor(internal_units, snapshot_units, UNIT_CONV_LENGTH);
const double dblTime = e->time * factor_time; const double dblTime = e->time * factor_time;
const double dim[3] = {e->s->dim[0] * factor_length, const double dim[3] = {e->s->dim[0] * factor_length,
e->s->dim[0] * factor_length, e->s->dim[1] * factor_length,
e->s->dim[0] * factor_length}; e->s->dim[2] * factor_length};
/* Print the relevant information and print status */ /* Print the relevant information and print status */
io_write_attribute(h_grp, "BoxSize", DOUBLE, dim, 3); io_write_attribute(h_grp, "BoxSize", DOUBLE, dim, 3);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment