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

Constants from double to float

parent 6b2fcd89
No related branches found
No related tags found
2 merge requests!136Master,!134Updated vectorisation tests
...@@ -211,10 +211,10 @@ __attribute__((always_inline)) INLINE static void runner_iact_force( ...@@ -211,10 +211,10 @@ __attribute__((always_inline)) INLINE static void runner_iact_force(
/* Balsara term */ /* Balsara term */
const float balsara_i = const float balsara_i =
fabsf(pi->div_v) / fabsf(pi->div_v) /
(fabsf(pi->div_v) + pi->force.curl_v + 0.0001 * ci / fac_mu / hi); (fabsf(pi->div_v) + pi->force.curl_v + 0.0001f * ci / fac_mu / hi);
const float balsara_j = const float balsara_j =
fabsf(pj->div_v) / fabsf(pj->div_v) /
(fabsf(pj->div_v) + pj->force.curl_v + 0.0001 * cj / fac_mu / hj); (fabsf(pj->div_v) + pj->force.curl_v + 0.0001f * cj / fac_mu / hj);
/* Are the particles moving towards each others ? */ /* Are the particles moving towards each others ? */
const float omega_ij = fminf(dvdr, 0.f); const float omega_ij = fminf(dvdr, 0.f);
...@@ -309,10 +309,10 @@ __attribute__((always_inline)) INLINE static void runner_iact_nonsym_force( ...@@ -309,10 +309,10 @@ __attribute__((always_inline)) INLINE static void runner_iact_nonsym_force(
/* Balsara term */ /* Balsara term */
const float balsara_i = const float balsara_i =
fabsf(pi->div_v) / fabsf(pi->div_v) /
(fabsf(pi->div_v) + pi->force.curl_v + 0.0001 * ci / fac_mu / hi); (fabsf(pi->div_v) + pi->force.curl_v + 0.0001f * ci / fac_mu / hi);
const float balsara_j = const float balsara_j =
fabsf(pj->div_v) / fabsf(pj->div_v) /
(fabsf(pj->div_v) + pj->force.curl_v + 0.0001 * cj / fac_mu / hj); (fabsf(pj->div_v) + pj->force.curl_v + 0.0001f * cj / fac_mu / hj);
/* Are the particles moving towards each others ? */ /* Are the particles moving towards each others ? */
const float omega_ij = fminf(dvdr, 0.f); const float omega_ij = fminf(dvdr, 0.f);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment