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
a875c159
Commit
a875c159
authored
Aug 15, 2016
by
Matthieu Schaller
Browse files
Corrected a typo in minimal SPH
parent
f85363a5
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/hydro/Minimal/hydro_iact.h
View file @
a875c159
...
...
@@ -157,14 +157,14 @@ __attribute__((always_inline)) INLINE static void runner_iact_force(
const
float
omega_ij
=
fminf
(
dvdr
,
0
.
f
);
const
float
mu_ij
=
fac_mu
*
r_inv
*
omega_ij
;
/* This is 0 or negative */
/* Compute sound speeds */
/* Compute sound speeds
and signal velocity
*/
const
float
ci
=
sqrtf
(
hydro_gamma
*
pressurei
/
rhoi
);
const
float
cj
=
sqrtf
(
hydro_gamma
*
pressurej
/
rhoj
);
const
float
v_sig
=
ci
+
cj
-
3
.
f
*
mu_ij
;
/* Construct the full viscosity term */
const
float
rho_ij
=
0
.
5
f
*
(
rhoi
+
rhoj
);
const
float
visc
=
-
const_viscosity_alpha
*
v_sig
*
mu_ij
/
rho_ij
;
const
float
visc
=
-
0
.
5
f
*
const_viscosity_alpha
*
v_sig
*
mu_ij
/
rho_ij
;
/* Convolve with the kernel */
const
float
visc_acc_term
=
0
.
5
f
*
visc
*
(
wi_dr
+
wj_dr
)
*
r_inv
;
...
...
@@ -187,7 +187,7 @@ __attribute__((always_inline)) INLINE static void runner_iact_force(
/* Get the time derivative for u. */
const
float
sph_du_term_i
=
P_over_rho2_i
*
dvdr
*
r_inv
*
wi_dr
;
const
float
sph_du_term_j
=
P_over_rho2_j
*
dvdr
*
r_inv
*
w
i
_dr
;
const
float
sph_du_term_j
=
P_over_rho2_j
*
dvdr
*
r_inv
*
w
j
_dr
;
/* Viscosity term */
const
float
visc_du_term
=
0
.
5
f
*
visc_acc_term
*
dvdr
;
...
...
@@ -275,7 +275,7 @@ __attribute__((always_inline)) INLINE static void runner_iact_nonsym_force(
/* Construct the full viscosity term */
const
float
rho_ij
=
0
.
5
f
*
(
rhoi
+
rhoj
);
const
float
visc
=
-
const_viscosity_alpha
*
v_sig
*
mu_ij
/
rho_ij
;
const
float
visc
=
-
0
.
5
f
*
const_viscosity_alpha
*
v_sig
*
mu_ij
/
rho_ij
;
/* Convolve with the kernel */
const
float
visc_acc_term
=
0
.
5
f
*
visc
*
(
wi_dr
+
wj_dr
)
*
r_inv
;
...
...
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