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
45adeccf
Commit
45adeccf
authored
8 years ago
by
James Willis
Browse files
Options
Downloads
Patches
Plain Diff
Minor change to name of variable.
parent
e88c008a
Branches
Branches containing commit
Tags
Tags containing commit
1 merge request
!204
Intrinsic vectorisation
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/hydro/Gadget2/hydro.h
+4
-4
4 additions, 4 deletions
src/hydro/Gadget2/hydro.h
src/hydro/Gadget2/hydro_debug.h
+2
-2
2 additions, 2 deletions
src/hydro/Gadget2/hydro_debug.h
src/hydro/Gadget2/hydro_part.h
+2
-2
2 additions, 2 deletions
src/hydro/Gadget2/hydro_part.h
with
8 additions
and
8 deletions
src/hydro/Gadget2/hydro.h
+
4
−
4
View file @
45adeccf
...
...
@@ -140,7 +140,7 @@ __attribute__((always_inline)) INLINE static void hydro_prepare_force(
const
float
pressure
=
(
p
->
entropy
+
p
->
force
.
entropy_dt
*
dt
)
*
pow_gamma
(
p
->
rho
);
/* Divide the pressure by the density and density gradient */
const
float
P_over_rho
=
pressure
/
(
p
->
rho
*
p
->
rho
)
*
p
->
rho_dh
;
const
float
P_over_rho
2
=
pressure
/
(
p
->
rho
*
p
->
rho
)
*
p
->
rho_dh
;
/* Compute the sound speed */
const
float
soundspeed
=
sqrtf
(
hydro_gamma
*
pressure
/
p
->
rho
);
...
...
@@ -150,7 +150,7 @@ __attribute__((always_inline)) INLINE static void hydro_prepare_force(
(
fabsf
(
p
->
density
.
div_v
)
+
curl_v
+
0
.
0001
f
*
p
->
force
.
soundspeed
/
fac_mu
/
p
->
h
);
/* Update variables. */
p
->
force
.
P_over_rho
=
P_over_rho
;
p
->
force
.
P_over_rho
2
=
P_over_rho
2
;
p
->
force
.
soundspeed
=
soundspeed
;
p
->
force
.
balsara
=
balsara
;
}
...
...
@@ -199,13 +199,13 @@ __attribute__((always_inline)) INLINE static void hydro_predict_extra(
(
p
->
entropy
+
p
->
force
.
entropy_dt
*
dt_entr
)
*
pow_gamma
(
p
->
rho
);
/* Divide the pressure by the density and density gradient */
const
float
P_over_rho
=
pressure
/
(
p
->
rho
*
p
->
rho
)
*
p
->
rho_dh
;
const
float
P_over_rho
2
=
pressure
/
(
p
->
rho
*
p
->
rho
)
*
p
->
rho_dh
;
/* Compute the new sound speed */
const
float
soundspeed
=
sqrtf
(
hydro_gamma
*
pressure
/
p
->
rho
);
/* Update variables */
p
->
force
.
P_over_rho
=
P_over_rho
;
p
->
force
.
P_over_rho
2
=
P_over_rho
2
;
p
->
force
.
soundspeed
=
soundspeed
;
}
...
...
This diff is collapsed.
Click to expand it.
src/hydro/Gadget2/hydro_debug.h
+
2
−
2
View file @
45adeccf
...
...
@@ -23,7 +23,7 @@ __attribute__((always_inline)) INLINE static void hydro_debug_particle(
"x=[%.3e,%.3e,%.3e], "
"v=[%.3e,%.3e,%.3e],v_full=[%.3e,%.3e,%.3e]
\n
a=[%.3e,%.3e,%.3e],
\n
"
"h=%.3e, "
"wcount=%d, wcount_dh=%.3e, m=%.3e, dh_drho=%.3e, rho=%.3e, P_over_rho=%.3e, "
"wcount=%d, wcount_dh=%.3e, m=%.3e, dh_drho=%.3e, rho=%.3e, P_over_rho
2
=%.3e, "
"S=%.3e, "
"dS/dt=%.3e, c=%.3e
\n
"
"divV=%.3e, rotV=[%.3e,%.3e,%.3e], balsara=%.3e
\n
"
...
...
@@ -31,7 +31,7 @@ __attribute__((always_inline)) INLINE static void hydro_debug_particle(
p
->
x
[
0
],
p
->
x
[
1
],
p
->
x
[
2
],
p
->
v
[
0
],
p
->
v
[
1
],
p
->
v
[
2
],
xp
->
v_full
[
0
],
xp
->
v_full
[
1
],
xp
->
v_full
[
2
],
p
->
a_hydro
[
0
],
p
->
a_hydro
[
1
],
p
->
a_hydro
[
2
],
p
->
h
,
(
int
)
p
->
density
.
wcount
,
p
->
density
.
wcount_dh
,
p
->
mass
,
p
->
rho_dh
,
p
->
rho
,
p
->
force
.
P_over_rho
,
p
->
entropy
,
p
->
force
.
entropy_dt
,
p
->
force
.
soundspeed
,
p
->
rho
,
p
->
force
.
P_over_rho
2
,
p
->
entropy
,
p
->
force
.
entropy_dt
,
p
->
force
.
soundspeed
,
p
->
density
.
div_v
,
p
->
density
.
rot_v
[
0
],
p
->
density
.
rot_v
[
1
],
p
->
density
.
rot_v
[
2
],
p
->
force
.
balsara
,
p
->
force
.
v_sig
,
p
->
h_dt
,
p
->
ti_begin
,
p
->
ti_end
);
}
This diff is collapsed.
Click to expand it.
src/hydro/Gadget2/hydro_part.h
+
2
−
2
View file @
45adeccf
...
...
@@ -93,8 +93,8 @@ struct part {
/* Signal velocity. */
float
v_sig
;
/* Pressure over density*/
float
P_over_rho
;
/* Pressure over density
sqaured
*/
float
P_over_rho
2
;
/* Particle sound speed. */
float
soundspeed
;
...
...
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