Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
SWIFT
SWIFTsim
Commits
4b4d392c
Commit
4b4d392c
authored
Mar 01, 2018
by
Matthieu Schaller
Browse files
Make use of the min/max macros in the Gadget2 interaction functions.
parent
454ac5d5
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/hydro/Gadget2/hydro_iact.h
View file @
4b4d392c
...
...
@@ -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
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment