Skip to content
GitLab
Menu
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
14f5b1f4
Commit
14f5b1f4
authored
Mar 02, 2018
by
Matthieu Schaller
Browse files
Print the scale-factor and redshift to the HDF5 header.
parent
30d2f611
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/parallel_io.c
View file @
14f5b1f4
...
@@ -870,6 +870,8 @@ void prepare_file(struct engine* e, const char* baseName, long long N_total[6],
...
@@ -870,6 +870,8 @@ void prepare_file(struct engine* e, const char* baseName, long long N_total[6],
io_write_attribute
(
h_grp
,
"Time"
,
DOUBLE
,
&
dblTime
,
1
);
io_write_attribute
(
h_grp
,
"Time"
,
DOUBLE
,
&
dblTime
,
1
);
int
dimension
=
(
int
)
hydro_dimension
;
int
dimension
=
(
int
)
hydro_dimension
;
io_write_attribute
(
h_grp
,
"Dimension"
,
INT
,
&
dimension
,
1
);
io_write_attribute
(
h_grp
,
"Dimension"
,
INT
,
&
dimension
,
1
);
io_write_attribute
(
h_grp
,
"Redshift"
,
DOUBLE
,
&
e
->
cosmology
->
z
,
1
);
io_write_attribute
(
h_grp
,
"Scale-factor"
,
DOUBLE
,
&
e
->
cosmology
->
a
,
1
);
/* GADGET-2 legacy values */
/* GADGET-2 legacy values */
/* Number of particles of each type */
/* Number of particles of each type */
...
...
src/serial_io.c
View file @
14f5b1f4
...
@@ -778,6 +778,8 @@ void write_output_serial(struct engine* e, const char* baseName,
...
@@ -778,6 +778,8 @@ void write_output_serial(struct engine* e, const char* baseName,
io_write_attribute
(
h_grp
,
"Time"
,
DOUBLE
,
&
dblTime
,
1
);
io_write_attribute
(
h_grp
,
"Time"
,
DOUBLE
,
&
dblTime
,
1
);
int
dimension
=
(
int
)
hydro_dimension
;
int
dimension
=
(
int
)
hydro_dimension
;
io_write_attribute
(
h_grp
,
"Dimension"
,
INT
,
&
dimension
,
1
);
io_write_attribute
(
h_grp
,
"Dimension"
,
INT
,
&
dimension
,
1
);
io_write_attribute
(
h_grp
,
"Redshift"
,
DOUBLE
,
&
e
->
cosmology
->
z
,
1
);
io_write_attribute
(
h_grp
,
"Scale-factor"
,
DOUBLE
,
&
e
->
cosmology
->
a
,
1
);
/* GADGET-2 legacy values */
/* GADGET-2 legacy values */
/* Number of particles of each type */
/* Number of particles of each type */
...
...
src/single_io.c
View file @
14f5b1f4
...
@@ -630,6 +630,8 @@ void write_output_single(struct engine* e, const char* baseName,
...
@@ -630,6 +630,8 @@ void write_output_single(struct engine* e, const char* baseName,
io_write_attribute
(
h_grp
,
"Time"
,
DOUBLE
,
&
dblTime
,
1
);
io_write_attribute
(
h_grp
,
"Time"
,
DOUBLE
,
&
dblTime
,
1
);
int
dimension
=
(
int
)
hydro_dimension
;
int
dimension
=
(
int
)
hydro_dimension
;
io_write_attribute
(
h_grp
,
"Dimension"
,
INT
,
&
dimension
,
1
);
io_write_attribute
(
h_grp
,
"Dimension"
,
INT
,
&
dimension
,
1
);
io_write_attribute
(
h_grp
,
"Redshift"
,
DOUBLE
,
&
e
->
cosmology
->
z
,
1
);
io_write_attribute
(
h_grp
,
"Scale-factor"
,
DOUBLE
,
&
e
->
cosmology
->
a
,
1
);
/* GADGET-2 legacy values */
/* GADGET-2 legacy values */
/* Number of particles of each type */
/* Number of particles of each type */
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a 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