Skip to content
Snippets Groups Projects
Commit 1213ff00 authored by Matthieu Schaller's avatar Matthieu Schaller
Browse files

Fix a typo in the Pressure-Entropy scheme.

parent bf365f4f
No related branches found
No related tags found
No related merge requests found
...@@ -589,12 +589,12 @@ __attribute__((always_inline)) INLINE static void hydro_prepare_force( ...@@ -589,12 +589,12 @@ __attribute__((always_inline)) INLINE static void hydro_prepare_force(
rho_dh = 0.f; rho_dh = 0.f;
} }
const float rho_inv = 1.f / p->rho; const float rho_inv = 1.f / p->rho;
const float rho_dh = const float rho_dh_term =
1.f / (1.f + hydro_dimension_inv * p->h * rho_dh * rho_inv); 1.f / (1.f + hydro_dimension_inv * p->h * rho_dh * rho_inv);
const float pressure_dh = const float pressure_dh_term =
p->density.pressure_dh * rho_inv * p->h * hydro_dimension_inv; p->density.pressure_dh * rho_inv * p->h * hydro_dimension_inv;
const float grad_h_term = rho_dh * pressure_dh; const float grad_h_term = rho_dh_term * pressure_dh_term;
/* Update variables. */ /* Update variables. */
p->force.soundspeed = soundspeed; p->force.soundspeed = soundspeed;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment