Commit 9b957b58 authored by Matthieu Schaller's avatar Matthieu Schaller
Browse files

Correction to hydro_get_pressure() in the minimal-SPH case.

parent 290e85f7
......@@ -330,8 +330,8 @@ void engine_redistribute(struct engine *e) {
r++;
}
}
message("%ld of %ld (%.2f%%) of particles moved", total - unmoved,
total, 100.0 * (double)(total - unmoved) / (double)total);
message("%ld of %ld (%.2f%%) of particles moved", total - unmoved, total,
100.0 * (double)(total - unmoved) / (double)total);
}
}
......
......@@ -66,7 +66,9 @@ __attribute__((always_inline)) INLINE static float hydro_get_internal_energy(
__attribute__((always_inline)) INLINE static float hydro_get_pressure(
const struct part *restrict p, float dt) {
return p->force.pressure;
const float u = p->u + p->u_dt * dt;
return gas_pressure_from_internal_energy(p->rho, u);
}
/**
......
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