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
1f006bf7
Commit
1f006bf7
authored
Nov 01, 2016
by
Stefan Arridge
Browse files
In stats_collect_part_mapper in statistics.c, we don't collect gpe if gpart does not exist
parent
fee943f7
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/statistics.c
View file @
1f006bf7
...
...
@@ -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