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
cb38bd49
Commit
cb38bd49
authored
Aug 26, 2016
by
Matthieu Schaller
Browse files
Print the dimension information to the HDF5 header group. Allows restart from a snapshot.
parent
49e93734
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/parallel_io.c
View file @
cb38bd49
...
...
@@ -677,6 +677,8 @@ void write_output_parallel(struct engine* e, const char* baseName,
writeAttribute
(
h_grp
,
"BoxSize"
,
DOUBLE
,
e
->
s
->
dim
,
3
);
double
dblTime
=
e
->
time
;
writeAttribute
(
h_grp
,
"Time"
,
DOUBLE
,
&
dblTime
,
1
);
int
dimension
=
(
int
)
hydro_dimension
;
writeAttribute
(
h_grp
,
"Dimension"
,
INT
,
&
dimension
,
1
);
/* GADGET-2 legacy values */
/* Number of particles of each type */
...
...
src/serial_io.c
View file @
cb38bd49
...
...
@@ -739,6 +739,8 @@ void write_output_serial(struct engine* e, const char* baseName,
writeAttribute
(
h_grp
,
"BoxSize"
,
DOUBLE
,
e
->
s
->
dim
,
3
);
double
dblTime
=
e
->
time
;
writeAttribute
(
h_grp
,
"Time"
,
DOUBLE
,
&
dblTime
,
1
);
int
dimension
=
(
int
)
hydro_dimension
;
writeAttribute
(
h_grp
,
"Dimension"
,
INT
,
&
dimension
,
1
);
/* GADGET-2 legacy values */
/* Number of particles of each type */
...
...
src/single_io.c
View file @
cb38bd49
...
...
@@ -592,6 +592,8 @@ void write_output_single(struct engine* e, const char* baseName,
writeAttribute
(
h_grp
,
"BoxSize"
,
DOUBLE
,
e
->
s
->
dim
,
3
);
double
dblTime
=
e
->
time
;
writeAttribute
(
h_grp
,
"Time"
,
DOUBLE
,
&
dblTime
,
1
);
int
dimension
=
(
int
)
hydro_dimension
;
writeAttribute
(
h_grp
,
"Dimension"
,
INT
,
&
dimension
,
1
);
/* GADGET-2 legacy values */
/* Number of particles of each type */
...
...
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