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
c16a31fe
Commit
c16a31fe
authored
Mar 25, 2018
by
Matthieu Schaller
Browse files
Print the current redshift to stdout alongside the scale-factor.
parent
2f444556
Changes
3
Hide whitespace changes
Inline
Side-by-side
examples/main.c
View file @
c16a31fe
...
...
@@ -861,10 +861,10 @@ int main(int argc, char *argv[]) {
/* Legend */
if
(
myrank
==
0
)
printf
(
"# %6s %14s %14s %14s %9s %12s %12s %12s %16s [%s] %6s
\n
"
,
"Step"
,
"Time"
,
"Scale-factor"
,
"Time-step"
,
"Time-bins"
,
"Updates"
,
"g-Updates"
,
"s-Updates"
,
"Wall-clock time"
,
clocks_getunit
(),
"Props"
);
printf
(
"# %6s %14s %14s
%10s
%14s %9s %12s %12s %12s %16s [%s] %6s
\n
"
,
"Step"
,
"Time"
,
"Scale-factor"
,
"Redshift"
,
"Time-step"
,
"Time-bins"
,
"Updates"
,
"g-Updates"
,
"s-Updates"
,
"Wall-clock time"
,
clocks_getunit
(),
"Props"
);
/* File for the timers */
if
(
with_verbose_timers
)
timers_open_file
(
myrank
);
...
...
@@ -1020,10 +1020,10 @@ int main(int argc, char *argv[]) {
if
(
myrank
==
0
)
{
/* Print some information to the screen */
printf
(
" %6d %14e %14e %14e %4d %4d %12zu %12zu %12zu %21.3f %6d
\n
"
,
e
.
step
,
e
.
time
,
e
.
cosmology
->
a
,
e
.
time_step
,
e
.
min_active_bin
,
e
.
max_active_bin
,
e
.
updates
,
e
.
g_updates
,
e
.
s_updates
,
e
.
wallclock_time
,
e
.
step_props
);
printf
(
" %6d %14e %14e
%10.5f
%14e %4d %4d %12zu %12zu %12zu %21.3f %6d
\n
"
,
e
.
step
,
e
.
time
,
e
.
cosmology
->
a
,
e
.
cosmology
->
z
,
e
.
time_step
,
e
.
min_active_bin
,
e
.
max_active_bin
,
e
.
updates
,
e
.
g_updates
,
e
.
s_updates
,
e
.
wallclock_time
,
e
.
step_props
);
fflush
(
stdout
);
fprintf
(
e
.
file_timesteps
,
...
...
src/engine.c
View file @
c16a31fe
...
...
@@ -4371,10 +4371,10 @@ void engine_step(struct engine *e) {
if
(
e
->
nodeID
==
0
)
{
/* Print some information to the screen */
printf
(
" %6d %14e %14e %14e %4d %4d %12zu %12zu %12zu %21.3f %6d
\n
"
,
e
->
step
,
e
->
time
,
e
->
cosmology
->
a
,
e
->
time_step
,
e
->
min_active_bin
,
e
->
max_active_bin
,
e
->
updates
,
e
->
g_updates
,
e
->
s_updates
,
e
->
wallclock_time
,
e
->
step_props
);
printf
(
" %6d %14e %14e
%10.5f
%14e %4d %4d %12zu %12zu %12zu %21.3f %6d
\n
"
,
e
->
step
,
e
->
time
,
e
->
cosmology
->
a
,
e
->
cosmology
->
z
,
e
->
time_step
,
e
->
min_active_bin
,
e
->
max_active_bin
,
e
->
updates
,
e
->
g_updates
,
e
->
s_updates
,
e
->
wallclock_time
,
e
->
step_props
);
fflush
(
stdout
);
fprintf
(
e
->
file_timesteps
,
...
...
src/space.c
View file @
c16a31fe
...
...
@@ -3245,11 +3245,9 @@ void space_generate_gas(struct space *s, const struct cosmology *cosmo,
p
->
id
=
gp_gas
->
id_or_neg_offset
*
2
+
1
;
gp_dm
->
id_or_neg_offset
*=
2
;
if
(
gp_dm
->
id_or_neg_offset
<=
0
)
error
(
"DM particle ID overflowd"
);
if
(
gp_dm
->
id_or_neg_offset
<=
0
)
error
(
"DM particle ID overflowd"
);
if
(
p
->
id
<=
0
)
error
(
"gas particle ID overflowd"
);
if
(
p
->
id
<=
0
)
error
(
"gas particle ID overflowd"
);
/* Set the links correctly */
p
->
gpart
=
gp_gas
;
...
...
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