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

Output time as double and not as float.

Former-commit-id: 7c551924fa14c32805ff50592c5b1515ce75a52a
parent 57919c5c
Branches
Tags
No related merge requests found
......@@ -541,7 +541,8 @@ void write_output_parallel(struct engine* e, struct UnitSystem* us,
/* Print the relevant information and print status */
writeAttribute(h_grp, "BoxSize", DOUBLE, e->s->dim, 3);
writeAttribute(h_grp, "NumPart_ThisFile", UINT, numParticles, 6);
writeAttribute(h_grp, "Time", DOUBLE, &e->time, 1);
double dblTime = e->time;
writeAttribute(h_grp, "Time", DOUBLE, &dblTime, 1);
/* GADGET-2 legacy values */
numParticles[0] = (unsigned int)N_total;
......
......@@ -573,7 +573,9 @@ void write_output_serial(struct engine* e, struct UnitSystem* us, int mpi_rank,
/* Print the relevant information and print status */
writeAttribute(h_grp, "BoxSize", DOUBLE, e->s->dim, 3);
writeAttribute(h_grp, "Time", DOUBLE, &e->time, 1);
double dblTime = e->time;
writeAttribute(h_grp, "Time", DOUBLE, &dblTime, 1);
/* GADGET-2 legacy values */
numParticles[0] = (unsigned int)N_total;
......
......@@ -430,7 +430,8 @@ void write_output_single(struct engine* e, struct UnitSystem* us) {
/* Print the relevant information and print status */
writeAttribute(h_grp, "BoxSize", DOUBLE, e->s->dim, 3);
writeAttribute(h_grp, "NumPart_ThisFile", UINT, numParticles, 6);
writeAttribute(h_grp, "Time", DOUBLE, &e->time, 1);
double dblTime = e->time;
writeAttribute(h_grp, "Time", DOUBLE, &dblTime, 1);
/* GADGET-2 legacy values */
writeAttribute(h_grp, "NumPart_Total", UINT, numParticles, 6);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment