Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
SWIFT
SWIFTsim
Commits
c5895316
Commit
c5895316
authored
Sep 14, 2015
by
Matthieu Schaller
Browse files
Output time as double and not as float.
Former-commit-id: 7c551924fa14c32805ff50592c5b1515ce75a52a
parent
57919c5c
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/parallel_io.c
View file @
c5895316
...
...
@@ -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
;
...
...
src/serial_io.c
View file @
c5895316
...
...
@@ -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
;
...
...
src/single_io.c
View file @
c5895316
...
...
@@ -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
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment