Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
SWIFTsim
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
SWIFT
SWIFTsim
Commits
a875c159
Commit
a875c159
authored
8 years ago
by
Matthieu Schaller
Browse files
Options
Downloads
Patches
Plain Diff
Corrected a typo in minimal SPH
parent
f85363a5
Branches
Branches containing commit
Tags
Tags containing commit
1 merge request
!218
Fix the minimal version of SPH
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/hydro/Minimal/hydro_iact.h
+4
-4
4 additions, 4 deletions
src/hydro/Minimal/hydro_iact.h
with
4 additions
and
4 deletions
src/hydro/Minimal/hydro_iact.h
+
4
−
4
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
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment