Commit 4b4d392c authored by Matthieu Schaller's avatar Matthieu Schaller
Browse files

Make use of the min/max macros in the Gadget2 interaction functions.

parent 454ac5d5
......@@ -486,8 +486,8 @@ __attribute__((always_inline)) INLINE static void runner_iact_force(
pj->force.h_dt -= mi * dvdr * r_inv / rhoi * wj_dr;
/* Update the signal velocity. */
pi->force.v_sig = (pi->force.v_sig > v_sig) ? pi->force.v_sig : v_sig;
pj->force.v_sig = (pj->force.v_sig > v_sig) ? pj->force.v_sig : v_sig;
pi->force.v_sig = max(pi->force.v_sig, v_sig);
pj->force.v_sig = max(pj->force.v_sig, v_sig);
/* Change in entropy */
pi->entropy_dt += mj * visc_term * dvdr;
......@@ -588,7 +588,7 @@ __attribute__((always_inline)) INLINE static void runner_iact_nonsym_force(
pi->force.h_dt -= mj * dvdr * r_inv / rhoj * wi_dr;
/* Update the signal velocity. */
pi->force.v_sig = (pi->force.v_sig > v_sig) ? pi->force.v_sig : v_sig;
pi->force.v_sig = max(pi->force.v_sig, v_sig);
/* Change in entropy */
pi->entropy_dt += mj * visc_term * dvdr;
......
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