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
06b50e49
Commit
06b50e49
authored
Nov 01, 2016
by
Matthieu Schaller
Browse files
Merge branch 'master' of gitlab.cosma.dur.ac.uk:swift/swiftsim
parents
ab24e618
7b11aede
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/statistics.c
View file @
06b50e49
...
...
@@ -155,7 +155,8 @@ void stats_collect_part_mapper(void *map_data, int nr_parts, void *extra_data) {
/* Collect energies. */
stats
.
E_kin
+=
0
.
5
f
*
m
*
(
v
[
0
]
*
v
[
0
]
+
v
[
1
]
*
v
[
1
]
+
v
[
2
]
*
v
[
2
]);
stats
.
E_pot_self
+=
0
.
f
;
stats
.
E_pot_ext
+=
if
(
gp
!=
NULL
)
stats
.
E_pot_ext
+=
m
*
external_gravity_get_potential_energy
(
potential
,
phys_const
,
gp
);
stats
.
E_int
+=
m
*
hydro_get_internal_energy
(
p
,
dt
);
stats
.
E_rad
+=
cooling_get_radiated_energy
(
xp
);
...
...
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