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
4d3dd839
Commit
4d3dd839
authored
Jan 03, 2018
by
lhausamm
Browse files
wrapper files should be useless nowended importing functions from wrapper
parent
21537c43
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/cooling/grackle/cooling.h
View file @
4d3dd839
...
...
@@ -129,8 +129,6 @@ __attribute__((always_inline)) INLINE static double cooling_rate(
/**
* @brief Apply the cooling function to a particle.
*
* We do nothing.
*
* @param phys_const The physical constants in internal units.
* @param us The internal system of units.
* @param cooling The #cooling_function_data used in the run.
...
...
@@ -148,15 +146,11 @@ __attribute__((always_inline)) INLINE static void cooling_cool_part(
/* Current du_dt */
const
float
hydro_du_dt
=
hydro_get_internal_energy_dt
(
p
);
float
du_dt
;
float
delta_u
;
du_dt
=
cooling_rate
(
phys_const
,
us
,
cooling
,
p
,
dt
);
delta_u
=
du_dt
*
dt
;
/* compute cooling rate */
const
float
du_dt
=
cooling_rate
(
phys_const
,
us
,
cooling
,
p
,
dt
);
/* record energy lost */
xp
->
cooling_data
.
radiated_energy
+=
-
delta_u
*
hydro_get_mass
(
p
);
xp
->
cooling_data
.
radiated_energy
+=
-
du_dt
*
dt
*
hydro_get_mass
(
p
);
/* Update the internal energy */
hydro_set_internal_energy_dt
(
p
,
hydro_du_dt
+
du_dt
);
...
...
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