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

More const-correctness

parent 80022c94
No related branches found
No related tags found
2 merge requests!136Master,!90Improved multi-timestep SPH
......@@ -28,10 +28,10 @@ __attribute__((always_inline)) INLINE static float hydro_compute_timestep(
struct part* p, struct xpart* xp) {
/* CFL condition */
float dt_cfl = 2.f * const_cfl * kernel_gamma * p->h / p->force.v_sig;
const float dt_cfl = 2.f * const_cfl * kernel_gamma * p->h / p->force.v_sig;
/* Limit change in u */
float dt_u_change = (p->force.u_dt != 0.0f)
const float dt_u_change = (p->force.u_dt != 0.0f)
? fabsf(const_max_u_change * p->u / p->force.u_dt)
: FLT_MAX;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment