Commit 363241a0 authored by Bert Vandenbroucke's avatar Bert Vandenbroucke
Browse files

Fixed bug in GIZMO_SPH hydro_get_internal_energy.

parent 17b827a1
......@@ -517,7 +517,9 @@ __attribute__((always_inline)) INLINE static float hydro_get_density(
__attribute__((always_inline)) INLINE static void hydro_set_internal_energy(
struct part* restrict p, float u) {
p-> = u;
/* is NOT the specific energy (u), but the total thermal
energy (u*m) */
p-> = u * p->conserved.mass;
......@@ -532,5 +534,6 @@ __attribute__((always_inline)) INLINE static void hydro_set_internal_energy(
__attribute__((always_inline)) INLINE static void hydro_set_entropy(
struct part* restrict p, float S) {
p-> = gas_internal_energy_from_entropy(p->primitives.rho, S);
p-> = gas_internal_energy_from_entropy(p->primitives.rho, S) *
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment